ConveyorTech stop motion when receive a zero coordinate

  • Hi, I have a KR10 R900 robot running KSS 8.6.6


    I've been trying to get Conveyor Tech to work and for most part it does. The system consists of a camera that sends the robot a coordinate to go to, while following the conveyor, and it does.

    But my problem is how can I make the robot do nothing when a zero coordinate is given, i.e. camera sees nothing, and then carry on with its following. Any suggestions??


    I've included the code below, up to the case statement where the movement is initiated.



  • Hi, Sorry for the late reply, been a bit busy.


    Could you elaborate a little, maybe with an example? I am very new to KUKA, so a lot of seemingly simple things are a little difficult at times.


    Thanks in advance

  • Well, your WAIT FOR rCameraY>0 is your first problem -- the robot is never going to do anything unless the camera value is greater than 0. That's another issue -- what happens if the camera sends over a negative value? Why only Y, what about X and Rz?


    You've also provided no information on where rCameraY comes from -- is it an input? An internal variable controlled by the SPS?


    You'll have to have some other means of signalling the robot to get past that line. This code as written makes no real sense -- what are you trying to accomplish here?


    Your code also falls into an endless loop with no exit condition whose structure makes no sense.

  • I am still in the testing mode, slowly adding start and stop bits.


    The camera is sending data to PLC and then I send the split data to Robot. For clarity I named it rCameraY as it is converted to real in the config file.


    rCameraY is a single variable and for the time the only one I care about as the robot has to go to the Y position given by the camera and then make a small movement in the Y+ while tracking once the trigger has been triggered. This is the only time the robot re4cieves data. But when the trigger is triggered and there is no data all i am trying to do is make robot not to go to the zero coordinate on the belt.


    I've tried encasing the DLIN movement in an IF rCameraY>0 statement but as soon as it receives 0 the robot just goes in the skip conveyor mode and never recovers

  • Once the robot hits the Conveyor.Skip line, it's too late to branch. You need to either put a wait/branch above that, or use the Skip input or Flag (as shown in the manual) to abort the Conveyor following. Then you'll have to set up your PLC to send over that Skip input in the event that the camera has a zero measurement.

  • So, in the PLC I added a bit of code to set the skip signal high when the Y value is at 0 and low when else. And as soon as I input a 0 I get an error: 'Wait for sync signal aborted because maximum conveyor distance reached'


    Am I doing something wrong?

  • Does the robot stop running? It should loop back around to Conveyor.Skip.


    If not, you may need to prevent the robot from reaching Conveyor.Skip until the camera sends a good measurement. Once the program pointer reaches Conveyor.Skip, the only way to continue is to get the conveyor sync input, and the only way to abort is to raise the Skip input or Flag.

  • To clarify, the robot gets the sync trigger every second, its the same trigger that triggers the camera to take a photo and send, if any, positional data. As every second one of many shoots on the conveyor goes by where the product should be present.


    If I understand the manual correctly, isn't the Conveyor.skip is the command that tell the robot to pick or skip? As in normal operation the pointer generally sits in that command until it sees a product and then does the movement and back to the skip command via the Pre position.


    The weird thing is that when I was simulating the 0 coordinate in plc, and at the same time rising the Input high, a couple of times it did in fact stop for a second and carried on 'picking'. But mostly it just sends the pointer jumping between Pre and Conv.skip uncontrollably with the message of max conveyor distance reached and the robot just stops. The program running, but the robot not moving


    Now I don't understand whether I am sending the 0 for too long and just got lucky with a couple of really quick position sends, or am I still doing something wrong?


    Also, I tried preventing the pointer to get to the Conv.skip by putting a Wait rCamera>0 statement but it doesn't even stop there, just goes into error straight away, in fact, anything I put there pretty much either ignored or just sends it into error

  • To clarify, the robot gets the sync trigger every second, its the same trigger that triggers the camera to take a photo and send, if any, positional data. As every second one of many shoots on the conveyor goes by where the product should be present.

    Why not block the sync signal unless/until the camera has a valid measurement?

    Now I don't understand whether I am sending the 0 for too long

    Probably. If the robot gets through the Conv.Quit and back to the Conv.Skip while the Skip input is still active, you'll probably just keep skipping.

    Also, I tried preventing the pointer to get to the Conv.skip by putting a Wait rCamera>0 statement but it doesn't even stop there, just goes into error straight away, in fact, anything I put there pretty much either ignored or just sends it into error

    This is so vague as to be utterly useless.

  • It finally worked! My problem was that the trigger for the camera and robots was triggering at the same time and it took a significant 900ms for the camera to process the picture, so ended up creating an array buffer and effectively 'moving' or delaying the trigger to the next, and then editing robot calibration and tracking distances back one flight and it finally worked :grinning_squinting_face:


    Thanks SkyeFire

Advertising from our partners