Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

sending binary commad through serial port

Hi
 
We  developing the board level test fixture . The board support SUPP(Simple universal packet protocol) serial communication . It is required to send command in the  form of binary  but if we use VISA the command needs to be string . Please let me know is there any way we can achieve this in LAB view.
 
Regards,
 
Sharanu
0 Kudos
Message 1 of 5
(3,738 Views)
Sharanu,

this is easy to achieve.
LabVIEW uses a kind of Pascal-like strings, which means each string contains its actual length as well. This is fundamentally different from C-strings, which are terminated by a 0x00 character. Finally this means, that strings in LabVIEW may contain every character, including binary data and even the 0x00.
If you are interested in creating a binary string constant than place a string control or constant onto the front panel FP or the block diagram BD. Right-click onto it and choose '\'- or 'Hex'-display. The first version displays all visibel characters  as such and all invisibel (binary) character as \-code. Search the help for an explanation. The second version displays all characters in hex code. Using this display variant it is easy to build or review your binary data.

HTH   and
Greetings from Germany!<br>-- <br>Uwe
Message 2 of 5
(3,732 Views)

Hi ,

Thanks for the quick response ... How about reading the binary data that returns from the bboard once the command is issued . What we get is from  VISA is string not the binary . I have observed the  return value is some junk. We have the tool that is developed in VB that returns the correct data.Please advice if any suggestions .

 

appreciate your help

 

Regards,

Sharanu

0 Kudos
Message 3 of 5
(3,731 Views)
Its simply binary data - you have to know how to decipher it. Depends on the used protocol. It must be declared in the devices describtion.  Sorry...
Greetings from Germany!<br>-- <br>Uwe
0 Kudos
Message 4 of 5
(3,724 Views)

I can not find any information online about the SUPP protocol - do you have documentation for it that you could post? The only "universal packet protocol" I can find information on is the PARC Universal Packet Protocol - is that what you're using?

0 Kudos
Message 5 of 5
(3,701 Views)