Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Mscomm
Message
 
 
To
12/11/2003 15:12:09
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Title:
Re: Mscomm
Miscellaneous
Thread ID:
00849204
Message ID:
00849290
Views:
25
My recollection of serial port settings is that when parity was used it left 7 bits for data. Try changing to 7 data bits or use NO parity.

>Hi Jim. Thanks for the response. I remember you helping me last time. I thought I had this problem fixed, but it is acting up again. There is no real distance between the belt and the pc. it is all right there. I haven't checked to see if data is sent back to me after I send the start and stop commands, although I do retrieve data from this comm control. I am receiving a weight after the parts go across a scale. This works fine, only the sending of the start and stop commands are causing me problems. This program is an upgrade of a foxpro 2.6 application. the start and stop worked fine for it. Below is the code used in the 2.6 app. If I can't get this to work with the mscomm control, is there an easy windows api i could call to send the serial port the start and stop. Thanks again for the help.
>
>*Send signal to STOP the conveyor due to Bad Scanner Read.
>*Communication is via the Scale Port, signal is ESC (chr(27)) followed
>*by a carriage return (chr(13)).
>*Parameters: Com port #, BAUD rate, Data Bits, Stop Bits and Parity
>=callfn(gnclose)
>=callfn(gnset,2,9600,8,1,"EVEN") && SCALE INTERFACE
>
>* Open the port and send some data
>=callfn(gnsend,CHR(27)+CHR(13))
>llconveyon = .f. &&960702
>=callfn(gnclose)
>RETURN
>
>* *************************
>* * STRTCONV *
>* *************************
>FUNCTION STRTCONV
>*Send signal to START the conveyor.
>*Communication is via the Scale Port, signal is SO (chr(14)) followed
>*by a carriage return (chr(13)).
>*Parameters: Com port #, BAUD rate, Data Bits, Stop Bits and Parity
>=callfn(gnclose)
>=callfn(gnset,2,9600,8,1,"EVEN") && SCALE INTERFACE
>
>* Open the port and send some data
>=callfn(gnsend,CHR(14)+CHR(13))
>llconveyon = .t. &&960702
>=callfn(gnclose)
>RETURN
Regards,

Mike

"We try to solve the problem by rushing through the design process so that enough time is left at the end to uncover the errors that were made because we rushed through the design process."
- Glenford Myers

If you're going through hell, keep going. - Walt Disney
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform