Move element between Array in Unity

sivarun04

Member
Join Date
Nov 2011
Location
*******
Posts
3
Hi

I am working in Unity Pro V 6.0. I am stuck in moving elements between Arrays
:mad:
I got two Array of different size and BYTE Data Type.

eg. Array1[0..150] of BYTE, Array2[0..280] of BYTE data type.

I have to move 100 Elements of Array1 starting from 20 to Array2 starting from 50.

Array1[20] => Array[50] - Start reference, 100 elements.

Thanks
 
Located or unlocated data? (with or without %MW address)

For both you can still use move_array or copy_array block
 
Hi Lare,

Thanks,

I am working on a DFB. Its unallocated area.

I can use move and copy,the constrain are,

1) I have to move only 100 element in the array, not the total array to another, that rules out move instruction..if I am correct.

2) I see that I can use copy instruction, but my data type is byte. I see that copy instruction works with
bool, int, dint.

Any ideas.

Thanks
 
I would create a new section of code within the DFB, create a ST section and just use a FOR loop to step through the array
 
For loop will do this.

Extract block should also work. You can also use %MW addresses with move blcok, you need first made your data to located and from stetting menu you have to select: "directly represented array variables".

Try if you can open file. (V6.0 Unity)
 

Similar Topics

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
63
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
969
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
219
hi, I got a plc S7-1200 with SEW movitrac **** and i need to program something ridiculous if my application reaches sensor 1 then my SEW has to...
Replies
0
Views
192
Afternoon, I have a DB in TIA Portal V16 that is optimised. I cannot change this. There is an array inside that block which consists of 3000...
Replies
9
Views
1,160
Back
Top Bottom