LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Modbus TCP communication with Schneider Electric M580 Safety PLC using LabVIEW DSC module

Hi everyone,

 

I'm trying to send/receive variables (boolean for now, to keep it simple) from LabVIEW 2021 DSC (Datalogging & Supervisory Control) module to a Schneider Electric M580 safety PLC, using modbus TCP communication.

 

Here's what I've already successfully tried:

Using just the basic modbus VIs (under Data Communication->Modbus->Modbus Master) "Create Master Instance.vi", "Write Single Coil.vi", "Read Coils.vi" and "Close.vi", I was able to send and receive boolean data from the PLC. The modbus addressing in this case was pretty simple and straightforward. On the LabVIEW side, I just put in a number like 100 or 200, and on the PLC side I gave the variable the corresponding address like %M100 or %M200.

 

What I'm trying to do:

I want to replicate the above communication through the DSC module. The documentation for the DSC module is not fully clear. I followed the instructions on this page:

https://knowledge.ni.com/KnowledgeArticleDetails?id=kA03q000000x0QgCAI&l=en-CA

For one, the variable addressing is very different. The boolean address range is 000001-065535. After creating a shared variable mapped to 000001 (which I assumed is a valid modbus address), I gave the PLC variable an identical address %M000001. But this did not work. Then I thought the leading zeros are not required. So on the PLC, I changed the modbus address to %M1. But this still did not work.

 

The above webpage does not say if additional steps are required to make the modbus connection with the PLC. 

 

in contrast, the simple modbus VIs work without any additional steps. It's just simple TCP/IP address, create a connection refnum and then put in the modbus address of the variable to write/read.

 

Any help would be greatly appreciated!

0 Kudos
Message 1 of 3
(1,676 Views)

I would like to clarify a point, since I can't edit my original post.

 

I'm trying to replicate modbus communication through the Modbus IO Server that is part of the DSC module. 

 

The modbus VIs are also available only through the DSC module. I've had success with using the basic modbus VIs, but not using the modbus IO server.

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

Hi Abvenk

I just read your message and wanna say that you just use OPC server, it is very simple.

if you need more help please message me.

 

Thanks

asif

0 Kudos
Message 3 of 3
(1,198 Views)