Reducing Repetitive Code

Keystrokes? Right click on the instance of the FB and select monitor?

The lack of the FC functionality (I won't even go to the online changes in AOI's) is what really makes me hard to consider Rockwell for anything other than smart relay functionality. Just today, 5 exact same changes in 5 exact pieces of equipment in the same routine... on any other more advanced platform, one change.

But let's not deviate from the post.
 
Keystrokes? Right click on the instance of the FB and select monitor?

The lack of the FC functionality (I won't even go to the online changes in AOI's) is what really makes me hard to consider Rockwell for anything other than smart relay functionality. Just today, 5 exact same changes in 5 exact pieces of equipment in the same routine... on any other more advanced platform, one change.

But let's not deviate from the post.

Monitoring the FB as you've described will not allow you to monitor the specific instance of that FB call if its used multiple times. refer to this Siemen's webpage: How do you monitor a block with the desired call environment in STEP 7?

I'm sorry you can't appreciate anything beyond the Siemen's products. A good engineer knows the advantages and disadvantages of the tools he has access to.
 
Monitoring the FB as you've described will not allow you to monitor the specific instance of that FB call if its used multiple times. refer to this Siemen's webpage: How do you monitor a block with the desired call environment in STEP 7?
My bad, I was thinking of TIA Portal.

I'm sorry you can't appreciate anything beyond the Siemen's products. A good engineer knows the advantages and disadvantages of the tools he has access to.

Interesting... I specifically said "on any other more advanced platform" because the concept of functions isn't unique to Siemens. It also does not mean that I don't know the advantages and disadvantages, only that I weighed them and came to the conclusion I expressed. It is my conclusion, other people have a completely opposite conclusion and that is fine as we're all different and value different things.
 
Hey,

I am working on a project that is a bit more involved than past ones I have done. It will be using a CompactLogix PLC, and I'm using Studio 5000 v30.

Some parts of my code are going to be very repetitive, for example I will have to control 12 gates, all 12 gates will require the exact same logic, the only thing that will change is the I/O's that they use. In the past I would just brute force this, as I was never dealing with so many repeat instances, but I'm looking to simplify my code.

Essentially I'm wanting two subroutines, one to Open the gate, and one to close the gate. All 12 gates will be controlled independently from one another, but their logic will be the exact same. Each gate has an Open Limit Switch, Closed Limit Switch, Full Bin Sensor (don't open gate if bin is already full), and an output to Open, one to Close, then just some status indicators (Opened, Closed, Transit).

Now my big question, can I write a subroutine, with the generic logic that would control all gates, and when my main routine calls that subroutine, have it pass all the appropriate I/O's to the subroutine so it opens whatever gate the user is requesting? This would be in place of have potentially 24 different subroutines (Open and Close subroutine for each gate).

Thanks for any help you may be able to provide. And I'm sorry if this is a basic question, I haven't been able to find information on how to do exactly what I'm wanting yet. Thanks,
Hi, so Rockwell have developed a bit of software called Application Code Manager. It's basically a code generation tool. It allows you to to design your own libraries of code for mass generation.

https://www.rockwellautomation.com/...cts/studio5000_application_code_manager.page?

it is free.
 
Last edited:
My bad, I was thinking of TIA Portal.



Interesting... I specifically said "on any other more advanced platform" because the concept of functions isn't unique to Siemens. It also does not mean that I don't know the advantages and disadvantages, only that I weighed them and came to the conclusion I expressed. It is my conclusion, other people have a completely opposite conclusion and that is fine as we're all different and value different things.
each for their own, I guess. I remember adding hardware to an S7 used to require a full download.
 

Similar Topics

I am deciding on components for a bayed modular enclosure containing multiple VFDs (480V/350A/321Hp each) for a dynamometer. I am concerned given...
Replies
7
Views
1,672
We have a servomotor with gearbox (i=+-20) driving a big steel disc. This disc has a high inertia. Are there mechanical compensation methods for...
Replies
3
Views
1,693
I have an application where I need to reduce the travel of an actuator and also double the force. How can you do that manually, without the help...
Replies
10
Views
2,458
Hi guys, Wondering if I can have your honest (and brutal) feedback on a PDF guide I'm creating for my customers. The intent of it is to help...
Replies
0
Views
2,493
Hi.. I want to know something about Pressure Reducing valves & pressure regulating valves. I understand their purpose. But wanted to know whether...
Replies
4
Views
1,551
Back
Top Bottom