Sign in to follow this  
Followers 0
derrickjp7

Motion Instruction bits not clearing

5 posts in this topic

I'm writing some simple motion control to run a servo linear actuator for school. I'm noticing that DN and PC bits are not clearing after performing the instruction and the rung goes false. So DN bits of MSO, MAH and MSF stay on as well as PC bits of MAM instructions. Is this normal? I'm using the PC bit of the MAM to step my state machine, but once it loops around to that step again, the PC bit is still true, seemingly causing some issues. Is this how they're suppose to act or do I need to manually clear them some how?

 

Thanks for the help!

Share this post


Link to post
Share on other sites

Hi derrickjp7

From Memory; the PC and DN flags should reset themselves- however I have heard of many stories involving these bits not clearing down to 0 and causing machine problems.

Whenever I have written motion logic- I have always monitored the condition of these bits at the end of process and generated an alarm or manually unlatched these bits when necessary.

If this is a common problem with your machine- I would probably recheck the operation of your logic.

Somewhere I have a Rockwell "Bible" on handling motion instructions, I will see if I can find it for you.

 

Regards

Daniel

Share this post


Link to post
Share on other sites

Not exactly sure, but I tend to one shot the motion instructions and that might clear those bits after it completes the motion intended.  You still will want to monitor them for your process or sequential operation.

Share this post


Link to post
Share on other sites

Hi Derreck,

 

The .PC and .DN bits are cleared in the "pre-scan" the next time you execute the motion instruction.

This is intended as written in the help file for the MAM instruction. "The PC bit stays set until the rung makes a false-to-true transition."

Like you mention yourself, using only the .PC bit might cause problems for a state machine if not properly handled.

 

What you can do is use the .EN bit together with the .PC bit.

From the help instruction "The EN bit stays set until the process is complete and the rung goes false."

The .EN bit will be reset when the rung with the MAM instruction is set to false, and when the MAM instruction is called once again, doing the before mentioned "false-to-true transition", the .PC bit will be reset before the .EN bit is set.

 

Some people also use the inverse of the .IP bit together with the .PC bit.

This also works, 99% times.

 

 

Share this post


Link to post
Share on other sites
18 hours ago, collinsd70 said:

 

Somewhere I have a Rockwell "Bible" on handling motion instructions, I will see if I can find it for you.

 

It'd be awesome if you could provide this. I've gathered a couple Rockwell data sheets and manuals on motion but yours may be more helpful!

17 hours ago, pcmccartney1 said:

Not exactly sure, but I tend to one shot the motion instructions and that might clear those bits after it completes the motion intended.  You still will want to monitor them for your process or sequential operation.

 

9 hours ago, Jobbe9000 said:

 

What you can do is use the .EN bit together with the .PC bit.

From the help instruction "The EN bit stays set until the process is complete and the rung goes false."

The .EN bit will be reset when the rung with the MAM instruction is set to false, and when the MAM instruction is called once again, doing the before mentioned "false-to-true transition", the .PC bit will be reset before the .EN bit is set.

 

Thanks for pointing out that those bits don't actually reset until the prescan, I didn't notice that bit of information in the manuals. I think utilizing a ONS and the .EN will definitely help out with resetting those bits sooner. Thanks for the help and suggestions guys!

Edited by derrickjp7

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0