From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Communicating to an ANORAD Controller from LabVIEW through COM1 Serial port.

I am trying to communicate to an ANORAD controller through LabVIEW. This contoller is kind of old and came with some software that uses ACSPL (ACS Programming Language). I am trying to communicate to the controller directly without going through this software. I have established a COM1 port connection but I cannot get a controller to work. This controller came with a Sotware Guide which has a section on "Communicating from a Host Computer". It states there that if a command from a terminal (controller's software) for Setting X's Wait Time to 50 msec is "SXWT50" (=carriage return), then a command from host computer is "SXWT <0H><0H><0H><32H> <88H>" (<0H><0H><0H><32
H> is 50 in binary format, <88H> is a checksum, and H stands for Hexidecimal). The checksum is calculated by using ASCII representation for those characters by first taking their sum and then taking a modulus 256 of that sum:
(83+88+87+84+0+0+0+50)mod256=392mod256=136=88H.
At first it seemed pretty easy, but now when I put that command into LabVIEW nothing works as it should. I tried putting an array of ASCII characters that correspond to each of the letters of the command but it still does not work. What is the right string(or should I say the right format) to give to the Serial Write VI?
0 Kudos
Message 1 of 2
(2,446 Views)
The input to the serial write is a string. You can use "\" characters in the string. So, to send hexadecimal characters, try "\00\00\00\32\88\n". Where the "\n" is the newline character. Give it a try and I hope that this works for you.

Rob
0 Kudos
Message 2 of 2
(2,446 Views)