March 22, 2019, 02:37:31 PM

# 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

#### amotobb

##### Storing Vision data into a position variable
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

Guest
##### Re:  Storing Vision data into a position variable

October 04, 2018, 06:18:14 PM

#### 95devils

##### Re: Storing Vision data into a position variable
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.

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
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
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

### Similar Topics

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

Started by Cho. Sung Ryong on Nachi Robots

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

Started by robmx57 on Fanuc Robot Forum

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

Started by tcyang123 on Robot Vision and Vision Products

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

Started by Diogo on Fanuc Robot Forum

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