Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

calculate chksum in string for serial communication

I am trying to communicate serially to a Sunmax RF-2900L wireless terminal w/ barcode scanner. I just need to transmit text (prompt) to the display of the terminal and receive key'd or barcode string back to my application (Labview). The first problem I need to solve is how to calculate the chksum for the string so that the terminal will accept the string. Surely Someone out there has done this in the past. Help will be appreciated immensely.
0 Kudos
Message 1 of 2
(3,159 Views)
Hi,

As far as I understand, checksum is just adding the bytes received from the serial port (check this checksum calculator. You can do this by using the "String to Byte array" vi located in the string palette >> 'String /Array/Path conversion'. Once you have an array of bytes, you can add the elements using the "Add Array Elements" VI.

For future reference, whenever you have a LabVIEW programming question it would be better to post it in the LabVIEW discussion forum. You'll find a more people with LOTS of LabVIEW programming experience. You are getting the data from the serial interface, but once it is in LabVIEW it doesn't matter if it came from serial, TCPIP or a file.

DiegoF
National Instr
uments.
0 Kudos
Message 2 of 2
(3,159 Views)