LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Modbus Communication with Cube400

Hi

 

I have problem to communicate with Cube400. It is using modbus protocol and communication is going through rs485. I must connect it to cRIO 9022 serial port so I used converter IC-485SI (converter manual on page: http://www.esis.com.au/Converters/ic485si.pdf ) to change communication from rs485 to rs232.

 

I tried to used Modbus I/O Server. When I have one variable binded to modbus register I have proper reading. When I add second variable then I lose readings from first one. This solution is in VI called ModbusIO_rs485.

 

After this I tried to communicate with Cube400 by using VISA blocks. I tried to send specific modbus message. On the begging I get proper response several times but right now I am getting timeout error. This program is in VI called VISA_MBP_ForcePush.

 

I am attaching project with this VIs

 

What is wrong here ?

 

Best Regards

Pawel Dudzik

0 Kudos
Message 1 of 3
(2,524 Views)

In your program you read 16 bytes immediately after the write.

You should add some time after the write and you should see how many bytes there are available and read that number of bytes.

 

Look at the COM example shipped with LabVIEW.

 

And you use the WRONG CRC it should be 0x5679.

 

 

Try communication with the loopback command. Sending  0408 0000 8844 866D  (Hex data) should return the same data

 

 

 

Kees

0 Kudos
Message 2 of 3
(2,408 Views)

I think problem was with converter in this version.

 

I changed configuration. Now I am using device iMOD-9300. It is asking directly four Cube400 devices through RS485 (without converter) and modbus protocol. iMOD is creating own modbus registers with acquired data and then I am using Modbus I/O Server to ask for array of X elements. Now It is working properly.

0 Kudos
Message 3 of 3
(2,400 Views)