DASYLab

cancel
Showing results for 
Search instead for 
Did you mean: 

CHECKSUM

I need to send a series of values  through  COM port as a string  with comma as separator and the last byte has to be  'CHECKSUM"

Not much details are available in DASYLab 9.0 documentation as to how to generate this checksum for a string.

 

I request  here for some body to help me with actual example and also indicate the steps involved in generating the checksum.

 

I have tried \cc, \cq but some where I have failed.

 

0 Kudos
Message 1 of 2
(6,689 Views)
Format Instructions for Data Output.sHistory {behavior:url(#default#savehistory);}

Here's what the V11 Help says. Without knowing more about the string and checksum, I can't tell you if one of these will work. 

 


 

Check Sums

The format instructions of the strings to be sent can contain one or several check sums. The receiver can use the check sum to check whether the sent data is complete. Specify the check sum with the control character \c. The position in the format instruction specifies the position of the check sum byte in the string to be sent.

Following you find the available check sums:

Check sum Control Characters Description
Cross sum \cq Adds all bytes before the checksum character including the contained measurement values and sends the cross sum with the string.
If the format instruction contains a \c control character, DASYLab makes the cross sum from the beginning of the string to the position of the control character. If the format instruction contains several \c characters, DASYLab makes the subsequent cross sums from one checksum character to the next.
CRC test \cc Calculates all bytes of the string to be sent with the CRC16 method. DASYLab sends the binary sequence of the CRC test and the binary sequence of the CRC test including the CRC value as the result. The sent binary sequence are not numbers but polynomials.
XOR sum \cx Connects all bytes before the checksum character including the contained measurement values with the exclusive-or operator and sends the binary sequence with the character string.
XOR sum with control character suppression \cy Executes the same operation as the XOR sum and adds 32 to the result byte if the result byte is smaller than 32.


Measurement Computing (MCC) has free technical support. Visit www.mccdaq.com and click on the "Support" tab for all support options, including DASYLab.
0 Kudos
Message 2 of 2
(6,682 Views)