G_DeMark

Logix 5000 Bool Tags Best Practice

6 posts in this topic

I am looking for a best practice for setting up TAGs in Logix 5000.  In particular, setting up multiple BOOL type Tags.   Is it better to just create each BOOL tag as needed?  Or is it better to create an array of BOOL tags? Or should I create a DINT type tag and use the individual bits like BOOLs?  In this case they would all have the same name but a unique bit index.  Please let me know if you have any recommendations.  Thanks

Share this post


Link to post
Share on other sites

Used to I would have been in the DINT camp for efficient memory usage, but with the memory of new processors being so large I would rather have MotorStart and MotorStop as opposed to Motor.0 and Motor.1.

Share this post


Link to post
Share on other sites

Yes, that was my concern with the DINT.  I too would prefer MotorStart and MotorStop.  I wonder if there is any way to add a caption/name to the Motor.0 and Motor.1 to have the best of both worlds (memory usage and readability).  Perhaps a UDT type.  Thanks for your comments.

Edited by G_DeMark

Share this post


Link to post
Share on other sites

Look at user defined tags.  They may do what you are looking for.

Share this post


Link to post
Share on other sites

If a Logix5000 CPU, then User Defined Tags (UDTs) are the way to go.  Create a UDT with a plethora of tags, be they BOOL, or INT, or whatever.  The downside is that the processor must be stopped to add UDTs, so plan accordingly.

If a Logix500 CPU, then you are handcuffed to I/O data tags (i.e., N, B, I, O, etc.).

Share this post


Link to post
Share on other sites

I like using UDT's. I think the first one I ever made was for a motor. It has the tag (string for the HMI), description (string for the HMI), run status bit, run status for the HMI  (integer- 0= stopped, 1= running, 3= failed to start), failed to start timer, run hour timer, number of starts counter... I'm not looking at it so I'm probably leaving something out. 

 

I map io to the tag in a structured text routine

like so:

P1000.RunStat := local blah blah bla

I create the mapping for all motors, motor operated valves, fans, etc in an excel spreadsheet and then copy and paste that to the structures text file. It takes about 5 minutes to map 20 motors

The  benefit of using a IDT is that I can open the motor tag and at a glance see anything I need to and speed. Time is money

 

i can send an example if your interested but not until I get home this weekend

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