LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Sending pure binary out a serial port

I am trying to simulate a serial data source with
LabView and a SeaLevel ISO-COMM-3415 (RS-422)
board.

The serial data source transmits at 9600 baud and
transmits three CHARACTERS defined as below:

- 1 Start Bit (0)
- 8 INSTRUMENT DATA bits (defined below)
- 1 Parity Bit (odd)
- 1 Stop bit (1)

The format of the INSTRUMENT DATA bits

Bit 1 = data (LSB)
Bit 2 = data
Bit 3 = data
Bit 4 = data
Bit 5 = data
Bit 6 = data
Bit 7 = data (MSB)
Bit 2 = sync bit (1 if first CHARACTER, 0 if
second or third CHARACTER)

I would like to generate the entire message myself
(so I can insert my own data, inject parity
errors, sync errors, etc.)

None of the Serial I/O VIs provided in LabView 5.1
provide this flexibility. All I seem to b
e able to
do is send ASCII characters out. What do I have to
do to be able to control each and every bit coming
from my LabView VI through my SeaLevel card to my
Unit Under Test?

Thanks for any help
Eric Clark
Microprocessor Engineer
Bechtel Plant Machinery
eclark@albany.net


Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
0 Kudos
Message 1 of 3
(2,529 Views)
NI supports writing on the serial bus using GPIB and VISA - setting individual lines is something that doesn't seem to be supported in LabVIEW. 

Hope this helps,
TheDillo
0 Kudos
Message 2 of 3
(2,382 Views)
You can send anything you want over the serial port but the last step is converting it to a string.
 
if you want to build your data make an array of booleans convert it to an 8 bit number build it to an array then use the 8 bit array to sting vi to convert it to a sting. Now you can send that sting to the serial write vi.  if you want to see what that string looks like, use a string indicator, right click on the indicator and set it to hex or code display.
 
The Initialize serial vi will let you set the rest of your parameters.
 
good luck
0 Kudos
Message 3 of 3
(2,373 Views)