LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

create checksum from c language

Solved!
Go to solution

I want to control a polycold by RS 232 via Lab view.

In the manual I found the code for determining the checksum. When I try this, i get other checksum values. I have a bit of c language attached as well and the description from the manual.

Who can help me and understand what the checksum has to be.

Download All
0 Kudos
Message 1 of 5
(2,778 Views)

A checksum is never just a simple sum...

 

Does this match up with what is expected?


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 5
(2,754 Views)

Hello,

I tried your advise, but I still did not get the correct checksum.

In the mean time I found two commands I can give, with the correct checksums (2 and 4). See attachments.

I also made a screen shot of docklight (I use this program to test the rs 232 serial commands). When I know how the commands works, I program them in lv.

 

Download All
0 Kudos
Message 3 of 5
(2,739 Views)
Solution
Accepted by topic author RvG

This seems to work:

 

CheckSumExample.png

 

A really big hint is that when you are sending '0' or '2' or '4' to the instrument you are sending the ascii values, not literal values.  A second hint is having a few ascii -> character mappings in your head (such as 0,a,A) is often useful.

Message 4 of 5
(2,725 Views)

Are you following the directions in the text attachment from your first post? It looks like the checksum should ignore the $ character that begins the response, but it's not clear if you're removing the leading $ before calculating the checksum.

0 Kudos
Message 5 of 5
(2,717 Views)