Jump to content

Recommended Posts

Posted (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 by JaySharp90
Posted

You could also use KEEP.

 

Posted

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.

MrPLC_ON_OFF.thumb.jpg.9bd2b21f18bbddd7d

Posted
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.

Posted
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.

Posted (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 by JaySharp90
Posted
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.

Posted
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.

Posted

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.

Posted (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 by rootsqr

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.   Restore formatting

  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...