7 posts in this topic

Hello there.

How to transfer data from one memory area to another using macro ?

 

Data Type - Double

Word Length - 4

Format - BIN

Integer - 3, Decimal - 1

 

From Area - D

To Area - LW

Edited by SillyBoy

Share this post


Link to post
Share on other sites

Why use a macro?

If you use a data transfer property you can grab a double from the PLC and move it to the LW memory:

 

Capture.PNG

Share this post


Link to post
Share on other sites
46 minutes ago, photovoltaic said:

Why use a macro?

If you use a data transfer property you can grab a double from the PLC and move it to the LW memory:

 

 

 

@photovoltaic

 

Because I want to transfer almost 150 different addresses.

So I guess it will be easy to use macro.

Share this post


Link to post
Share on other sites
36 minutes ago, SillyBoy said:

 

@photovoltaic

 

Because I want to transfer almost 150 different addresses.

So I guess it will be easy to use macro.

I see. Its been a while since I made an NB macro - I'll look through an old program later today

Share this post


Link to post
Share on other sites
34 minutes ago, photovoltaic said:

I see. Its been a while since I made an NB macro - I'll look through an old program later today

 

Thank you very much.

Share this post


Link to post
Share on other sites

So The trick here is to transfer the data as Unsigned Integers (or any 16-bit variable) and transfer twice as much as you need. You can't create Double Arrays in the macro environment so this is the only workaround I found. The data is still in tact as you can see in the HMI - it is being displayed as a double.

Capture.PNG

c2.PNG

c3.PNG

2 people like this

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