LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

CRC calculation modbus

Hello All, 

 

I'm trying to communicate with climate chamber. Use Modbus communication.

I create VI that write data in the chamber, but some values are written in chamber some not.

I assume that problem is with checksum.

I created dll, but I'm not sure that calculation is correct, because I'm not familiar with that kind of programing.

I' wondering if someone can post the code in labview that calculate crc, without calling any dll.

 

Vi for write is in att. But since I cannot send dll, it is not useful.

 

It will be very helpful. 

thank you.

Download All
0 Kudos
Message 1 of 4
(2,278 Views)

Hi Milan,

 


@milan87 wrote:

I'm trying to communicate with climate chamber. Use Modbus communication.

I create VI that write data in the chamber, but some values are written in chamber some not.

I assume that problem is with checksum.


The manual of that climate chamber should describe the Modbus communication and its details including the checksum/crc calculation…

 


@milan87 wrote:

I created dll, but I'm not sure that calculation is correct, because I'm not familiar with that kind of programing.

I' wondering if someone can post the code in labview that calculate crc, without calling any dll.


When you search this forum for "CRC" you will find a lot of threads for this very topic. Did you search here before?

Why do you need to create your own Modbus communication routines? Don't you use any of those (free) available Modbus libraries (see VIPM!), which already include proper CRC calculations?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 4
(2,267 Views)

Hello Gerd, 

 

thanks on fast reply.

 

Yes, chamber has crc description in manual, I used for dll. But obviously I made same mistake. in att.

 

I downloaded NI Modbus library from VIPM, but I dont see how to use this functions to adjust on FTDI chip. That's why I trying to calculate crc.

 

I searched forum and found an examples, but it doesn't work with my chamber.

 

So If you can direct me on some specific example it will be great.

 

Thank you. 

0 Kudos
Message 3 of 4
(2,252 Views)

Hi Milan,

 


@milan87 wrote:

I downloaded NI Modbus library from VIPM, but I dont see how to use this functions to adjust on FTDI chip. That's why I trying to calculate crc.


How does this "FTDI chip" come into play?

You say you do some Modbus communication: this usually is done over RS232 (Modbus/RTU) or ethernet (Modbus/TCP). Both variants are handled by all Modbus libraries in VIPM…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 4
(2,216 Views)