skyfox

SYSMAC STUDIO - NX1P2 - Array copy help needed.

5 posts in this topic

I have an array of 30 Reals.

 

"Pressure_1"   declared as  30 reals.

How do I transfer/copy this to another array of same length?

I want to copy...

Pressure_1.0   to %D0

...

...

...

Pressure_1.29 to %D59

 

Without having to explicitly enter %Dxx in to the "AT" designation 60 times manually. This would be sheer insanity if I have arrays of thousand elements etc.

Is there an easier way to do this?

 

Thanks.

 

 

Share this post


Link to post
Share on other sites

Why do you need to copy the array?

Can't you just set the address translation (AT) on the existing array to %D0. The array then should be accessible from %D00-%D59  

Share this post


Link to post
Share on other sites

Look at all the instructions with "Ary" in the name.

Share this post


Link to post
Share on other sites

AryMove is what you're after

Share this post


Link to post
Share on other sites
On 4/18/2022 at 1:38 AM, chelton said:

Why do you need to copy the array?

Can't you just set the address translation (AT) on the existing array to %D0. The array then should be accessible from %D00-%D59  

Thanks.

I did not know one could do that. I thought each array element had to be manually mapped in to the address translation.

As far as why I want to copy the array, it is for saving the data in one array after an process ends. So the original array can be used for collecting new data for the next run.

Cheers.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now