Picking part from conveyor with random position

Forum Forums Visual Components 4.1 Robot Programming Picking part from conveyor with random position

Tagged: 

This topic contains 6 replies, has 3 voices, and was last updated by zesty zesty 3 months, 3 weeks ago.

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #14491
    Avatar
    Leparti83
    Participant

    Hi

    I have some issue which I have been trying to get solution. I have parts coming at random position from conveyor and now I would need to pick those up with robot and even possibly know the part rotation in Z axis (it is turned at random direction in conveyor). Is this possible without using python at all?

    #14495
    Avatar
    jouha
    Moderator

    Hi,

    don’t know what you’d like to do after picking up, but until that point you can use the Pick And Place library. Supports articulated robot as well as the delta in this tutorial:

    http://academy.visualcomponents.com/lessons/use-a-delta-robot-with-the-pick-and-place-library/

    Getting the rotation around Z axis can be accomplished only via the APIs.

    Try out that pick and place library first!

    #14716
    Avatar
    Leparti83
    Participant

    I tried that, but it did not do what I wanted so I went ahead and started controlling robot with python. I guess this will be “easiest” way to do it.

    #14733
    Avatar
    Leparti83
    Participant

    So I got second issue as I have now set up second robot (cartesian) which suppose to pick and place parts as pattern on pallet and I used the example code provided by site. Now however I have issue as I have other robot output connected to cartesian input (to input port 2) and I should read this status in Python, but can’t get it to work for some reason. The code is as follows:

     

    #14752
    zesty
    zesty
    Moderator

    Is <<Inputs_Port_0>> a signal connected to the script? If no, it is not a trigger in the script.

    In Python API reference for vcHelpers.Robot, I believe there is a method that can be used to wait for a robot input of a certain value.

    #14786
    Avatar
    Leparti83
    Participant

    I have inputs of the mentioned cartesian robot connected to pythonsript (listener) and I tried different code this time robot.SignalMapIn.input(0) actually prints the curent value that is on the mentioned port (true or false depending what I set in beginning of simulation, but it still won’t work at trigger condition for some reason. I think it is already getting close, but there must be something that prevents the trigger event to happen

    #14789
    zesty
    zesty
    Moderator

    Because the input is not a trigger and listener is not the same thing as a connection.

    vcBooleanSignalMap has an event that can be used to listen for port value change. vcHelpers.Robot does have a method that allows you to wait for an input port connected to a signal to have a defined value, and it is the same as using a Wait Binary Input Statement in robot program.

    A signal has a Connections property. And your script needs to be listed as a connection of that signal in order for the signal to be a trigger in the script. An input port is not a signal. So the expression in your triggerCondition returns a false value.

    You have a few options.

    Option 1 – Script behavior is added as connection to the signal connected to the input port, and then that signal is used as trigger NOT the port.

    Option 2 – Refactor and use vcBooleanSignalMap event to listen for port value change.

    Option 3 – Refactor and use the vcHelpers.Robot object to call the wait() method.

    Option 4 – Refactor and create a loop that checks the value of the signal connected to the input port at a certain hertz, thereby delaying the script.

    Personally, I would do option 3. I think there is a tutorial in academy that shows how to do option 2, but I don’t remember the lesson offhand.

Viewing 7 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic.