FC equivalent in AB?

Bobogrammer

Member
Join Date
Mar 2018
Location
Midland, Michigan
Posts
26
In TIA portal I've designed a logging system, nothing fancy but I need to use it in 50+ places. Using FC's with INOUT pins is perfect and doesn't blow up my rung count.

Problem is I need to use this in AB, and I don't know of anything similar to FC. Each logged variable takes 8+ rungs to work, times the number of variables would make for some junky code.

I feel like I might be reinventing the wheel on this one and AB might have a variable logging system that can be displayed on HMI.
 
Assuming the Logix platform, an AOI. But an AOI is more like a Function Block, AB doesn't really have a true "function" where you call it and a value returns. Closest would be just using a JSR and calling a routine.

So, if you want 50+ instances of the logic use an AOI. If you just need to call the logic to do some internal processing and return some value, calling a simple routine and passing parameter values might be all you need.
 
In TIA portal I've designed a logging system, nothing fancy but I need to use it in 50+ places. Using FC's with INOUT pins is perfect and doesn't blow up my rung count.

Problem is I need to use this in AB, and I don't know of anything similar to FC. Each logged variable takes 8+ rungs to work, times the number of variables would make for some junky code.

I feel like I might be reinventing the wheel on this one and AB might have a variable logging system that can be displayed on HMI.

don't you mean FBs? Equivalent in AB Rslogix 5000 are AOIs. Rslogix 5 & 500 have no equivalents. If you do mean FCs, newer versions of Studio 5000 allow you to call routines as sub-routines with input and output parameters. Older versions you'd have to do some tricks with moving variables in and out of working memory locations.
 
Sorry thought I had mentioned Logix 5000. I'm using FC's so as to not need databases

As other have suggested, the closest equivalent would just be a simple subroutine - when you call it, you can pass it as many I/O parameters as you like.

I'd investigate using AOI's, however. I understand the advantage of using FC's so that you don't need a DB in Siemens world, but in AB world when you create the AOI, you just create a tag, and that tag contains all the required elements. You don't have to create a DB just to hold the data.

Of course, be aware that, as other have said, you can't edit an AOI online. A subroutine, you can.

That's the only advantage of going subroutine over AOI, though, and IMO it's not worth it in 99% of applications. For one thing - online monitoring. But then, it depends on what your FC's are doing.
 
In theory it shouldn't otherwise there's no point in doing routines... however, I believe that monitoring the single routine for 50 instances is not something easy or possible to do in Logix5000. Hopefully someone will tell me wrong.
 
No, you'd write the subroutine once and then call it 50 times, each time with it's own set of parameters.

Or, if you go the AOI route, you'd write the logic for the AOI once and then drop in 50 of the instructions you just created. The AOI would probably look more similar to how you're used to seeing an FC look - again, just remember you can't edit online.
 
In theory it shouldn't otherwise there's no point in doing routines... however, I believe that monitoring the single routine for 50 instances is not something easy or possible to do in Logix5000. Hopefully someone will tell me wrong.

This is correct - that's the major drawback to using subroutines over AOI's. With an AOI, you can open up the logic and just select which of your 50 instances you want to look at. Nice and easy. With a subroutine, no such luck.
 

Similar Topics

Hello to all, I know there are a few people here very experienced with Codesys. I wonder does Codesys have something similar to OB35 in STEP7...
Replies
3
Views
572
Does anyone know the S7 equivalent of the Mitsubishi Q-Series command PLF? PLF is a one-cycle pulse on the falling edge of the input signal. See...
Replies
5
Views
534
Is there an equivalent Rockwell PLC NOP instruction that is available for the M340 M580 Schneider PLC? Thanks,
Replies
10
Views
2,681
I used GSV to get the current status of older 1769 I/O modules. What is the equivalent for new 5069-I/O ? I know individual points/channels have...
Replies
0
Views
1,010
I am rewriting a program for AB CPX, for SMC electric actuators. I have used both IO-Link and Ethernet/IP with AB CPX, and the most helpful...
Replies
13
Views
4,474
Back
Top Bottom