Jump to content

Recommended Posts


Posted

My understanding is that if the address is prefixed with @, the actual address referenced is based on the value in that register.

So your second move command isn't writing to D500, it's looking at D500 and writing to the address indicated inside.

So based on your example code, The value 123 is written to D1500.

Posted

Yes, I know it. But I need make it in FB ( It is onpy example. It will be more comlex function with start address as parameter - I will set start address on input FB and fuction use address space from it.)

Posted
On 11/13/2017 at 8:26 AM, IO_Rack said:

Since it is tag based, you'll have to use an Array instead. Edit the variable then click on Advanced.

I second this comment.  Use an array inside the FB with a variable as the index.  

5a0c762113093_FBArray2.jpg.500f6cee55f77

5a0c75e05f6c4_FBArray.thumb.jpg.89c76cde

Posted

For FB typically we use the IR and DR register for indirect addressing. Although compared to the Decimal-based reference above (The @ tag) it's more complicated to use. But pretty reliable I'd say

Posted
20 hours ago, innoaloe said:

For FB typically we use the IR and DR register for indirect addressing. Although compared to the Decimal-based reference above (The @ tag) it's more complicated to use. But pretty reliable I'd say

Yes, I tried to provide the simplest (although perhaps less capable) solution.  If he does not need to access memory by address specifically (as many Omron FBs require to access memory for specific modules or functions), then this is much simpler.  

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
×
×
  • Create New...