Anyway to Export / Import Project Database (Variables /Tags)


Is there a way to do this?

I don’t mean exporting/importing charts. I want to be able to create tags off-line and import them in to an existing or a new project.

Anyway to do that with PacControl?



BTW, I found this by typing this into Google “excel”

Short answer is, no, not yet.


Thanks Ben.

I saw from the link that this question was asked back in 2012. It is almost 2016 and Opto22 still does not have this basic functionality. Every single piece of control Automation software that I have come across in the past had this basic feature. Does OPTO22’s software group have any plans to implement this option in the near future? Or at the very least, create some sort of a utility that can do this? I am surprised that lot more people are not SCREAMING for this or that Opto22 has not made this a priority.


Could you help us out here by giving a little more detail about your needs/expectations? (Perhaps an example of a use case?) We do let you Import/Export your I/O Units, by way of the (text) OTG, have you looked at those files at all?


Hi Skyfox… I second what Mary said… It get’s requested about once every 3 to 5 years, so its hard for us to build a case for the engineers to spend time building it…
Help us help you, what are your needs and expectations?


Well this is sooner than the 3 years, but thought i would take a crack at this anyways. I think the reason for this is that people find out they can’t do this and just deal with it. But someone gets frustrated enough that they search for help only to come up short. Or like me, finds a forum referring to the exact topic I need help with and finds posts like these. I would think that the topic name is pretty self explanatory.

We have a case where we have to enter a bunch of variables that are identical in size but have different names. i.e. 80 lift stations. It appears that the only way to achieve this is to create each variable one at a time. Another way is to open another project, create the variables, reference them in a block, then copy that block to your working project. This however doesn’t bring over the persistent attribute, nor does it show in the variable list until you save, close then reopen project (this was 9.4 but shows in list in 9.6).

In another example, Rockwell software has allowed this functionality ever since i have started with PLCs (2003). The software exports the tags into a CSV file. You can then open in excel or notepad. You copy an existing tag, paste it, then modify tag name. This is where excel shines as you can “fill” cells with auto-number increment.

I understand that Opto likes to keep it costs down, especially on software development, and its hard to keep up with companies like Rockwell, Siemens, GE, etc… that have near unlimited resources. But this functionality is a basic tool to boost productivity when creating code.

If further explanation or clarification on what exporting/importing tags (variables) is, i can make a short video using Rockwell software showing exporting, modifying, then importing.

I have looked at the OTG referenced by mstjohn, but this is only good for IO points.


There is a command line argument in 9.6 that you can pass a file with variable names and types and they will be added to the strategy - Look for “Using PAC Control’s Command-Line Interface Tool”. Prior to having this, I wrote an autohotkey script that will take a list of variables from a csv file and add them to the open strategy.

See Add Vars via Command Line Interface and Teamwork Strategies

I do think it would be nice to be able to export all your variables to a csv, be able to edit them and re-import them built-in, maybe someday…


I totally agree with you Mark, do not understand why some of the most important features get ignored while some nice but not so important features get added…I had been suggesting about this one back at least 12 years ago. Beno, sometimes people just get tired of asking so they drop it.

However, they did go ahead an put this in about a year or so ago. It works fine once you’ve gotten used to it. You can make a batch file to load the csv file you create or you can just save a CLI text and copy it to your command prompt. Once it is in the command prompt, you can just keep using it with up arrow. Here is the command prompt text I used as an example, “C:\Users\barrett\Documents\Peco Facet\ Control\Cold Room.idb” /f “C:\Users\barrett\Documents\Peco Facet\CLI_Batch.txt”. I put this in a readme notepad file so I can reuse it.

I named the CSV file “CLI_Batch.txt” and I opened an Excel sheet and created the names, then using the text concatenation in Excel I added all the text pieces together to get "/av UPTMR_VAR;Load_LoadValveTimer;“Valve Operation Alarm Timer”;ON_RUN;0 for each line of each variable I need. Then I copy and paste into the batch file and run the cli. For the most part, you only have to modify this line for the various variable types.

To search for this, search “cli” in the users manual. It’s kinda like they unintentionally buried it. If you search for “command” or “line” you will not find it…the docs cover it pretty well. Look in the docs to determine what changes you need to make for the specific variable type.

Btw, in case you are not aware, yes I asked for this too years ago but I guess everyone else just started using this method for adding large numbers of IO variables. Add a few IO tags of the type you need, and then export the tag base by right clicking and pick “Export…” on “I/O Units” in the tree. Next, open that file with Excel and parse it with headers and commas. Now you have a file with all the OTG tags in it based on the rack they reside on.

Edit this file by adding all the names you need while maintaining the column data that is there. It is easiest to do this one type at a time, i.e; discreet in, discreet out, etc.
Keep in mind you have to keep all the module channel numbers correct and the module position correct based on the module type 4ch, 8ch, etc. The point number sequence doesn’t seem to matter because I think it overwrites them anyway. Also, the sequence number is treated by Pac Control as 4 point modules or something, not sure what the issue there is, but doesn’t seem to matter.

Once you are done with the edit, then save the excel file as a CSV file, if not it will not import. Next, change the file name to *.OTG, then import it just like you exported it. I typically save the strategy and the OTG file in case something gets hosed up, I can delete it and start over again without starting over from beginning. It sounds like a real headache but it’s not too bad and you can add a rack full of 32 point modules in an hour instead of all day. The other major reason to do this is spelling accuracy and the ability to create a series of scripts for loading each variable from the RackX_fTable you use to get the rack. Unless I am going to use tables only, I do this at top of Main Loop.

Using the aforementioned method you can also use the RackX_fTable to set up a write by exception for the whole strategy. To do this, only script the input vars at the top of strategy, then use the output vars in the process throughout, then at the end of the chart, script the output vars with the RackX_fTable values and compare each one to see if you need to write it. Once you create the script ON ONE LINE, it will be easy to do all of them. By using this method, the strategy only has to write the vars that have changed and it does all the compare internally, so it is still faster then writing the whole block of outputs every time.


Philip and Barret, thank you for this. It is cumbersome, but works. Thanks again.