Hello Community,
I have this simple example of what I would like to try, it seems to work but I would like feedback on the best design. I have a field device that I have connected to the Ignition gateway using Modbus TCP/IP.
I want to read the first 35 registers from this device. The value returned from each registers is ASCII number. example return 77 which is chr(77) which is "M".
Less desired option (sample example below):
creating 35 OPC tags each pointing to a register and pulling it all together with an expression tag.
The option above is a very lengthy process and could require 1000s of tags to the device.
I have this script that I have tested and it works pretty quickly in script console and give me the desired output.
I was planning to add this code as a script and then have an expression tag running on tag group execution which uses runscript('scriptName_here') which returns a string.
- Is there a better design?
- I have not tried the above yet because I am running into a road block which is testing the script.
When executing the script in console, it just keeps running, without any output.
Has anyone ran into this issue?
I know most people will say to try HRS for string. When I try this with an OPC UA Tag, setup as 1.HRS0:35, it will return a value of "M" but nothing else. see as below.