LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

multiple byte serial message construction

Using LabVIEW 8.2
 
Have a computer system I need to send simulated data.
 
It is expecting a message of 26 bytes.
A synopsis of the contents follows:
 
Byte
 
0    Header
1    Header
2    Message Length
3    Device address
4    GPS Seconds of Week  Byte0 LSB
5    SOW - Byte1
6    SOW - Byte2
7    SOW - Byte3  MSB
 
etc.
 
Given known values for the bytes, what is the simplest method of  constructing the string to be sent via RS-232 using the VISA Write VI?
 
 
0 Kudos
Message 1 of 4
(2,197 Views)

Found elsewhere someone suggesting creating command sequences as arrays of U8 elements and using Byte Array to String to convert.  Then use VISA Write to send over the serial port.

I'd need to use I8 in my case as some are signed bytes.

I'll give this a go and welcome any other suggestions.

 

 

 

0 Kudos
Message 2 of 4
(2,191 Views)

Well now.

Byte Array to String only accepts U8 for input.

Some of the MSB bytes in the message I am using are signed requiring I8.

That apparently won't work for this situation.

 

0 Kudos
Message 3 of 4
(2,186 Views)

Tried a test with known data and it seems to work regardless of the U8 vs I8 question.

 

 

0 Kudos
Message 4 of 4
(2,182 Views)