| View previous topic :: View next topic |
| Author |
Message |
fuadwi Junior

Joined: 25 Jul 2018 Posts: 1
|
Posted: 24/07/2019 09:00 Post subject: CX-Programmer Instruction Move Data to Certain Data Area |
|
|
dear all,
is there any instruction in CX-Programmer to save / move data on certain Data Area?
for example : I want to move FFFF data to Dy address. we can set y as address number.
so, if y = 455, FFFF will be moved to D455.
if y = 9 , FFFF will be moved to D9, etc
thanks in advance |
|
| Back to top |
|
 |
mstahl Junior

Joined: 14 Jan 2018 Posts: 3
|
Posted: 24/07/2019 14:23 Post subject: |
|
|
some clues
https://accautomation.ca/omron-cp1h-data-movement/ |
|
| Back to top |
|
 |
xyzz Junior

Joined: 16 Nov 2016 Posts: 1
|
Posted: 24/07/2019 19:50 Post subject: |
|
|
You need to use indirect addressing.
The simplest way is the @D compus in the move instruction.
In such address, the content of the D is not the data for the instruction, but the address of the register to be used.
MOV @D0 D100 when D0=455 means MOV D455 D100
When D0=9 it means MOV D9 D100
However, this method works only for D registers.
For other data area you will have to use index registers. |
|
| Back to top |
|
 |
|