Jump to content

Recommended Posts

Posted
Why does someone us a ONS on a latch output command, my thoughts are that the latch will come on and stay on until a unlatch command is recieved. I am sure there is a good reason to use this, but I am just not seeing it. Thanks JT B3:20/1 ONS B3:5/1 BST OTL B3:0/4
Posted (edited)
Strictly speaking, you're in the wrong forum, as that code is almost certainly for the AB SLC5 range, I would have thought. However, the same rules apply in Mitsubishi code, for example: LD X0 PLS M0 LD M0 SET Y0 Would do a similar thing, where PLS is the Mitsubishi equivalent of the AB ONS command. Consider the following code: LD X0 SET Y0 LD X1 RST Y0 If both X0 and X1 are ON, (maybe they are external switches), then the programme is having to SET and RESET Y0 as both commands are true. So will Y0 be ON or OFF in practice? It all depends on which was the last command that the PLC executed, in other words, the order in which the code was written. As I've written it above, Output Y0 would be OFF if both X0 and X1 are ON. However, if the code was reversed, ie LD X1 RST Y0 LD X0 SET Y0 then Y0 would be ON if both X0 and X1 were ON. Confusing ain't it? So let's re-write it using the Mitsubishi PLS command (AB ONS) LD X0 PLS M0 LD M0 SET Y0 LD X1 PLS M1 LD M1 RST Y0 So now, what is the status of Y0 if both X0 and X1 are ON? Answer, you don't know just be looking at the code, it all depends on whether X0 or X1 came ON first, in other words it's time dependant. The PLS elements M0 and M1 will only be on for one cycle scan, and they will occur at the instant X0 and X1 respectively go ON. So, if X0 came on first, followed by X1, then Y0 will now be OFF. The opposite will also be true. Personally, I NEVER use SET or RST (OTL, OTU) with a PLS element (ONS) . Edit Note: I actually meant to say I ALWAYS use a PLS element when using SET or RST Edited by Colin Carpenter
Posted
I am in the wrong forum sorry LOL, lucky for me I also work with Mitsubishi. Thanks for the insight and I can see how the scan sequence would cause problems with the Latch (Set) state and why you would need to us ONS (PLS) commands. But me personally I tried to follow your way in not using ONS (PLS) in the Latch (Set) rungs. Thanks for the (Food for thought) Electrode

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