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.