ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LabVIEW MODBUS16 communication

Hello,

Does anyone have a good example of how to communicate with the following protocol via RS232 MODBUS16 CRC?

  • Baud Rate: 19,200
  • Data bits: 8 Bits
  • Parity: None
  • Stop Bit: 1
  • CRC: MODBUS16

 

Thanks,

0 Kudos
Message 1 of 8
(3,488 Views)

Modbus16 - I don't know about such a protocol.

 

There are several LabVIEW libraries available for download that are capable of

Modbus ASCII, Modbus RTU and Modbus TCP.

 

All of these include examples.

 

Regards, Jens

Kudos are welcome...
0 Kudos
Message 2 of 8
(3,455 Views)

Thanks for the information.  Where can I find the libraries?

 

Thanks,

0 Kudos
Message 3 of 8
(3,433 Views)

Easiest way is the VI Package Manager https://vipm.jki.net/

 

If you don't use that just do a search for "LabVIEW Modbus".

LabVIEW Pro Dev & Measurement Studio Pro (VS Pro) 2019
0 Kudos
Message 4 of 8
(3,420 Views)

I was able to install the libraries, however, how can I send the following command to a device?  None of the functions have a data send input.

0xA5 0x05 0x0D CRC

 

Thanks,

0 Kudos
Message 5 of 8
(3,397 Views)

What does that command mean?

 

Did you look at the examples for Modbus that are installed with the libraries such as the Master?

 

0 Kudos
Message 6 of 8
(3,389 Views)

There's like 3 or 4 MODBUS libraries, so without you telling us which one you actually got, it's difficult to help.

 

As a general note, to send what you're trying to send, you're probably looking for something called "Modbus write multiple holding registers.vi", and you need to convert those 3 things you're trying to write from hex into 16-bit unsigned integers.  So the "data send input" might be labeled something like "Registers", and would be an array of U16.

0 Kudos
Message 7 of 8
(3,385 Views)

Thanks to everyone for all the help.  I was able to get it to work:)

0 Kudos
Message 8 of 8
(3,345 Views)