Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using MSCOMM with USB to serial device
Message
From
29/05/2008 08:59:54
 
 
To
29/05/2008 08:03:14
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01320080
Message ID:
01320201
Views:
17
Using the example I gave you, did you change the test button's click code to send your command instead of the code in the example (standard ATZ command)? You'll have to send your commands (below) to your device in lieu of the code in the example and wait for a response...


>Thanks for your response.
>
>The device uses a Prolific USB to Serial driver on Comm Port 4.
>
>I can type the following in the command window and get the correct data back from the device.
>
>ot = CREATEOBJECT('mscommlib.mscomm')
>ot.CommPort = 4
>ot.Settings='115200,n,8,1'
>ot.PortOpen = .T.
>lqout = 0hA0A20001B700B7B0B3
>ot.Output = lqout
>lqin = ot.Input
>ot.PortOpen = .F.
>CREATE CURSOR test (testrec Q(100))
>INSERT INTO test VALUES(lqin)
>
>
>But when I run the same code in a PRG, the contents of the input buffer are cleared before being assigned to the local varuable.
>
>I copied and ran the comm port tester (making a change for the different baud rate) but got no response from COMM PORT 4.
>
>Thanks in advance for any insight.
.·*´¨)
.·`TCH
(..·*

010000110101001101101000011000010111001001110000010011110111001001000010011101010111001101110100
"When the debate is lost, slander becomes the tool of the loser." - Socrates
Vita contingit, Vive cum eo. (Life Happens, Live With it.)
"Life is not measured by the number of breaths we take, but by the moments that take our breath away." -- author unknown
"De omnibus dubitandum"
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform