20/05/2019 at 13:03 #14491
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?
You need to login in order to like this post: click here20/05/2019 at 15:38 #14495
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:
Getting the rotation around Z axis can be accomplished only via the APIs.
Try out that pick and place library first!
You need to login in order to like this post: click here28/05/2019 at 09:16 #14716
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.
You need to login in order to like this post: click here28/05/2019 at 13:50 #14733
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:
You need to login in order to like this post: click here29/05/2019 at 01:02 #14752
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.
You need to login in order to like this post: click here29/05/2019 at 14:19 #14786
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
You need to login in order to like this post: click here29/05/2019 at 15:13 #14789
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.
You need to login in order to like this post: click here
You must be logged in to reply to this topic.