DASYLab

cancel
Showing results for 
Search instead for 
Did you mean: 

Checksum "Modbus" with DASYLab's RS232-modules possible?

Hello!

 

I know that it's possible to add checksums to the 'payload' data by appending a control character (e.g. /cc, /cq etc).

For example: [a]\cx\r

 

The problem i have is, that DASYLab does not provide the checksum i need -"modbus".

DASYLab's checksum /cc calculates the CRC16 checksum "CCITT (0xFFFF)".

Here's a online calculator, that shows the different results for different checksum calculations: http://www.lammertbies.nl/comm/info/crc-calculation.html

 

So, is there a way to tell DASYLab to use a different CRC16-calculation method?

Or, is it possible to calculate a "custom" checksum with DASYLab's inherent tools (global variables, and strings)?

 

Thank you!

M.Sc. Holger Wons | measX GmbH&Co. KG, Mönchengladbach, Germany | DASYLab, DIAdem, LabView --- Support, Projects, Training | Platinum NI Alliance Partner | www.measx.com
0 Kudos
Message 1 of 2
(6,212 Views)

Hello,

 

It's a subject we discuss on the French Dasylab Forum. See http://128657.aceboard.fr/128657-2244-6961-0-dans-Dasylab.htm or http://forums.ni.com/t5/DASYLab/CRC-dasylab/td-p/1506806 on this forum, if you understand French language.

 

You are right: Dasylab only calculates CRC16 0xFFFF and CRC16 MODBUS is not implemented.

I had a look to see it was possible to do it using global variables calculations but it does not seem to be so easy.

The solution we use, waiting this new option in Dasylab 12, is to export the value outside of Dasylab using Data Socket output module and to use any language that supports ActiveX to send the right string to RS232.

Aneel tests it using VB and I, using Labview, and it works fine, without too much delay (Aneel does a closed loop system).

Please, try this solution with your preferred programming language (C, C++, Java...) and send us your results, for information!

Good luck,

 

Frédéric Miqueau
MD Electronic, France
http://www.mdelectronic.fr
French Dasylab Forum : http://www.dasylab-forum.de/forum/index.php?showforum=43
0 Kudos
Message 2 of 2
(6,143 Views)