Yung_Craig Posted March 30, 2022 Report Posted March 30, 2022 Hello! I am looking to convert a program that uses labels to one that just uses the device (D100, M100, etc.) so that maintenance can read it better. My current solution is to put all the labels and their data types in an excel file, assign them a new address, then replace them in the program 1 by 1. This sounds very tedious, so I was wondering if anyone has any better methods I can use or if there are flaws in the method I am planning on doing. Quote
Gambit Posted March 31, 2022 Report Posted March 31, 2022 (edited) Why don't you just show both or use device display if you're using simple mode Edited March 31, 2022 by Gambit Quote
GreenMan Posted March 31, 2022 Report Posted March 31, 2022 Hi I agree with Gambit. But if you must change it than you should test the Batch replace function. Quote
Yung_Craig Posted March 31, 2022 Author Report Posted March 31, 2022 5 hours ago, Gambit said: Why don't you just show both or use device display if you're using simple mode Using the device display still doesn't show the information I would like to see, such as what kind of data type it is/which register its stored (such as if it is an L or M bit, or if its timer or a counter etc.). Our maintenance team has expressed that they can debug programs faster when they see all that immediately. Quote
Gambit Posted March 31, 2022 Report Posted March 31, 2022 Which sofware are you using and which editor ? Quote
Yung_Craig Posted March 31, 2022 Author Report Posted March 31, 2022 24 minutes ago, Gambit said: Which sofware are you using and which editor ? I am using GXWorks3 to edit the program for an iQ-R CPU. I am realizing now that you can specify a device to a variable name, and after doing that you can use your method to see both the device and the variable name. Quote
GreenMan Posted April 1, 2022 Report Posted April 1, 2022 I'm using names all the time and try not to use hardware addresses. But good names are important. Combining discribing names and prefixes are important. Here ara the prefixes I use. Quote
pturmel Posted April 1, 2022 Report Posted April 1, 2022 I despise prefixes on variable names (aka "Hungarian notation".) Unnecessary clutter if the variable name is properly descriptive. One of Microsoft's [expletives] in the programming world. 1 Quote
Crossbow Posted April 1, 2022 Report Posted April 1, 2022 I do use prefixes on mine, but only the ones below, I don't put in data type at all... This is so when I sort the variable list alphabetically they all group together... I_ for physical inputs O_ for physical outputs HMI_ for data coming from the HMI (buttons, inputs, etc) SI_ for safety inputs SO_ for safety outputs 1 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.