LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to send bytes in LabVIEW

I got a new relay.  I was able to communicate with it in C#.  (See below)

"RelaySentString = "55 56 00 00 00 04 02 B1"

byte[] bytes = RelaySentString.Split(' ').Select(s => Convert.ToByte(s, 16)).ToArray();

LocalComPort.Write(bytes, 0, bytes.Length);

 

I don't know how to send the command "55 56 00 00 00 04 02 B1" in LabVIEW.  May someone help me please?

 

Thank you.

0 Kudos
Message 1 of 2
(134 Views)

Use VISA to do the communications. It just takes a string as an array of bytes. Change your control/constant to "Hex Display" and you can just type your byte values directly.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 2 of 2
(115 Views)