If you are connecting an Epic to Ignition, and you are using Pac Control on the Epic, you’ll need to set all the variables and or tables to public either read or write. Instead of trying to individually trying to set each one and before you really know which ones you’ll need, you can do this in about an hour and once it is set up, it is very easy to do.
Here is a spreadsheet that is essentially a modified version of an Opto22 tag export.
Basically all you have to do is export all the tags and save them as txt file, then open Excel and bring them in as space delimited.
Then sort all the rows by the “type” column, and then copy them to the appropriate section in this spreadsheet I uploaded. If you have more of one type you’ll have to copy the columns on the right down to accommodate.
Once you have all this done, you can copy the result on the far right column to a text file. I named mine OptoBatch.txt, and I reuse it all the time.
This file when read by a DOS batch file will either set or unset the read/write flags as per in the manual page 70. The script in this file is for setting both read and write. The timers can only have read.
The method I use to set my PC up to do this is:
- Set your environment variables to:
a. Name: Pac10.4 Variable value: “C:\Program Files (x86)\Opto22\Pac Project 10.4\Control.pro.exe”
b. Name: Control Variable value: “C:\Users\username\path to folder strategy is in\controlstrateyname.idb”
Leave the quotes on because of the spaces in the paths.
To get to the environment vars, type “env” into the windows search box.
- I put the 2 files in OptoBatchControl.zip in the desktop.
- You’ll need to edit the paths in the batch file to match your own. Right click on the batch file and select edit, otherwise it will run.
- Make sure pac control is not open.
- Paste your scripts from the description above, to OptoBatch.txt. Delete anything that is left over in there first.
- Run the batch file OptoBatchControl.bat.
- If all the paths are good, more than one command window will open.
- Next go to the control.output.csv file which should be in your project folder, if not, then the paths are wrong.
- In control.output.csv it will indicate success or failure and any error codes which can be looked up on pager 71 of the pac control user guide.