JMR (Customer) asked a question.

Multiple SET coils with same memory address

Hello

 

I am sorting through some existing program written in DirectSOFT that was written several years ago by another however there are no documentation comments on the rungs. The program is somewhat large (over 200 rungs) however its functional.

 

I need to make a few changes to the logic - and I'm tracing the logic and adding comments to try and help sort it out so that I have an understanging of what's going on before disturbing anything.

 

I have come across a situation that I would not ever program myself - but I dotn want to make a change at this point as its permeated throguh the code. There is a SET coil in the output rung that has the same address repeatedly. There are actually 9 instances of this occuring in the program - different logic functions could all write to this same address . While I'm familliar with the "OROUT" function in DirectSOFT; this is diffferent.

 

The coil is written to an internal coil - a "C" element, not a hard output.

 

Do you see this as an issue? For now I dont want to change it, as that's much more invasive than the requested change, but want to just document it in the comments.

 

thanks !

 

JMR


  • JMR (Customer)

    Thanks both - I made a note in the comments as an observation for now.

     

    I don't want to do an unconditional reset. the function of this coil is to pause the routine in the event of some abnormality in the process, but it allows the operator to correct the issue and return to the process without a complete reset.

     

    If I run into issues I'll plan on converting each one to its own individual set coil and then taking all those coils and paralleling their outputs to drive the original coil address as a normal function.

    Expand Post
    Selected as Best
  • Todd Dice (Customer)

    You can have multiple instances of SET and RST to the same C element and have the logic solve without issue but I agree that is not a preferred method.

     

    Personally, I'd change all but one so C outputs are used once, and what function(s) the repeated C elements did OR-ed to maintain clarity for the next person.

  • HOST_franji1 (HOST Engineering)

    One pattern I have seen is similar to OROUT behavior (like you mentioned) where you unconditionally RST at the top, then do a bunch of SETs throughout the code, with a possible RST at the bottom to deal with any "estop" kind of conditions (i.e. "I don't care what the rest of the program above thinks this should be ON, it needs to be OFF based on this situation/mode/condition").

     

    The programmer may not have been aware of OROUT coil (I don't think it's in any other PLC instruction set I am aware of).

    Expand Post
  • JMR (Customer)

    Thanks both - I made a note in the comments as an observation for now.

     

    I don't want to do an unconditional reset. the function of this coil is to pause the routine in the event of some abnormality in the process, but it allows the operator to correct the issue and return to the process without a complete reset.

     

    If I run into issues I'll plan on converting each one to its own individual set coil and then taking all those coils and paralleling their outputs to drive the original coil address as a normal function.

    Expand Post
    Selected as Best