Our full technical support staff does not monitor this forum. If you need assistance from a member of our staff, please submit your question from the Ask a Question page.


Log in or register to post/reply in the forum.

Capturing binary data with CR1000 via RS232


Sandilak Sep 16, 2009 08:59 PM

Hi,
I am trying to capture binary data from an instrument that is streaming in a serial cable to CR1000 via RS232.

I have the SerialOpen set to Binary/no parity/one stop bit/8 data bits.
The only way I can get anything using any SerialIN command is with the SerialInBlock, but I only get the occasional strange character.

If I look at the data streaming in with a hyperterminal type program set to binary the data looks like this....

00000000 00000000 00000000 01010100 01001001 01001101 00001001 00001001
00010110 00010001 01010001 00110000 01011000 00100011 00100111 01111001
11010110 01100010 00000000 00101110 10100111 00000000 10110011 01101000
10010011 00100010


Any ideas?

Ken


Sam Sep 17, 2009 02:42 PM

Ken,

It would be helpful to see your code. Is it something like this?


Const COM_PORT = ComRS232
Const COM_BAUD = 9600
Const COM_FORMAT = 3 '3=RS232,Binary,8,N,1
Const COM_BUFF = 500
Public SerialInput As String * 9

BeginProg
SerialOpen (COM_PORT,COM_BAUD,COM_FORMAT,0,COM_BUFF)
Scan (1,Sec,3,0)
Do While (SerialInChk (COM_PORT) > 7)
SerialInBlock (COM_PORT,SerialInput,8)
Loop
NextScan
EndProg

* Last updated by: Sam on 9/17/2009 @ 8:43 AM *

Log in or register to post/reply in the forum.