January 17, 2019, 07:29:28 PM
Robotforum | Industrial Robots Community

 Storing Vision data into a position variable


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

0 Members and 1 Guest are viewing this topic.

October 04, 2018, 03:16:18 PM
Read 221 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.

Linkback: https://www.robot-forum.com/robotforum/index.php?topic=28713.0
  • Like    Thanks

Today at 07:29:28 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

  • Like    Thanks
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
1415 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
1905 Views
Last post June 05, 2014, 08:48:43 PM
by rumblefish
xx
Vision system and robot position correction

Started by Diogo on Fanuc Robot Forum

0 Replies
1079 Views
Last post March 21, 2016, 12:18:04 PM
by Diogo
xx
R-30iA controller loading and storing the programs directly from/on a PC

Started by AndyW84U on Fanuc Robot Forum

7 Replies
5137 Views
Last post July 11, 2014, 05:52:54 AM
by shestipal