Author Topic: #Define Variable names :)  (Read 12548 times)

cdenk

  • Full Member
  • Posts: 161
  • newbie
    • View Profile
#Define Variable names :)
« on: January 27, 2013, 01:49:31 PM »
When I first saw the new feature, My thoughts went to, Wow how nice, but as I was cleaning up a 6 year old PLC program after many tweaks and additions, to change many variables and instances was a lot of work, but as I tried it on a few variables, it became evident that having the names there, made troubleshooting and understanding the program much easier. Here's what I found helped a lot to make the changes:

In the Custom Function window
1: Use "Find All" to find the an instance of the variable to be changed.
2: Edit that variable to the new name and copy it to the clipboard
3: Use "Find All" to find the next instance to be changed.
4: Since it is already selected, just paste the clipboard. If you do not want to change this instance, just do another "Find All". Note that instances in comments will be found and can be changed if desired.
5: Go back to step 3, and do it again until all instances are changed.

Hope this helps. would be nice to have a replace option, either individual and/or global.

Also the export/import feature is really neat. Since I already have a spreadsheet with the DM[]'s and their descriptions, it will be easy to add a column, and add variable names, and import after formatting. Tried importing initially with Libre (Open Office) Calc, but it only will save as CSV, and not Tab delimited.  Another suggestion, add CSV format for import. Libre had no problem with the export.