Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

RS232 checksum calculate

How do you calculate the checksum for RS232 serial communication inside LabView? I am talking to a temperature controller and need to read and adjust the temperature inside LabView vi's. I'm talking to it using the Visa open, write, read, close vi's with preset RS232 commands and checksums, but I need to send it adjustments which need new, on the fly commands that include a new checksum.
I'm using LabView 8.0 and Windows 2000.
Thanks.
Message 1 of 4
(10,354 Views)
Hi

A checksum is calculated over the data that has to be sent and can be calculated in a lot of different ways.
Often the value of the bytes is xored from a given byte and the resulting value added to the message.
Another way is adding all the bytes and ignoring overflow.
It has to be in the manual of your temperature controller.
greetings from the Netherlands
0 Kudos
Message 2 of 4
(10,332 Views)

Thank you for your response, Albert. Yes, I wrote an '8 bit modulo 256' checksum calculator in Excel that I use the calculate the preset checksums. But Excel has a bug when it handles negative numbers so I can't use it 'on the fly' from inside LabView. I was wondering if there are any LabView vi's that calculate it automatically. It seems that LabView must be used for years to talk to many RS232 instruments that need to calculate a checksum so I figured someone has already written a LabView routine to do it but I can't find one.

Thank you.

0 Kudos
Message 3 of 4
(10,315 Views)
Where and how did you look? There are numerous examples fo 'checksums' but you need to specify exactly how your checksum is supposed to be calculated. Look here and here.
0 Kudos
Message 4 of 4
(10,311 Views)