Codepark

MC_MoveRelative doesn't work

12 posts in this topic

first, thank you for read!!

my problem is just simple lol…

the command MC_MoveRelative(~~~parameter ) dosen't work.

MC_MoveAbsolute work perfectly from what i think but MC_MoveRelative dosen't

in this case usually what is problem?

Do i have to set starting point?

what else could be problem this problem killing me haha lol

 

*plus, when i give parameter for detecting error (like ErrorID=>WORD, Error=> BOOL) they even don't give output error for true (which mean this function totally doesn't work?)
 

*plus, MC_Move() also doesn't work lol

2BDBFBE8-1B27-44E9-A7BF-4DB3B518CE32.jpeg

Edited by Codepark

Share this post


Link to post
Share on other sites

Did you try to check is your execute bit ever coming up? MC_MoveRelative4.Execute. Run differential monitor for execute input and busy output of MC_MoveRelative4. And try to change distance from number => REAL#5.0

1 person likes this

Share this post


Link to post
Share on other sites

thank you for reply scotty134!!

1.i check execution bit by inspection terminal but execution go True but the motor doesn't move lol

2.and i change distance data type to real but didn't work too lol

Curious thing is that MC_MoveAbolute crazily work well.... 

Q1. is there any special way to check execution bit?

Q2. is there any special setting before MC_MoveRelative?

 

 

 

Share this post


Link to post
Share on other sites
6 hours ago, Codepark said:

Q1. is there any special way to check execution bit?

Take a look at the Help (F1). There are several status bits to check. Done, Busy, Active, CommandAborted, Error, ErrorID. The Help section describes them and included timing diagrams.

6 hours ago, Codepark said:

Q2. is there any special setting before MC_MoveRelative?

Not that I'm aware of. It may be a good idea to check that it is Not Active.

1 person likes this

Share this post


Link to post
Share on other sites

Do you have multiple instances of the MoveRelative command in your program? If so make sure they each have a unique instance name. Duplicates cause this sort of behavior.

1 person likes this

Share this post


Link to post
Share on other sites

Still looks like you are commanding a move distance of zero.  So of course no movement happens.  Your screen shot shows the values at zero which are connected to the distance input on the function block.  You're telling it to move 0mm, so it doesn't move...

1 person likes this

Share this post


Link to post
Share on other sites
17 hours ago, Codepark said:

thank you for reply scotty134!!

1.i check execution bit by inspection terminal but execution go True but the motor doesn't move lol

2.and i change distance data type to real but didn't work too lol

Curious thing is that MC_MoveAbolute crazily work well.... 

Q1. is there any special way to check execution bit?

Q2. is there any special setting before MC_MoveRelative?

 

 

 

Did you check output from the function block? Go to differential monitor and look for MC_MoveRealtive4.Busy; MC_MoveRelative4.Active. If Busy and Active come TRUE, it means that block executed the command, then look for a data that goes into the function block.

Share this post


Link to post
Share on other sites
10 hours ago, IO_Rack said:

Take a look at the Help (F1). There are several status bits to check. Done, Busy, Active, CommandAborted, Error, ErrorID. The Help section describes them and included timing diagrams.

Not that I'm aware of. It may be a good idea to check that it is Not Active.

Sir, IO_RACK thank you again!!!

Ooh, i will double checked What you said 

 

thank you!!!!!

Share this post


Link to post
Share on other sites
9 hours ago, photovoltaic said:

Do you have multiple instances of the MoveRelative command in your program? If so make sure they each have a unique instance name. Duplicates cause this sort of behavior.

Ooooh! Thank you Photovoltaic!!!

 

i've never thought about multiple instances,

i will check right away :)

 

thank you!!

 

Share this post


Link to post
Share on other sites
9 hours ago, Crossbow said:

Still looks like you are commanding a move distance of zero.  So of course no movement happens.  Your screen shot shows the values at zero which are connected to the distance input on the function block.  You're telling it to move 0mm, so it doesn't move...

Thank you for coming again, Crossbow!!

you are saying that i am commanding Distance zero,

from what point of screen shot did you figure out

that I am commanding Distance parameter zero?

MC_MoveRelative4(~~~ , Distance := 5, ~~~) 

i am commanding like that but how do you figure out the distance is set zero

have a great day!

Share this post


Link to post
Share on other sites
16 hours ago, Codepark said:

Thank you for coming again, Crossbow!!

you are saying that i am commanding Distance zero,

from what point of screen shot did you figure out

that I am commanding Distance parameter zero?

MC_MoveRelative4(~~~ , Distance := 5, ~~~) 

i am commanding like that but how do you figure out the distance is set zero

have a great day!

My bad, I was looking at the commented out lines, the variable they used for distance is equal to zero in your screen capture.

1 person likes this

Share this post


Link to post
Share on other sites
On 2021. 3. 10. at 2:04 AM, Crossbow said:

My bad, I was looking at the commented out lines, the variable they used for distance is equal to zero in your screen capture.

No, i think the question that i asked in Mr.forum looks stupid haha...

eventhough people communicating this mr.plc site give answer nicely really thanks for that ....

i am new in this plc programming haha...

i think i need some time for plc programming... from bottom to top

after that... want give some answer to some questions in Mr.plc site..!!

anyway thanks for reply MrPLC Admin!!!

 

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