Copying routine

Join Date
Nov 2023
Location
Detroit, MI
Posts
5
Hi All,

I am looking to copy and paste a routine. I know this has to be done offline. My question is, when I go back online, these tags are going to be shared with the routine that I copied. Will this effect anything? I will not JSR the new copied routine in the MainRoutine until I have all of the tags changed. I just don't want there to be any duplicate errors that could effect the routine that is currently running.

I am doing this in preparation for a new piece of equipment we are adding that will be using the same logic, but will need to assign new tag names overtime.
 
Might help if you said what software you are using... sounds like it could be Logix/Studio 5000, but who knows?

Assuming it is:

1) While you can't technically paste a routine while online, assuming you are in remote run you *can* either export the routine and import it as a new routine (which would let you change the tags as you import) or you can create a blank routine and then copy/paste the logic.

2) As long as the logic is not run (which not including a JSR would accomplish), it should not have any effect. When changing tags, make sure you are replacing the tag, not renaming it.
 
not familiar with 5000 that much.
if this is a copy and paste, this might help.
develop your logic and save the program.
open the program and save under a dummy name
then go into your routine and rename the tags for your new routine.
copy the logic and paste into the original program.
you will then have to create the new tags in the program by defining them.
james
 
I am looking to copy and paste a routine.

You can easily EXPORT a routine, with both the logic and the tags, and then IMPORT the routine, either offline or back into your online program.

When you do the import, you will have the ability to substitute tags, even creating new tags if the name you are picking doesn't exist.

Furthermore, when importing, you'll have the ability to Finalize all the edits, or merely import them in as edited rungs.

This can be (with proper care) a way of getting around the fact that 5000 does not allow (quite correctly) search/replace on online code.

You seem properly cautious, not wanting to commit code without having verified it.

My question is, when I go back online, these tags are going to be shared with the routine that I copied. Will this effect anything?

Not the way you're planning on doing it. Even with the import method above, the tags will come in, but not the tag values. Since the code won't be live, even "duplicate destructive bits" that you may get warned about won't affect the existing code when its in code that isn't being scanned (since you won't be having a JSR).

One caveat to that last sentence: OTEs, TONs and ONS's in your new unscanned code will reset their bits on PLC powerup. That shouldn't bother you, since they'd also be reset by first scan on the original logic as well. But your sense of caution deserves a complete answer.
 
I would export it, edit the the file changing the names to protect the innocent, then import back in. That way the valves of the previous program will be the same.
 
The Export / Import option is what i use. The Find / Replace is awesome (esp if you planned it ahead of time). You get to review all your tags and name changes as well.
Best thing is that can be done online.
ANNNNDDDD when doing it online, you can have the new routine as pending, so you can review, etc prior to accepting

If you want more granularity, then as JaxGTO said, edit it the exported file.
 

Similar Topics

How do I copy routines from one acd project file to another. I have some routines and program which i would like to copy to another rsl5k project...
Replies
4
Views
8,291
I'm not super familiar with the Micrologix line of processors, but I am pretty familiar with RSLogix 500. I'm trying to simply copy a string to...
Replies
4
Views
308
Hello everyone, friends. I need help with something related to SCL. In a FB, I need to copy the value in the DB to the DB at another address. I...
Replies
3
Views
1,388
Hello all! Is it possible to COP a SINT array to a UDT structured the same as a SINT array, except all BOOL bits? I have a module that has an...
Replies
5
Views
3,176
Hello, looking for a way to capture and display the accumulated time for a retentive timer in rslogix 500 on a microligix 1400 plc example move...
Replies
3
Views
1,652
Back
Top Bottom