Integrating Ignition Edge Gateway Tags into the EPIC Control Engine


#1

OK, so you have integrated PLCs etc. into your Edge Gateway on the EPIC platform and are now thinking about integrating this data into the PAC Control Engine running on the EPIC device for local control purposes

The obvious method is to use the Node-RED environment, adding Ignition nodes to the node pallet to read to/write from the Edge Gateway and then adding pac nodes to the node palette to write to/read from to the EPIC Control Engine

Another slightly less obvious but more direct method is to write PAC Control subroutines that make API calls directly to the local Edge Gateway, much in the same way as Node-RED is doing using GET and POST

Edge

Something like the following subroutine would read the value of an Ignition Tag on the Edge Gateway into a PAC Control Engine Tag

PAC Control strategy variables being read from or written to the Edge Gateway must always be in string variable format, but PAC Control includes ample instructions for string conversion to and from any other variable type.

Edge Gateway IP: String Variable either “127.0.0.1”, “localhost” or “192.21.09.63”. Recommended string length 32
Edge Gateway Port: Integer Variable always 8043
Edge Tag Path: String Variable indicating the Tag Variable Edge Path as defined in the Ignition Designer Tool. Recommended string length 128
Example: Edge Nodes/Optomation/EPIC-DC105/EPIC-022/Panel_Temperature
API Token: As configured in Ignition Edge Node-RED Module. String variable length 16
API Secret: As configured in Ignition Edge Node-RED Module (Password). String variable length 128


Tag Value [R]: Variable in PAC control strategy to be read from the configured Edge Tag Path (String Format)
Cmd statusCode: Integer Variable representing Status Code as returned by the Ignition Edge API. Refer to Ignition documentation for more details
Cmd quality : String Variable representing data quality. Useful for understanding tag quality problems associated with the transferred value. Refer to Ignition documentation for more details
Put Status In: Integer Variable representing PAC Control instruction error code. Refer to Opto22 documentation for more details.

Example chart showing a Read Edge Tag configuration example in a PAC Control debug mode watch window:

Comparing to the Node-RED debugger, you can see where all the variables are coming from.

Similarly, something like the following subroutine would write the value from a PAC Control Engine Tag to an Ignition Tag on the Edge Gateway


Edge Gateway IP: String Variable either “127.0.0.1”, “localhost” or “192.21.09.63”. Recommended string length 32
Edge Gateway Port: Integer Variable always 8043
Edge Tag Path: String Variable indicating the Tag Variable Edge Path as defined in the Ignition Designer Tool. Recommended string length 128
Example: Edge Nodes/Optomation/EPIC-DC105/EPIC-022/LED_Blue_var_Bool
API Token: As configured in Ignition Edge Node-RED Module. String variable length 16
API Secret: As configured in Ignition Edge Node-RED Module (Password). String variable length128
Tag Value [W]: Variable in PAC control strategy to be written to the configured Edge Tag Path (String Format). For boolean values you can use string values “0”,“1”, “true”, “false”
Cmd statusCode: Integer Variable representing Status Code as returned by the Ignition Edge API. Refer to Ignition documentation for more details
Cmd quality : String Variable representing data quality. Useful for understanding tag quality problems associated with the transferred value. Refer to Ignition Edge documentation for more details
Put Status In: Integer Variable representing PAC Control instruction error code. Refer to Opto22 documentation for more details.

Example chart showing a Write Edge Tag configuration example in a PAC Control debug mode watch window:

Too much work? Can’t be bothered? Just download the following subroutines as developed for PAC Control Basic 10.2. Usual terms and conditions, limitation of responsibility and disclaimers apply.

Edge Scanner - PAC Basic 10.2.zip (6.4 KB)

Big shoutout to the Optomation Systems “Guru Lounge” in Madrid, Spain who developed these subroutines for use in our EPIC projects, (especially Juan Maria), but as usual could not be bothered to document their excellent work.

And if you are looking for more information on Ignition Quality Codes, here is it

"groov on" Ain’t No Stoppin’ Us Now, (we’ve got the groov)


CodeSys programming and UI access