LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Modbus Slave Serial Question

Solved!
Go to solution

Hello everyone, so I have connected labview with plcs before so I understand the basic but have recently encountered a problem which hopefully you can input me. My plc is a Fatek FB's 20MAT2-AC internally the configuration for modbus RTU slave is as follows: Port 2, Parity: even, Data bits: 8, and Stop bit: 1 (attached image). So basically in my computer when I go to device manager I setup up the same parameters as shown before in Com2 (attached image). I create my I/O server in labview with the same parameters as shown before (attached Labview VI) and create the bound variables CommFail and 400001 because in my plc I move some data to R0 and from the Fatek plc manual the corresponding modbus slave address is R0-400001. When I run my VI the CommFail doesn't light up which tells me that communication with the plc is successful nevertheless 400001 is always at zero. If somebody can input me as to where I am making a mistake please do give me some input.

0 Kudos
Message 1 of 3
(3,398 Views)
Solution
Accepted by topic author CarlosT

Hi Carlos,

Welcome again to our Forums. I noticed you have created an I/O Server as a Modbus Slave. This is the type of configuration you would do when wanting to simulate a device. For your case, I think you would want to select Modbus at the time of creating the I/O Server. With this type of configuration you would try to retrieve information from the device on the other side, instead of publishing it (this is the case for the Modbus Slave).

 

Modbus.PNG 

Andres G

NI

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

Thank you very much for your input that was the correct answer I got confused since in the pc settings we have to set the plc as modbus slave to make it communicate with labview

0 Kudos
Message 3 of 3
(3,308 Views)