Synchronizing robot variable to servo turn

  • The robot picks and places some plastic stuff inside the holes of a turntable, just like a revolver.


    In the master job there's a WHILE that keeps checking different signals so the robot can make a different subtask based on them. The cycle time here is TIGHT, so the robot has to make whatever it needs whenever it gets a signal to do so. This is the cause.


    One subtask manages the servomotor, sending a pulse. Whenever the servo finishes turning I need to increment a variable. Since I have to keep going with the rest of the cycle I can't wait for that. Instead, there's a WAIT IN#(SERVO INPOS) in every subtask. But they may not be executed. So, right now, I'm incrementing the variable with each pulse, leading to errors.


    I need something that is constantly checking, like PLC ladder. But the controller's own ladder editor doesn't let me touch variables. Can I use this? This controller does not have the system/parallel job function.


    I thought of maybe waiting for the servo input before sending the pulse, but - I confirmed this - the robot controller can cycle faster than the PLC turns the input off. So there's times when the robot sends a signal twice (and increments twice) before the disk hasn't even begin moving. I programmed a timer that stops the robot from executing that subtask if it goes too fast, but it's kind of a half assed solution and doesn't work flawlessly either.


    I could also make it work if the controller let me turn off that input by myself before sending the pulse. Is this possible? This way I wouldn't need to synchronize the controller and the PLC.


    Thanks

  • I managed to solve it. This is what I had:


    WAIT IN#(SERVO INPOS)=ON

    PULSE OT#(SERVO TURN) T=0.1

    SET var var + 1



    This is what I have done:


    WAIT IN#(SERVO INPOS)=ON

    PULSE OT#(SERVO TURN) T=0.1

    WAIT IN#(SERVO INPOS)=OFF

    SET var var + 1


    This way I increment the variable with the actual servo movement, instead of supposing it is moving. I'd like to use the rising edge, and count when it stops moving instead, but as I said earlier there's no where in the program to check for that. But here I can be sure the falling edge will happen since I'm actually sending the signal to move.

  • If you are restricted in cycle time you can execute any calculation logic using "PSTART" functionality as long as there are no manipulator movements in that job you are calling through "PSTART".


    This way you can move robot without waiting for any i/p and while it is running your described logic in parallel to the any job you are on.

  • That's a great idea, but I can't find those commands in my controller. I have the INFORM EXPANDED option enabled. Are them available in the YRC1000? They don't even show up in the INFORM manual.

  • Yes vemc you are right; I couldn't find it either. However I have no experience with YRC controller so I took it for granted as it available on NX and DX should be available in YRC.


    Is there anyone know is there any substitute of PSTART in YRC??

  • PSTART (and PWAIT) are a software option (Concurrent Job software option). Been available on most Yaskawa controllers since MRC days. Some Yaskawa offices have this option turned on as a standard such as the US.

    I know a thing or two, because I’ve seen a thing or two. Don't even ask about a third thing. I won't know it.

  • It makes sense that it belongs to the concurrent job functionality, and it's so useful and sometimes essential that it should at least be mentioned in the manual, even if it's not included by default.


    Case solved I guess

Advertising from our partners