Programming Tip: Save Time on Naming Variables Through Export/Import Mappings .CSV
This allows bulk variable name changes and manipulation through standard PC Find & Replace functions saving programmers time.
How to Export & Import CSV tag variable names for Variable MappingÂ
(edit within MS-Excel)
When adding a new device to the project, Inputs & Outputs can be named.
Â
The above are named generically based on Input A 0, for IO type, slot location (first) and IO number on the module. Users may rename the IO for the purpose of the IO or use your own convention; the description can also be modified.
Â
Note if the IO is already used within the program, it'll prompt to refactor and rename the variables saving the programmer to do a Find All and Replace All.
The list of these names (aka tags or variables) can be exported into a comma separated variable (.CSV) file. The .CSV files can then be imported or opened in Microsoft Excel and modified there. Â
To export, right-click on the device and select Export Mappings to CSV...
Â
Users may open in NotePad, WordPad or MS-Excel:
Â
This allows standard Find (Control+F) and Replace (Control+H) Windows functions for updating large mappings quickly and consistently.
These files can then be imported into the device via right-click.Â
Â
Â
11/14jh