S7 vs ControlLogix

S

Steve Myres, PE

Actually, you can do this in a SLC in a kind of kludgey, assembly language sort of way. For each reusable subroutine, define fixed memory locations for the arguments and returns. Load your live data into the predefined registers, call the JSR, and fetch the returns from the registers. This is obviously suitable only for subroutines with small lists of arguments and returns or the move time overhead will be prohibitive. It can be done a lot more efficiently if the data is structured suitably. Using the same method, pass a single pointer to data locations, and the subtorutine can work on the real data using indexed or indirect addressing. This eliminates all the MOV or COP statements.

That having been said, I freely admit that function blocks or subroutine calls that accept and return values (like in the CLX or TI505 PGTS command) are much better. Just pointing out what can be done.

Compilable function blocks also hold the potential for encapsulation of proprietary procedures without locking the user out of the whole program, which I see as a plus.
 
S

Steve Myres, PE

Yes, I agree that it's not as clean as I would like, and suborutines used in this fashion can be difficult to debug, though I don't see why they should be any more difficult than UDBF's. I have been complaining to Rockwell about this for a while now, but I don't see it as an enormous issue.
 
S

Steve Myres, PE

Pointers to parameters can be passed if the data is structured correctly. Or, you could have the setpoint passed back from the routine in a scratch variable, and check for user changes before updating the setpoint (outside the subroutine).
 
I am not here to defend ControlLogix, in fact, my stance is "you may find a better product, but you won't pay more for it". I just want to clarify a flase statement. User defined function blocks can also be developed in C-Logix. It is called by a differnt name, but serves the same purpose. In C-Logic it is called an Add-On. No one does UDFB's as well as Giddings&Lewis. If you truly want a IEC16311 system with reusable code, check out what G&L has to offer.
 
Top