SillyBoy Posted October 7, 2022 Report Posted October 7, 2022 (edited) 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 October 7, 2022 by SillyBoy
photovoltaic Posted October 7, 2022 Report Posted October 7, 2022 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:
SillyBoy Posted October 7, 2022 Author Report Posted October 7, 2022 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.
photovoltaic Posted October 7, 2022 Report Posted October 7, 2022 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
SillyBoy Posted October 7, 2022 Author Report Posted October 7, 2022 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.
photovoltaic Posted October 7, 2022 Report Posted October 7, 2022 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. 2
SillyBoy Posted October 8, 2022 Author Report Posted October 8, 2022 Thank you very much @photovoltaic
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now