How to map/move AB/Siemens PLC tags to PAC Control tags via Expression tags in Ignition Edge

UPDATE
July 2024. This method only applies to Ignition v7 (Which is currently EOL and will be sunset at some future date).

Overview.
If you need to perform some calculations or do some other data manipulation on an AB/Siemens PLC tag and you don’t wish to change the running program in the PLC, you may opt to map or move that tag value to a PAC Control variable so that you can freely perform the required operation.
Also it’s much easier to work with PAC Control tags in Node-RED than with Allan Bradly or Siemens tags via Ignition Edge and then Node-RED. (For example, moving an AB tag into a database).

In short.
What we are going to do is to use an Ignition Expression tag to map or move any Ignition Edge variable value to a variable in the PAC Control engine.

Step by step how to;
The first thing to do is to create the required variable(s) in PAC Control.

You will need to do this for each tag you wish to map from your AB PLC. The data type should match each type of tag you are going to map.

Important! Save and download the strategy.

Now start both Ignition Edge and Designer via groov Manage (if you have not already done so).

Log into Ignition Edge.
Since we have just added some new tags, we need to ensure that we restart the driver to pick up those tags.

Now launch Designer by clicking on the ‘Launch Designer’ button in the top right of the browser window.
(If you don’t have Java installed, you will be prompted to install it before the designer will load).

First, we need to add our new PAC Control variables to the tag tree.
Expand the tag tree to show the tags as they currently are structured.

Next, open the OPC Panel View to show the controller tags.
Click on View, Panels, then OPC Browser.

Expand the tag tree down to your EPIC controller inside the small popup window. When you find the tag you want included, left click, drag and drop the tag on the edge node folder.

This will now add the tag to the Edge Nodes folder structure.

Now that you have all the tags you need / want to map from the PLC to EPIC…
Expand your tags to view your AB tags and groov EPIC tags.

From the top of the Data Types tag tree just above your edge device, right click and choose new expression tag.

Set the name of the expression tag and the data type.

First, from the menu on the left select ‘Expression’. Then on the right, click on the tag icon to open a dialog box that allows you to find the AB tag you want to map.

Drill down the tag browser to find the Allen Bradley tag you want to map to PAC Control.

Once you have highlighted the tag, click Ok to add it to the expression.

Next, enable the checkbox to write the value back to an OPC item, then click on the OPC Browser icon to select the PAC Control tag you want to write the AB tag to.

Drill down to find your PAC Control variable that you want the value of the AB PLC tag to be written to. Click Ok on the chose OPC item dialog box.

Click Ok in the tag editor and your AB tag is now being written to the PAC Control tag.

(It’s just about impossible to get a screenshot of when they are all the same value).

Once the tag is in PAC Control you can do the operation and then perhaps display the new value in groov, or simply use Node-RED to send the value to a database etc.

Note.
By default the scan rate is once a second.

You can change this by clicking on the top of the tag tree, then click on edit scan classes.

This will open a new dialog box.

From here you can adjust the scan rate. Best practices dictates that there is little to be gained by going faster than 250ms. (Keep in mind that groov View scan rate is once a second).

Please post and let us know if you use this in an application.
(Or if you find the instructions unclear in any step along the way).

4 Likes

Can we do similarly with other Ignition Edge configured devices (like Modbus or Siemens) to PAC control variable directly?

Yes.
Simply pick the tag you want from the device you want in the first stage.

Hi! I have a question how to make this work using the latest version of Ignition edge?
Can’t seem to find the write value back to OPC item box on the latest version of ignition edge.

Welcome to the forums!

Please let us know what version you are running.
I am running the latest release for EPIC and the check mark is there, so clearly you are using something other than 7.9.12?

Can I program a PLC output from pac control ?, with this method you can only read data

Yes of course. Just swap the order of the tags, it really is that simple.
You can read or write, just by setting the order of the tags.

One update to the original post. There can be issues with modifying a PAC Control strategy and downloading it, causing the SNAP Driver in Ignition to be unable to read in tag data. To avoid this, please use a try() statement in your expression tags.

I follow through the steps outlined above and all three tags update together. Then if I stop and then restart the strategy the PAC tag stops getting the value from the Expression tag. If I go into the expression tag and click OK the PAC tag then starts updating. I tried adding the “try” command from the post above but that didn’t seem to make a difference. I just updated the Groov Epic firmware to 2.0.2-b.139. Does anyone know a resolution to this? Thank you.

There is still an issue is with the Ignition Module itself. Development is working on a fix. For now, if you stop the strategy for any reason, you will be best suited to go and restart the module in Ignition after.

Thank you for the prompt response! Thank you for the advice on restarting the module as it is easier that going into each tag. It appears on powerup of the Groov it starts the autorun of the PAC strategy before starting the Ignition Edge server so that the tags to populate correctly on powerup. Is this something that I can count on happening consistently?

Yes, the PAC Engine starts before Ignition in boot order.

1 Like