Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
MsComm control problem
Message
 
 
À
31/07/2002 04:17:17
Information générale
Forum:
Visual FoxPro
Catégorie:
Contrôles ActiveX en VFP
Divers
Thread ID:
00684163
Message ID:
00684386
Vues:
20
>Snipped and appended where needed...
>
>
>Are these fixed or variable sized chucks of data you are sending to the scale? Any chance that the scale is also outputting XON/XOFF ? These would show as CHR(17) and CHR(19) in your input stream. See here for a VB reference. Any chance of getting a port monitor in the line - the little gizmos with the LED's. You could then see if the hardware HS is what is stalling the output...

The scale shows XON/XOFF is disabled. We have had a monitor on the line (however I'm in another state and relying upon someone else to read.) He is checking into the fact that the CTS seemed to be high during the whole transfer. My guess is that the scale is to blame there if true.
>
>If you want to test the outbuffer, lose all your current timer/debug/whatever testing of it and try something like this in your .OnComm.commevent=1
>
>DO WHILE THIS.outbuffercount>0
>  DOEVENTS
>ENDDO
>
>and now present a messagebox or whatever of the status.

Thanks. I'll give that a try.


>One other question: if I use the mscomm1.output to add information to the buffer before the buffer is empty, will that overwrite the buffer or append it to the end?
>
>SWAG, but I believe it appends up to the outbuffersize. This relates to my above question about the data packet size. You may need to take this in account.
>
>Last thought: I suspended my program just after the mscomm1.output = string command and saw in my debug window that the outbuffercount was 57. It sat there (as there was nothing attached to my port at the time) until I typed the following at the commandline:
>
>
>l_count = mscomm1.outbuffercount
>
>
>This command changed my debug property to 0!
>
>Most frustrating!

>
>Indeed. What version of VFP, BTW? I really don't think that the debugger is very useful at this point, and may even be upsetting the apple cart. I'll see if I can repeat that here.


I'm using VFP 7 on Windows XP professional. Hopefully I can get somewhere with the oncomm event, although last I checked I thought the stream was already out of the buffer before the event fired.
Steve Howie, owner
DaSH Technology
Denver, CO
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform