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).
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.
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).