02-27-2018 08:50 AM
Hello,
I want to communicate between a PC (using LabView) and a Delta PLC using ModBus over ethernet.
I got it working by creating a I/O Server library and Create Bound Variables... . It read the values in the PLC registers at the addresses I was reading.
But it now automatically stops running without reading any of the PLC registers and gives an unidentified error (1967353901). Googling says it might be an incorrect/non-existent address. I removed all but one address and it still automatically stops running without reading anything; the shared variable is highlighted in the block diagram as the problem, but why did it read before?!
Thank you.
02-28-2018 08:12 AM
That's not enough for anyone to help you, can you share your code?
02-28-2018 08:49 AM
Hello,
Simple project/code:
I created a new project.
Right click on "My Computer"-> New -> I/O Server -> Modbus -> Continue... -> Model=Modbus Ethernet -> IP address=192.168.2.5 (Dela PLC IP address) -> OK.
Right click "ModBus Library.lvlib" (name I saved it as) -> Create Bound Variables... -> expand to Modbus1 -> 400001-465535 -> Add range >> -> Data item=404097 (PLC register address I want to read) -> OK -> OK.
Right click "ModBus Library.lvlib" -> Deploy All.
Created a new VI.
Block Diagram:
Added a while loop and stop button to while loop condition.
Added Wait (ms) timing @ 100ms.
Dragged 404097 Shared Variable into while loop, created Indicator.
On PC set Ethernet IP address close to PLC IP address: 192.168.2.1.
Plugged Ethernet cable from PC into PLC.
Changed to Front Panel and ran code.
Error - 1967353901 displays; if I choose "Continue..." then it runs with the correct value returned in 404097 indicator window.
Now if I stop code and run again it is fine; but if I close LabVIEW and run code, error comes again and I have to click "Continue..."for it to work?!
From http://zone.ni.com/reference/en-XX/help/371618K-01/lvdsc/dsc_error_codes/ : 1967353901 = The Modbus I/O server failed to connect to the Modbus Ethernet slave device. Ensure that the Modbus Ethernet slave device works properly and that the connection between the Modbus master and slave devices is configured correctly.
If I can get the right value after clicking "Continue..." then I do not see how it can be a connection issue?!
Thank you.
P.S. how do you add the code; do you take snap shot of the Block Diagram window and then attach that to the post?
Clinton
02-28-2018 08:54 AM
I don't have the DSC module, so I can't help you with this. To share your code don't take a screenshot, upload the actual .vi files (or a zip of them if there are multiple).