Adamkse Posted December 18, 2017 Report Share Posted December 18, 2017 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 Quote Link to comment Share on other sites More sharing options...
hotwires Posted December 19, 2017 Report Share Posted December 19, 2017 (edited) 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 December 19, 2017 by hotwires Quote Link to comment Share on other sites More sharing options...
MVP 2022 Flex727 Posted December 19, 2017 MVP 2022 Report Share Posted December 19, 2017 And, please, do not place two networks in a single ladder rung. 1 Quote Link to comment Share on other sites More sharing options...
Adamkse Posted December 19, 2017 Author Report Share Posted December 19, 2017 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. Quote Link to comment Share on other sites More sharing options...
MVP 2022 Flex727 Posted December 21, 2017 MVP 2022 Report Share Posted December 21, 2017 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. Quote Link to comment Share on other sites More sharing options...
hotwires Posted December 21, 2017 Report Share Posted December 21, 2017 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. Quote Link to comment Share on other sites More sharing options...
Adamkse Posted December 21, 2017 Author Report Share Posted December 21, 2017 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. Quote Link to comment Share on other sites More sharing options...
Adamkse Posted December 21, 2017 Author Report Share Posted December 21, 2017 One other thought on this. Does the one instance per tag, per program include disabled rugs? There may be disabled rungs that contain these tags but I would have thought that was ok? Quote Link to comment Share on other sites More sharing options...
MVP 2022 Flex727 Posted December 21, 2017 MVP 2022 Report Share Posted December 21, 2017 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. Quote Link to comment Share on other sites More sharing options...
Adamkse Posted December 21, 2017 Author Report Share Posted December 21, 2017 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 Quote Link to comment Share on other sites More sharing options...
hotwires Posted December 21, 2017 Report Share Posted December 21, 2017 Odd that one shots wouldn't set/reset coil. Can't argue with a model that works though. Quote Link to comment Share on other sites More sharing options...
Adamkse Posted December 31, 2017 Author Report Share Posted December 31, 2017 Hey all, I figured it out. The issue was the set/reset coils not functioning properly. The do not work as local, function in or function out tags. Only global tags. Not sure why but when they are now global and working OK. Quote Link to comment Share on other sites More sharing options...
Saragani Posted January 1, 2018 Report Share Posted January 1, 2018 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). Quote Link to comment Share on other sites More sharing options...
hotwires Posted January 2, 2018 Report Share Posted January 2, 2018 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.