March 22, 2019, 02:37:31 PM
Robotforum | Industrial Robots Community

 Storing Vision data into a position variable

Author Topic:  Storing Vision data into a position variable  (Read 264 times)

0 Members and 1 Guest are viewing this topic.

October 04, 2018, 03:16:18 PM
Read 264 times
Offline

amotobb


I am very new to Motoman robots so bear with me,

I am sending vision data in bytes XYZ & Rx Ry Rz via profinet communication to a Dx100 controller. I want that byte to be stored in a position variable. How do I do that? Is there a convert instruction? Do I have to convert it mathematically in the job?

I don't know if it makes any sense? I'm just looking for a general direction to go in.

Thanks.

Today at 02:37:31 PM
Reply #1

Advertisement

Guest

October 04, 2018, 06:18:14 PM
Reply #1
Offline

95devils


Don't know how much data you are sending for each.  I typically do a word for X, a word for Y, and a byte for RZ.  I also send over a bit for each to determine positive or negative.  I also check the value of each against 0 and against the previous value.  Those sections are not in the sample below.  You would need to massage the instructions to fit where the data is coming in.   Because of resolution, I had to multiply by 10 on this cell.  You may not need to do this, you may need it, or you may have to multiply by 100.

The DIN reads in a byte of data. 


' Read in X data
DIN B040 IG#(31)
DIN B041 IG#(32)
SET D040  EXPRESS B041 * 256 + B040
MUL D040 10
' check X positive
JUMP *XPOS IF IN#(233)=OFF
MUL D040 -1
*XPOS
' Read in Y data
DIN B042 IG#(33)
DIN B043 IG#(34)
SET D041  EXPRESS B043 * 256 + B042
MUL D041 10
' check Y positive
JUMP *YPOS IF IN#(234)=OFF
MUL D041 -1
*YPOS
' Read in Theta data
DIN B044 IG#(35)
DIN B045 IG#(36)
SET D042  EXPRESS B045 * 256 + B044
' check theta positive
JUMP *THETAPOS IF IN#(235)=OFF
MUL D042 -1
*THETAPOS
'--------------------------------
' Set up pick shift variable
SETE P001 (1) D040
SETE P001 (2) D041
SETE P001 (6) D042

Alcohol:  The cause and solution to all life's problems


Share via facebook Share via linkedin Share via pinterest Share via reddit Share via twitter

question
How to Using NACHi FD & Vision Off-Set Data

Started by Cho. Sung Ryong on Nachi Robots

0 Replies
1465 Views
Last post February 17, 2016, 05:52:12 PM
by Cho. Sung Ryong
xx
Ir Vision: Rotational data transfer to machine tool

Started by robmx57 on Fanuc Robot Forum

2 Replies
1970 Views
Last post June 05, 2014, 08:48:43 PM
by rumblefish
xx
Position gap between vision and EPSON robot

Started by tcyang123 on Robot Vision and Vision Products

0 Replies
25 Views
Last post Today at 12:08:31 AM
by tcyang123
xx
Vision system and robot position correction

Started by Diogo on Fanuc Robot Forum

0 Replies
1127 Views
Last post March 21, 2016, 12:18:04 PM
by Diogo