JaySharp90 Posted August 16, 2017 Report Posted August 16, 2017 (edited) Hello, For my plc ladder programs I've just used whatever seems to work, so to turn things on and off I've just been being asserting either set x.xx or rset x.xx. This always gives me warnings when I compile (I eventually turned those warnings off as they didn't seem to affect anything), so I was wondering what the correct way to do on/off was? I assume if the program is warning me against doing it with set/rset there must be a way they recommend. I also want to start using the interlock instruction which, from the help information for that, it looks like if I use set/rset to set things on or off the interlock instruction won't affect those things' states. This seems bad. Thanks, Jay Edited August 16, 2017 by JaySharp90 Quote
vasekd Posted August 16, 2017 Report Posted August 16, 2017 Hello, it is not error, only warning about duplicated output (by set, rset normal situation). The program will work normally. Quote
IO_Rack Posted August 16, 2017 Report Posted August 16, 2017 The SET / RSET is an effective method to turn outputs ON and OFF. As stated, it is just a warning. If you duplicate a standard OUT instruction, the first OUT will not work. Below are three examples of latching. 11 hours ago, JaySharp90 said: I also want to start using the interlock instruction which, from the help information for that, it looks like if I use set/rset to set things on or off the interlock instruction won't affect those things' states. This seems bad. Why do you feel a need to use the IL/ILC instructions? In my opinion, it can be an effective method of disabling sections of code but otherwise not use them. The JMP/JME instructions are even more confusing. I believe most programmers will encourage you to steer clear of them. Quote
innoaloe Posted August 16, 2017 Report Posted August 16, 2017 Quote Why do you feel a need to use the IL/ILC instructions? In my opinion, it can be an effective method of disabling sections of code but otherwise not use them. The JMP/JME instructions are even more confusing. I believe most programmers will encourage you to steer clear of them. For some reason though, Japanese programmers tend to love JMP/JME :D, whose programs I hate to troubleshoot. Quote
IO_Rack Posted August 16, 2017 Report Posted August 16, 2017 5 minutes ago, innoaloe said: For some reason though, Japanese programmers tend to love JMP/JME :D, whose programs I hate to troubleshoot. I almost posted a latching example using the JMP/JME. I found it in a Japanese program that nearly drove me crazy. Quote
JaySharp90 Posted August 18, 2017 Author Report Posted August 18, 2017 (edited) On 8/16/2017 at 10:28 PM, IO_Rack said: Why do you feel a need to use the IL/ILC instructions? In my opinion, it can be an effective method of disabling sections of code but otherwise not use them. The JMP/JME instructions are even more confusing. I believe most programmers will encourage you to steer clear of them. For the interlock thing, it was just to prevent buttons on the HMI being able to be pressed if a level transmitter reached a certain point (i.e. if the tank is too full, prevent the user from turning on any of the pumps that feed stuff in). The buttons are a mix of command and just push buttons so I wasn't sure of the best way to stop the user from being able to interact with them. I was specifically asked to look into the interlock things, although no one here seems keen on it so I might just go back and tell them that. Thanks everyone else for the help with set/rset. I knew it was just a warning, I just thought there might be an alternative that everyone else uses to avoid the warning. SET/RSET makes sense to me, so guess I'll just keep using it Edited August 18, 2017 by JaySharp90 Quote
IO_Rack Posted August 18, 2017 Report Posted August 18, 2017 9 hours ago, JaySharp90 said: For the interlock thing, it was just to prevent buttons on the HMI being able to be pressed if a level transmitter reached a certain point (i.e. if the tank is too full, prevent the user from turning on any of the pumps that feed stuff in). The buttons are a mix of command and just push buttons so I wasn't sure of the best way to stop the user from being able to interact with them. I was specifically asked to look into the interlock things, although no one here seems keen on it so I might just go back and tell them that. I wouldn't let any of us discourage you from using them if it makes sense to you. The important thing is to understand how they operate. The fact that you are asking the forum, says you are taking the proper care. The warning in the help section says that the SET/RSET and KEEP instructions will retain the last state inside the IL/ILC even when the IL is turned OFF. It will prevent it from tuning ON but it will Not turn if OFF. Quote
JaySharp90 Posted August 21, 2017 Author Report Posted August 21, 2017 On 8/18/2017 at 11:37 PM, IO_Rack said: The warning in the help section says that the SET/RSET and KEEP instructions will retain the last state inside the IL/ILC even when the IL is turned OFF. It will prevent it from tuning ON but it will Not turn if OFF. That was my main concern with interlock. Is there any way to reset all sets at once, or do you just need to do each one individually? If I have to do it for each one, I feel like interlock doesn't really benefit me much. Quote
BobB Posted August 21, 2017 Report Posted August 21, 2017 If you have all your SETS in contigious blocks (say channel 200 to 220) you can use BSET #0000 200 230 will write 0 to all bits in all those channels. Quote
rootsqr Posted November 22, 2017 Report Posted November 22, 2017 (edited) What's the best method for replaced set-reset programing? When I programer pump system I use set-reset, but I always wondering what's the best method? Sometimes I used 'jmp' and 'goto' but sometimes I had the 'watchdog' warning, they already know, the scan cycle. Edited November 22, 2017 by rootsqr Quote
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.