Move based on counter value.

javaninger

Member
Join Date
Mar 2010
Location
mo
Posts
10
See attached image.

I am looking for a way to copy based on the count. I have an example shown, if the value .ACC value is 1, I want to copy from position 1, if the .ACC value is 2, I want to copy from position 2. I know this seems simple, but I want a few hundred of these, and do not want to have hundreds of rungs. I tried an FAL instruction, but that does not seem to be the best way. Any help?

mov-array.jpg
 
You can do the following thing in you move instruction:
Tag: ROBOT_ITEM_OFFSET_OUTFEED_PAT1_PUBLIC[COUNTER_ROBOT[0].ACC]

I'm not complete sure if this works, maybe you have to use a COP instruction or move the counter value in a Tag, and place this Tag in the Source Tag like:
Move: COUNTER_ROBOT[0].ACC > COUNTER_VALUE
Move: ROBOT_ITEM-OFFSET_OUTFEED_PAT1_PUBLIC[COUNTER_VALUE] > Eth_robot:O.Data[13]

Goodluck!

Jack
 

Similar Topics

I seem to be making this harder than it should be, and Its not making any sense. I simply need to move a real variable to two integer variables...
Replies
8
Views
993
V 10.00.01 Patch 9 Looking for the best way to have two or more variations of the same global object. Say a pump with a valve and sometimes you...
Replies
2
Views
2,625
Hi everyone, I am working with micro850, a proximity sensor (FOTEK, PL-05P) and a 3DOF serial arm robot. I use MC_MoveRelative to control the...
Replies
1
Views
84
So I'm pretty green when it comes to troubleshooting in the field so bear with me. We have a Danfoss valve that opens/closes from an analog output...
Replies
23
Views
979
Hi. This is pretty basic but I'm struggling to find an efficient solution. I have a float value of let say 666.555 that I want to move / split...
Replies
3
Views
225
Back
Top Bottom