Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to send receive binary data though MSCOMM
Message
From
19/10/2007 12:00:14
 
 
To
19/10/2007 10:05:06
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Miscellaneous
Thread ID:
01262143
Message ID:
01262179
Views:
13
>We have a problem that we need to sent binary data though serial port ( MSCOMM )
>
>The output is FOXPRO like :
>
>DIMENSION x(4) as Byte
>x(1) = 0
>x(2) = 4
>x(3) = 253
>x(4) = 249
>*!*x= (00,04,253,249)
>
>thisform.MScomcontrol.output = x
>
>This generates an invalid parameter error because the control only accepts ascii values.
>
>In Visual Basic this works fine.
>
>Suggestions?

Sure - give it character data:
FOR y = 1 TO ALEN(x)
   z = x(y)
  THISFORM.MScomcontrol.OUTPUT = CHR(z)
ENDFOR
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform