Radu Babau

Cant call a STL written add-on instruction from an SFC main program

4 posts in this topic

Hello folks,

 

I am a rookie, self-training in PLC programming.

I have written an SFC exercise (attached ACD file). I also try to call STL written subroutines and add-on instructions, from within the SFC main program.

Calling the created subroutine works fine, but calling the add-on instruction fails from a reason which is above my level. I tried, tried and tried different solutions, with no avail. I am either wrong in writing the add-on (perhaps some missing but missing tag ?), or wrong is calling it.

Can someone please give me a hint on what I do wrong ?

 

Thank you, Radu

PS . I use Studio 5000 v24, combined with RSLogix 5000 Emulator.

 

 

SFC_trial.ACD

Share this post


Link to post
Share on other sites

I don't use SFC's. I see the usefulness but not in the things I do. However, I found this online-

To use a subroutine to control a transition, include an End Of Transition (EOT) instruction in the subroutine.

The EOT instruction returns the state of the conditions to the transition.

Share this post


Link to post
Share on other sites

Hello Michael,

Thank you for the quick reply & suggestion, I tried it, with no luck.

Also note that I am having problems with calling the add-on  instruction in my ACD (left-hand path), and not the subroutine (right-hand path). The add-on instructions manual 1756-PM010I, page 31, lists EOT, IOT, RET, etc., as "unavailable instructions", so I guess this is a dead end.

Still digging.

Radu

Share this post


Link to post
Share on other sites

Hello Michael,

I solved it, after learning the following add-on instruction specifics:

-  once you create a complete (Parameters and Local Tags  + Logic: see the rules in the above mentioned manual) add-on instruction (compiled successfully) with a certain name (say MUFFIN), you will observe that a new type of data (named MUFFIN) shows up under DATA TYPES, ADD-ON-DEFINED DATA;

- you now have to define (under Main Task /Programs PARAMETER AND LOCAL TAGS, or in the upper CONTROLLER TAGS) a new reference  tag (say PONNY) of this new MUFFIN type;

- now the set is on for a successfull call of the created add-on instruction: MUFFIN(PONNY, MUFFIN_IN, MUFFIN_OUT).

It is perhaps my rookie impression, after reading the manuals very carefully, that this sequence if NOT explained. 

Thank you again.

Radu

PS. Corrected ACD file attached.

SFC_trial_corrected.ACD

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now