Sign in to follow this  
Followers 0
The Turkey Slayer

Tag Naming Conventions

5 posts in this topic

Just started a new job a month ago and I'm loving it. But one thing I'm wondering is what kind (if any) of naming conventions are you using for your tags, whether it be the tags in the logix platform or the SLC-500 series tags? I've kind of started with something basic. For example, all discrete input tags start with ID, discrete outputs start with OD, Analog inputs and outputs are IA and OA respectively, and tags used for operator interface start with IDOI, IAOI, ODOI, and OAOI. That way I can keep it straight what the intent for each tag is in the program. That's just something I've come up with off the top of my head, though, and I'm always looking for better ideas. So what does everyone here do, if anything?

Share this post


Link to post
Share on other sites
First of all, Congrats on the new gig! Coincidentally, my company is now having conversations on "standardization", including tag naming conventions. You'll find that any RA sample project tends to have pretty recognizable tagging conventions. Some of the conventions we are considering include the following: "rtn_Routine" or "Rxx_Routine" - helps organize routines in the RSL5K tree and at a quick glance see the program order of execution/scan "diTagname" or "aiTagname" - for hard/soft wired inputs "doTagname" or "aoTagname- for hard/soft wired outputs "bTagname" - for internal or logic generated flags dxHMITagname" - for digital inputs/outputs to from HMI objects like pushbuttons and/or status etc..... Just a serving suggestion. Like the strawberries on the box of Wheaties, but I never read the fine print. Still haven't found a single strawberry in that box yet!

Share this post


Link to post
Share on other sites
If you use the IO type for the tag you are defeating the purpose of using a tag. Personally (and this is programmer as well as industry dependent) I use the tag name of the device wired to the IO point. For instance, in the SLC500 and ML line: PT-201 for a pressure transmitter wired to an analog input PY-201 for an I/P wired to an analog output LSHH-201 for a critical high level switch wired to a discrete input P201_Run for a run control signal for a pump wired to a discrete output I also get pretty wordy in the description. Like for Tag PT-201 I'll write something like C-101 Suction Pressure (C-101 in this case is a compressor) CLX is a whole nuther subject. Naming convention is wide open. If you name it like a SLC you're going to look like a rookie CLX programmer (I despise CLX programming that looks like it was cut and pasted from a SLC). For things like pumps and valves I created user defined data types. I work in gas processing / crude oil pipelines so my pumps, generally speaking, look pretty similar logically and tag structure speaking. I also use a BOOL[32] array for my shutdown and alarm bits (note- Back when I used AB touch panels I used a DINT array to hold the alarm and shutdown bits. For IO points I'll create an alias- ESD1 Aliased to Local:4:I.Data.0 for instance. Then I use ESD1 in the program rather than typing out Local:4:I.Data.0 every time. Beware of over-aliasing your program. I made the mistake of creating an alias for every single IO point in the program when I first started using CLX. Sometimes there is IO that isn't used in the program (HMI only) or sometimes you can map IO to a tag in a structured text file. A pump might look like this (mine do, yours can be whatever you want it to be): P6400 <normal> Motor Standard P-6400 Read/Write 0 P6400.String1 STRING Standard P-6400 Read/Write P6400.String2 STRING Standard South Mainline Pump Read/Write P6400.SW INT Standard P-6400 Status Word Read/Write Decimal P6400.A BOOL Standard P-6400 Auto Mode Read/Write Decimal P6400.A_Stop BOOL Standard P-6400 Auto Stop Read/Write Decimal P6400.A_Start BOOL Standard P-6400 Auto Start Read/Write Decimal P6400.Stop_I BOOL Standard P-6400 Stop Input Read/Write Decimal P6400.Start_I BOOL Standard P-6400 Start Input Read/Write Decimal P6400.HMIStop BOOL Standard P-6400 Stop Control from HMI Read/Write Decimal P6400.HMIStart BOOL Standard P-6400 Start Control from HMI Read/Write Decimal P6400.RunStat BOOL Standard P-6400 Run Status Read/Write Decimal P6400.Stop BOOL Standard P-6400 Motor Stop Read/Write Decimal P6400.Run BOOL Standard P-6400 Run Motor Read/Write Decimal P6400.AStop_OS BOOL Standard P-6400 Auto Stop One Shot Read/Write Decimal P6400.AStart_OS BOOL Standard P-6400 Auto Start One Shot Read/Write Decimal P6400.FStart_OS BOOL Standard P-6400 Field Start One Shot Read/Write Decimal P6400.HStart_OS BOOL Standard P-6400 HMI Start One Shot Read/Write Decimal P6400.SOS BOOL Standard P-6400 Start Counter One Shot Read/Write Decimal P6400.RH DINT Standard P-6400 Run Hours Read/Write Decimal P6400.S DINT Standard P-6400 Number of Starts Read/Write Decimal P6400.FailTMR TIMER Standard P-6400 Fail to Start Timer Read/Write P6400.SDTimer TIMER Standard P-6400 Low Suction Pressure Shutdown Delay Timer Read/Write P6400.VSD1Timer TIMER Standard P-6400 Motor Outboard Bearing Vibration Shutdown Delay Timer Read/Write P6400.VSD2Timer TIMER Standard P-6400 Motor Inboard Bearing Vibration Shutdown Delay Timer Read/Write P6400.VSD3Timer TIMER Standard P-6400 Pump Inboard Bearing Vibration Shutdown Delay Timer Read/Write P6400.VSD4Timer TIMER Standard P-6400 Pump Middle Bearing Vibration Shutdown Delay Timer Read/Write P6400.VSD5Timer TIMER Standard P-6400 Pump Outboard Bearing Vibration Shutdown Delay Timer Read/Write P6400.RMT TIMER Standard P-6400 Run Minute Timer Read/Write P6400.RMC COUNTER Standard P-6400 Run Minute Counter Read/Write and it's derived from the UDT called Motor (don't ask me why it's called motor... I started that years ago and once I "infected" our SCADA system with it I couldn't change it to pump or something that makes more sense because it exists in so many locations in the graphic. So- be careful what you call things.) String1 STRING Tag Read/Write 1 0 String2 STRING Description Read/Write 2 0 SW INT Decimal Status Word Read/Write 3 0 A BOOL Decimal Auto Mode Read/Write 5 0 A_Stop BOOL Decimal Auto Stop Read/Write 6 0 A_Start BOOL Decimal Auto Start Read/Write 7 0 Stop_I BOOL Decimal Stop Input Read/Write 8 0 Start_I BOOL Decimal Start Input Read/Write 9 0 HMIStop BOOL Decimal Stop Control from HMI Read/Write 10 0 HMIStart BOOL Decimal Start Control from HMI Read/Write 11 0 RunStat BOOL Decimal Run Status Read/Write 12 0 Stop BOOL Decimal Motor Stop Read/Write 14 0 Run BOOL Decimal Run Motor Read/Write 15 0 AStop_OS BOOL Decimal Auto Stop One Shot Read/Write 16 0 AStart_OS BOOL Decimal Auto Start One Shot Read/Write 17 0 FStart_OS BOOL Decimal Field Start One Shot Read/Write 18 0 HStart_OS BOOL Decimal HMI Start One Shot Read/Write 19 0 SOS BOOL Decimal Start Counter One Shot Read/Write 20 0 RH DINT Decimal Run Hours Read/Write 21 0 S DINT Decimal Number of Starts Read/Write 22 0 FailTMR TIMER Fail to Start Timer Read/Write 23 0 SDTimer TIMER Low Suction Pressure Shutdown Delay Timer Read/Write 24 0 VSD1Timer TIMER Motor Outboard Bearing Vibration Shutdown Delay Timer Read/Write 25 0 VSD2Timer TIMER Motor Inboard Bearing Vibration Shutdown Delay Timer Read/Write 26 0 VSD3Timer TIMER Pump Inboard Bearing Vibration Shutdown Delay Timer Read/Write 27 0 VSD4Timer TIMER Pump Middle Bearing Vibration Shutdown Delay Timer Read/Write 28 0 VSD5Timer TIMER Pump Outboard Bearing Vibration Shutdown Delay Timer Read/Write 29 0 RMT TIMER Run Minute Timer Read/Write 30 0 RMC COUNTER Run Minute Counter Read/Write 31 0 Another place that I would fix if I could is calling the SD Delay timers toward the bottom of the UDT something else other than VSD. I started calling them VSD because the first iteration called for Vibration SD Delays. I use them for other things sometimes so TMR1 thru TMR5 or T1 thru T5 would make more sense. Live and learn. I scale my analogs on the card and use a loop to call them for alarming. And I run the analog ins through an alarm block. So my analog tag structure looks like this: Analog <normal> Analog[110] Standard Read/Write 0 Analog[0] Analog Standard PT-6001 Read/Write Analog[0].String1 STRING Standard PT-6001 Read/Write Analog[0].String2 STRING Standard Mainline Pressure Read/Write Analog[0].PV REAL Standard PT-6001 Scaled Process Variable Read/Write Float Analog[0].AHHA REAL Standard PT-6001 High High Alarm Setpoint Read/Write Float Analog[0].AHA REAL Standard PT-6001 High Alarm Setpoint Read/Write Float Analog[0].ALA REAL Standard PT-6001 Low Alarm Setpoint Read/Write Float Analog[0].ALLA REAL Standard PT-6001 Low Low Alarm Setpoint Read/Write Float Analog[0].Deadband REAL Standard PT-6001 Alarm Deadband Read/Write Float Analog[0].HH_Limit BOOL Standard PT-6001 High High Alarm Bit Read/Write Decimal Analog[0].H_Limit BOOL Standard PT-6001 High Alarm Bit Read/Write Decimal Analog[0].L_Limit BOOL Standard PT-6001 Low Alarm Bit Read/Write Decimal Analog[0].LL_Limit BOOL Standard PT-6001 Low Low Alarm Bit Read/Write Decimal Analog[0].MinEU REAL Standard PT-6001 Transmitter LRV for HMI Read/Write Float Analog[0].MaxEU REAL Standard PT-6001 Transmitter URV for HMI Read/Write Float Analog[0].EnableAlarmHH BOOL Standard PT-6001 Enable HH Alarm HMI Visibility Read/Write Decimal Analog[0].EnableAlarmH BOOL Standard PT-6001 Enable H Alarm HMI Visibility Read/Write Decimal Analog[0].EnableAlarmL BOOL Standard PT-6001 Enable L Alarm HMI Visibility Read/Write Decimal Analog[0].EnableAlarmLL BOOL Standard PT-6001 Enable LL Alarm HMI Visibility Read/Write Decimal Analog[0].Status DINT Standard PT-6001 Alarm Block Status Read/Write Hex which comes from a UDT called Analog that looks like this: String1 STRING Tag Read/Write 1 0 String2 STRING Description Read/Write 2 0 PV REAL Float Scaled Process Variable Read/Write 3 0 AHHA REAL Float High High Alarm Setpoint Read/Write 4 0 AHA REAL Float High Alarm Setpoint Read/Write 5 0 ALA REAL Float Low Alarm Setpoint Read/Write 6 0 ALLA REAL Float Low Low Alarm Setpoint Read/Write 7 0 Deadband REAL Float Alarm Deadband Read/Write 8 0 HH_Limit BOOL Decimal High High Alarm Bit Read/Write 10 0 H_Limit BOOL Decimal High Alarm Bit Read/Write 11 0 L_Limit BOOL Decimal Low Alarm Bit Read/Write 12 0 LL_Limit BOOL Decimal Low Low Alarm Bit Read/Write 13 0 MinEU REAL Float Transmitter LRV for HMI Read/Write 14 0 MaxEU REAL Float Transmitter URV for HMI Read/Write 15 0 EnableAlarmHH BOOL Decimal Enable HH Alarm Read/Write 17 0 EnableAlarmH BOOL Decimal Enable H Alarm Read/Write 18 0 EnableAlarmL BOOL Decimal Enable L Alarm Read/Write 19 0 EnableAlarmLL BOOL Decimal Enable LL Alarm Read/Write 20 0 Status DINT Hex Alarm Block Status Read/Write 21 0 The bottom line is that, for the CLX, you have an opportunity to create a nice clean program with routines that you can reuse if you think your tag structure out. Don't forget to make use of tag import / export to CSV in SLC and CLX. It's a lot easier (for me anyway) to document in Excel using the CSV import / export feature than in CLX. For some things anyway. And- There are no absolutes here. This is what has worked for me for a long time. Others may have a different way and that's fine.

Share this post


Link to post
Share on other sites
Thanks for the replies! I use User-Defined Data Types when the application calls for it, but sometimes they're so simple where there isn't a group of identical or similar equipment or cells and it wouldn't make much sense. My first job in fact was a customer who replaced an old Texas Instruments PLC from the 80's with a Compact Logix L33ER, which I admit was massive, massive overkill for the application. It was just level management for three tanks. A Micro830 would have done the job (which I wouldn't recommend, the only way I'm using the Micro800 series is if I don't have a choice), but because they bought another piece of equipment with an L32E, they decided all of the processors in their facility were going to switch to the L3x series.

Share this post


Link to post
Share on other sites
These days I get to pick my PLC hardware so I feel like I'm pretty lucky. In the integrator days I just dove in and learned whatever I needed to learn so I could make some dinero Even so, I still force myself to use an ML1100 when the Compact Logix or CLX is way too much. But, IO cost wise, it's not a lot more to upscale to Compact Logix from ML1100. What gets you is processor cost and panel space, which translates to increased cost. For instance, I switched from doing what we call an interconnect PLC from being an ML1100 and being tight on IO to a Compact Logix. The cost increase was around $2k. Some of the savings was from going from a PV600 to a little Nematron display but the programming time dropped considerably because the stations are all cookie cutter. I export docs on a previous program (you can also import / export docs in the SLC line but it's clunky because of the way the CSV comes out), search and replace in excel, and import into the new program (based on the old one). There are some string tags that have to be manually corrected but other than that it's pretty fast. BTW- the string tags are used in my HMI graphic so that if I change or use a different tag and/or description in an analog point, motor, or valve in the program, the change propagates out to the HMI graphic automatically. The graphic links to the strings so I never touch the graphic for changes like that. Same with ranges. Time is money, time saved is real money. I like keeping my hand in the SLC game just in case... Don't tell anyone but sometimes I'll open up my S7 software or Direct Logic software and mimic a routine that I have built in CLX if it's a little different from "mainstream programming".

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0