I set up a Production Automation Direct 1000 PLC to generate some random data in productivity suite, with tags: Random1, Random2, Random3. I was able to configure this device as ModBus TCP on ignition 8 and the server shows it’s connected. However, when I try to look for tags created in the pro suite, “Random1”, “Random2”, and “Random3” don’t show up on the drop list.
The Modbus protocol has no notion of browsing or tag enumeration. You have create and manually address OPC tags in the designer for every tag in the controller you want to subscribe to. Somewhere in the PLC programming software you should be able to map variables to registers, or get the mapped register if it happens automatically. Then you can make a tag in Ignition using the Modbus addressing syntax: https://docs.inductiveautomation.com/display/DOC80/Modbus+Addressing
I
I assigned Modbus Addresses to tags. However I still get an error after I manually address the OPC Item Path.
The OPC Item Path is [P1-540]HR400001.
In the picture I missed a 0.
Leave off the ‘4’ in the OPC Item Path and just try [P1-540]HR1
etc…
I tried 1, 401, 4001, 40001, 400001, and none works. Also tried other tags with different addresses. I changed the Modbus server settings to “map value to a single 16 bit Modbus register” in productivity suite. Just shows: value: bad
Is that 1
a UnitID? Try [P1-540]1.HR1
, meaning "holding register 1 from unit/slave ID 1 on device P1-540
"
@PGriffith No it’s actually rows and columns of the array I created
It's silly of me to ask, but just to clarify, what is the name of the device connection on your gateway? Is it P1-540
, or is it the p1000_random_test2
device highlighted in your first post?
@Paul.Scott Good catch! I had them under different names before. But all the folders and devices now have the same name as the device added in the gateway. I changed them when I was testing out the OPC Item Path.
I have the same device configuration and OPC Item Path setting for the P1000 device in both v7 and v8. The tags work and update on 7.9, but do not work on 8.0.4. Below are pictures of the settings.
Tags and paths in 7.9.
Tags and path in 8.0.4. The value is invalid. Gives message: error_configuration. when click on the question mark.
Devices – OPC-UA Server configuration page. Edit device. 7.9 setting
Devices – OPC-UA Server configuration page. Edit device. 7.9 Advanced setting
Device Connections – OPC UA configuration page. Edit device. 8.0.4 setting
Device Connections – OPC UA configuration page. Edit device. 8.0.4 advanced setting
Is the OPC Server name correct?
If you did a fresh install of Ignition 8 the default name is slightly different. “Ignition OPC UA Server” without the hyphen.
@Kevin.Herron
Oh my gosh, that solved the problem! I noticed it before but when I hit commit, the OPC server doesn’t change. I went in and manually took out the hyphen this time, now everything is working! Thank you so much.