hboyer90

Processor or Program Name Tag RSLogix 5000

11 posts in this topic

Hey guys, this is probably a stupid question so I apologize if it is, but I have a PanelView Plus 6 700 and a CompactLogix L36ERM on one of my machines at my plant.  We have several different molds that run in this machine, so we have 5-7 different PLC programs that can possibly run in this processor, depending on which mold is in.  I'm planning to go to a single program with recipes, but I haven't had the time to set that up yet.  So we use the PanelView for troubleshooting, and adjusting process paramters.  On the main screen in the PanelView I have the time/date and also the program name.  What I have been doing is just creating a string tag in RSLogix 5000 that is the program/processor name (we use the same name for the processor and program) and then on my PanelView I just create a string display that looks at the string tag name in the processor.  That way anytime a mold is changed over and the PLC program is downloaded, the PanelView displays the correct program/processor name.

 

Now this is all fine and dandy and works as long as if a new program is created, we remember to change the string tag to the name of the new program, we often run new sample parts and what we do is rename an existing program that has similar logic and save it as a new program name.  The problem comes up because if somebody copies an existing program and makes a new one, the string tag is still going to say the name of the old PLC program.  Now if we only had one or two or even 5 machines, it would be simple enough to just remember to change that string tag.  Our, or I should say MY problem is that we have approximately 40ish machines in our plant, and I can't always remember to change that string tag every time we create a new program.  I should say that I have been, but there are times that I may forget.

My question is this, is there any way that in FactoryTalk View ME Studio to have a string display the name of the processor or the name of the PLC program automatically without having to manually enter the name into the string tag that I created in RSLogix 5000?  Like is there a system tag somewhere that has the name of the processor or the name of the program?

 

That was way more explaining then probably necessary.  It's early and I've had way too much coffee haha.

 

Thanks guys.

Share this post


Link to post
Share on other sites

I don't know if there is a GSV that will return a program name but if there is that might work

What if you created a string tag in each program tag section and used that?

Im trying to read and reply to this on an iPhone so I probably missed some detail on your post. I'll be traveling so I probably won't get back here before someone makes the right suggestion to help you

Share this post


Link to post
Share on other sites

Yeah, I already have created a string tag, I just need to make sure i update it with the correct program name every time a new program is created.  Looking for a way to automate that in case I, or a coworker accidentally forgets.

 

Thanks 

Share this post


Link to post
Share on other sites

I can't say that I've seen the function in GSV (get system variable) but I'd be surprised if you couldn't read the program name with a GSV instruction and dump that into a tag.

Share this post


Link to post
Share on other sites

I have never done this.  But would the GSV work for you?

Share this post


Link to post
Share on other sites

I don't have a controller in front of me right now but have you tried...?

GSV

Class Name:  Controller

Attribute Name:  Name

Dest:  My_ControllerName_String_Tag

Share this post


Link to post
Share on other sites
Just now, IO_Rack said:

I don't have a controller in front of me right now but have you tried...?

GSV

Class Name:  Controller

Attribute Name:  Name

Dest:  My_ControllerName_String_Tag

I have not tired this, but I will be trying it right now.  I knew that there must be some way to use the GSV to get the controller or program name.  I'll give it a try, thanks.

Share this post


Link to post
Share on other sites
35 minutes ago, IO_Rack said:

I don't have a controller in front of me right now but have you tried...?

GSV

Class Name:  Controller

Attribute Name:  Name

Dest:  My_ControllerName_String_Tag

This worked perfectly, thank you.

 

 

PROGRAM NAME STRING.JPG

Share this post


Link to post
Share on other sites

GSV is one of those commands that is under used. I know it was for me for a long time. 

 

Just curious, why are you using a JSR at the end of routine 2?

Edited by Michael Lloyd

Share this post


Link to post
Share on other sites
44 minutes ago, Michael Lloyd said:

GSV is one of those commands that is under used. I know it was for me for a long time. 

 

Just curious, why are you using a JSR at the end of routine 2?

Well, we separate some of the different sequences in our process into different subroutines.  We have one that handles keeping the molten lead/furnace at the right temp, one is the main routine that handles the actual shot and some safety stuff, one is for monitoring the tonnage that we lock up the mold at, and the other is for all of the data that we collect every time a shot of parts are made.  It's easier than searching through one main routine to find things.

I've always been under the impression that if you have multiple subroutines that you need to use a "JSR at the end of your main routine and a "Return" instruction at the end of the other subroutines.  Is this incorrect?  Will it still scan all of the other subroutines if I don't have the "JSR" and "Return" instructions in there?  I am still fairly new, so any advice is greatly appreciated.

 

Thanks

Share this post


Link to post
Share on other sites

I'm a huge fan of subroutines. I think they make a tech's life easier too. I started with a Siemens TI-505 and there were no subroutines. Some of the programs were 1,000 rungs (and more). With some effort the program could be written with some semblance of order to it but more often than not someone would come in behind the programmer and drop a pump or valve in "out of synch". 

Apparently I was one cup of coffee short of a fully operational brain this morning. The JSR is needed. The Return isn't. Well... maybe I had better say that I don't use them rather than they aren't needed. The routine exits at the end and returns to the next JSR. It's been a while since I wrote any Siemens S7 programs. They may need a return. 

To further clarify, I stack all of my JSR's in the main routine. So in the case of your program I'd have a JSR for 3, 4, and 8. If I wanted 8 to run first I would just put it on the top of the stack of JSR's

 

Edited by Michael Lloyd

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