Jump to content

"Set Coil" and "Reset Coil" Ladder functions


Adamkse

Recommended Posts

Hello,
I am having trouble understanding how the "Set Coil" and "Reset Coil"  work. My understanding is that the Set coil, once energized, stay energised no mater is the RLO goes low. Is that correct?
My code seems to switch off the set coil when the RLO goes low. Any ideas on where I am going wrong?


Thanks,
Adam
 

float.png

Link to comment
Share on other sites

Try making float_lower contact in rung one a positive transition contact  and the NC (XIC) in rung 2 to a negative transition contact (NTC).  See if that gives the logical behavior you were expecting. As it stands right now you're float_start coil will (unconditionally) go false as soon as  "float_lower"  NC contact goes false.

Edited by hotwires
Link to comment
Share on other sites

Hi guys,

Thanks for the response. I couldn't set them as transition contacts as they are "function in" tags. I moved it to the main ladder and still doesn't seem to work. the set coil will not go high now? I don't quite understand how the set/reset coils work. the documentation states: 

"Set Coil separates the coil from the action or condition that energized the coil. Once energized, a set coil's result is no longer dependent on the action that energized it."

Surely only the reset coil can unlatch it?

Also, the networks are back on separate rungs. Was just trying everything to get it to work.

float2.png

Link to comment
Share on other sites

  • MVP 2023
On 12/19/2017 at 12:07 PM, Adamkse said:

Surely only the reset coil can unlatch it?

Yes, that is correct.

 

On 12/19/2017 at 12:07 PM, Adamkse said:

I moved it to the main ladder and still doesn't seem to work. the set coil will not go high now?

Moved, or copied? Make sure that coil does not exist anywhere else in the program.

Link to comment
Share on other sites

Good advice Flex. If the "float_start_command" bit has a reset coil somewhere else in the program it will interfere. One instance of a coil (RLO or S&R) per tag, per program! 

Is there any special reason you put float switch latching logic into a UDFB? Is it something you are reusing in the program for multiple tanks? I was not aware function in tags would not allow transitional contacts. 

Link to comment
Share on other sites

6 hours ago, Flex727 said:

Yes, that is correct.

 

Moved, or copied? Make sure that coil does not exist anywhere else in the program.

Copied it then changed the tags and deleted the copied function in/out and local tags it created. Does this not work? I don't believe that there are any other instances of the "float_start_command" tag except for what you have in the screen shot but will confirm tonight.

6 hours ago, hotwires said:

Good advice Flex. If the "float_start_command" bit has a reset coil somewhere else in the program it will interfere. One instance of a coil (RLO or S&R) per tag, per program! 

Is there any special reason you put float switch latching logic into a UDFB? Is it something you are reusing in the program for multiple tanks? I was not aware function in tags would not allow transitional contacts. 

As above I will confirm they are the only instances but I am fairly certain they are.

Yes, the UDFBs don't allow transition contacts for some reason. Thee is no special reason for putting it in a UDFB as I only use it once. But I thought I may use it again in the future and it makes the code a bit neater. 

Link to comment
Share on other sites

  • MVP 2023
5 hours ago, Adamkse said:

Does the one instance per tag, per program include disabled rugs?

No. Disabled rungs are not compiled. 

 

5 hours ago, Adamkse said:

There may be disabled rungs that contain these tags but I would have thought that was ok?

You seem uncertain. There is a search function to make sure.

Link to comment
Share on other sites

5 hours ago, Flex727 said:

No. Disabled rungs are not compiled. 

 

You seem uncertain. There is a search function to make sure.

I am aware of the search function. I did not have the software in front of me at the time of the post.

I can now confirm that there are no other instances of the "float_start_command" and got it working by changing the contacts back to regular ones as opposed to the transition contacts.

Not sure why it wasn't working in the UDFB but I will play around with it and see if I can figure out what was going wrong now that I have something that works.

 

Thanks for your help.

Adam

Link to comment
Share on other sites

  • 2 weeks later...
23 hours ago, Saragani said:

Pass the bits as Function-Out or pass an entire array or struct that contains those bits as a function-in, and the set / reset coil will still affect the values. (Passing tags by reference vs by value).

 

This is over my head. can you paraphrase? I hope to do a major update to one of my UniL programs and a UDFB with comparators and S/R logic will come into play. A stack of less than and greater than compares linked to set/reset coils (pump state control PV vs setpoints), want to repeat logic for two water tanks. If you could clarify the context of the phrases; passing, reference, and value would help.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...