I have code in RSLogix 5000 that needs to be repeated, just a few rungs that need to be repeated just with different tags.
Does anybody know how to use excel to write repetitive code?
[?]: Creating Repetitive code in excel for RSLogix 5000
-
- Posts: 3
- Joined: Wed Jun 22, 2011 3:38 pm
-
- Posts: 121
- Joined: Tue Apr 12, 2011 1:44 pm
Re: [?]: Creating Repetitive code in excel for RSLogix 5000
Use some formulas to build up the string required then copy/paste specials values only to remove the formulas.
Otherwise use some VBA coding.
If you provide an example probably can do the formula for you.
Otherwise use some VBA coding.
If you provide an example probably can do the formula for you.
-
- Posts: 3
- Joined: Wed Jun 22, 2011 3:38 pm
Re: [?]: Creating Repetitive code in excel for RSLogix 5000
what kind of example do you want? id really appreciate the help....
I have my code in rsLogix 5000 that you could take a look at and we can take a few rungs to use as an example...
I was lookin online the other day through several different forums and I noticed one article that had information about what I needed:
I have my code in rsLogix 5000 that you could take a look at and we can take a few rungs to use as an example...
I was lookin online the other day through several different forums and I noticed one article that had information about what I needed:
hopefully this is close to what you were thinking of doing....but either way let me know what kind of example you want and I will provide the necessary files. thank you!"The best trick though is to use Excel to write repetitive code.
In AI or RS logix copy a rung to a library file, or .pc5 in RSlogix.
This means copy the rung's numonics to a delimited text file.
open that file with Excel and use tools like copy, paste, fill, and even custom macros to develope it. Save it as a delimited file and paste it back into the logic."
-
- Posts: 121
- Joined: Tue Apr 12, 2011 1:44 pm
Re: [?]: Creating Repetitive code in excel for RSLogix 5000
Yes thats what I was thinking
If you provide the rungs (delimited text) you want repeated with different i/o or memory bits
can guide you through excel part.
I have used this to generate valve control blocks (100+) and motor control blocks (50+) quickly which would have taken me 3 to 4 days loading in took only 3 hours.
If you provide the rungs (delimited text) you want repeated with different i/o or memory bits
can guide you through excel part.
I have used this to generate valve control blocks (100+) and motor control blocks (50+) quickly which would have taken me 3 to 4 days loading in took only 3 hours.
-
- Posts: 3
- Joined: Wed Jun 22, 2011 3:38 pm
Re: [?]: Creating Repetitive code in excel for RSLogix 5000
Delimited text:
The first group of lines are the rungs, and the second are the tags I would like to change them with....any questions let me know.....I really appreciate your help
text
Show
XIC(_201_Winder_Estops:1:I.ConnectionFaulted),XIC(_201_Winder_Estops:2:I.ConnectionFaulted),XIC(_201_Winder_Estops:3:I.ConnectionFaulted),XIC(_201_Winder_Estops:4:I.ConnectionFaulted),XIC(_201_Winder_Estops:5:I.ConnectionFaulted),XIC(_201_Winder_Estops:6:I.ConnectionFaulted),XIC(_201_Winder_Estops:7:I.ConnectionFaulted),XIC(_201_Winder_Estops:8:I.ConnectionFaulted),XIC(_201_Winder_Estops:9:I.ConnectionFaulted),OTE(_201_Winder_Estops_ConnectionFault);
XIC _205_Winder_Drives:1:I.ConnectionFaulted ,XIC _205_Winder_Drives:2:I.ConnectionFaulted ,XIC _205_Winder_Drives:3:I.ConnectionFaulted, XIC _205_Winder_Drives:4:I.ConnectionFaulted, XIC _205_Winder_Drives:5:I.ConnectionFaulted ,XIC _205_Winder_Drives:6:I.ConnectionFaulted ,XIC _205_Winder_Drives:7:I.ConnectionFaulted ,XIC _205_Winder_Drives:8:I.ConnectionFaulted ,XIC _205_Winder_Drives:9:I.ConnectionFaulted ,XIC _205_Winder_Drives:10:I.ConnectionFaulted ,XIC _205_Winder_Drives:11:I.ConnectionFaulted ,OTE _205_Winder_Drives_ConnectionFault
BST XIC _201_Winder_Estops_ConnectionFault, NXB XIC _205_Winder_Drives_ConnectionFault ,BND OTL Winder_ConnectionFault
XIC safety_Winder_FaultReset, ONS safety_FaultResetOns, XIO _201_Winder_Estops_ConnectionFault, XIO _205_Winder_Drives_ConnectionFault, OTU Winder_ConnectionFault
_101_Line_EStops:1:I
_101_Line_EStops:1:O
_101_Line_EStops:2:I
_101_Line_EStops:2:O
_101_Line_EStops:3:I
_101_Line_EStops:3:O
_101_Line_EStops:4:I
_101_Line_EStops:4:O
_101_Line_EStops:5:I
_101_Line_EStops:5:O
_101_Line_EStops:6:I
_101_Line_EStops:6:O
_101_Line_EStops:7:I
_101_Line_EStops:7:O
_101_Line_EStops:8:I
_101_Line_EStops:8:O
_101_Line_EStops:9:I
_101_Line_EStops:9:O
_101_Line_EStops:I
_101_Line_EStops:O
_105_Line_Drives:1:I
_105_Line_Drives:1:O
_105_Line_Drives:2:I
_105_Line_Drives:2:O
_105_Line_Drives:3:I
_105_Line_Drives:3:O
_105_Line_Drives:4:I
_105_Line_Drives:4:O
_105_Line_Drives:5:I
_105_Line_Drives:5:O
_105_Line_Drives:6:I
_105_Line_Drives:6:O
_105_Line_Drives:7:I
_105_Line_Drives:7:O
_105_Line_Drives:8:I
_105_Line_Drives:8:O
_105_Line_Drives:9:I
_105_Line_Drives:9:O
_105_Line_Drives:I
_105_Line_Drives:O
_101_Line_Estops_ConnectionFault
_105_Line_Drives_ConnectionFault
XIC _205_Winder_Drives:1:I.ConnectionFaulted ,XIC _205_Winder_Drives:2:I.ConnectionFaulted ,XIC _205_Winder_Drives:3:I.ConnectionFaulted, XIC _205_Winder_Drives:4:I.ConnectionFaulted, XIC _205_Winder_Drives:5:I.ConnectionFaulted ,XIC _205_Winder_Drives:6:I.ConnectionFaulted ,XIC _205_Winder_Drives:7:I.ConnectionFaulted ,XIC _205_Winder_Drives:8:I.ConnectionFaulted ,XIC _205_Winder_Drives:9:I.ConnectionFaulted ,XIC _205_Winder_Drives:10:I.ConnectionFaulted ,XIC _205_Winder_Drives:11:I.ConnectionFaulted ,OTE _205_Winder_Drives_ConnectionFault
BST XIC _201_Winder_Estops_ConnectionFault, NXB XIC _205_Winder_Drives_ConnectionFault ,BND OTL Winder_ConnectionFault
XIC safety_Winder_FaultReset, ONS safety_FaultResetOns, XIO _201_Winder_Estops_ConnectionFault, XIO _205_Winder_Drives_ConnectionFault, OTU Winder_ConnectionFault
_101_Line_EStops:1:I
_101_Line_EStops:1:O
_101_Line_EStops:2:I
_101_Line_EStops:2:O
_101_Line_EStops:3:I
_101_Line_EStops:3:O
_101_Line_EStops:4:I
_101_Line_EStops:4:O
_101_Line_EStops:5:I
_101_Line_EStops:5:O
_101_Line_EStops:6:I
_101_Line_EStops:6:O
_101_Line_EStops:7:I
_101_Line_EStops:7:O
_101_Line_EStops:8:I
_101_Line_EStops:8:O
_101_Line_EStops:9:I
_101_Line_EStops:9:O
_101_Line_EStops:I
_101_Line_EStops:O
_105_Line_Drives:1:I
_105_Line_Drives:1:O
_105_Line_Drives:2:I
_105_Line_Drives:2:O
_105_Line_Drives:3:I
_105_Line_Drives:3:O
_105_Line_Drives:4:I
_105_Line_Drives:4:O
_105_Line_Drives:5:I
_105_Line_Drives:5:O
_105_Line_Drives:6:I
_105_Line_Drives:6:O
_105_Line_Drives:7:I
_105_Line_Drives:7:O
_105_Line_Drives:8:I
_105_Line_Drives:8:O
_105_Line_Drives:9:I
_105_Line_Drives:9:O
_105_Line_Drives:I
_105_Line_Drives:O
_101_Line_Estops_ConnectionFault
_105_Line_Drives_ConnectionFault
-
- Posts: 121
- Joined: Tue Apr 12, 2011 1:44 pm
-
- Posts: 22
- Joined: Fri Sep 17, 2010 9:06 pm
- Location: Brazil
Re: [?]: Creating Repetitive code in excel for RSLogix 5000
Hi everyone!
The VB script worked perfectly, but you didn`t send us a VB Script for the button called Copy all.
Thanks.
The VB script worked perfectly, but you didn`t send us a VB Script for the button called Copy all.
Thanks.