Indirect addressing with GX Developer

DairyBoy

Member
Join Date
Jun 2007
Location
UK
Posts
393
Good day All.

Indirect addressing; AB...OK, Indirect addressing; Omron...OK, Indirect addressing; Mitsubishi Q series...HELP! Yes, I have looked it up in the book, but it just won't sink in. By the looks of it I won't be able to indirectly load timer values without a proxy register, but my addled brain is struggling with even the D-register to D-register stuff. Would some kind person please post a one-liner to show me how it's done? Many thanks.
 
Not sure if this is what you would like to do:
Code:
  |-|LD X0|-----------(OUT T0 D0N0)-|

Now. When N0 is equal to 0, then the timer takes its timelimit from D0 register.
When N0 is equal 1, it takes timelimit from D1 register, and so on.
 
Mchl, Thanks, but the editor throws out the structure that you suggested (only one address allowed in the t function), but I'm still looking for a way to move say, the data in D0 into another D register @(value in)D1. If D1=3, then move contents of D0 into D3, etc.
 
Pierre, It looks good. I've tried it on the simulator with D registers and it works ok. Q: There is a limit of Z0-Z9, so is it safe to use (for example)Z0 many times in the program as long as the loading of Z0 is next to (immediately before) the rung that uses the Z0 to do the pointing? So it just gets reloaded "locally" wherever it's needed in the program?
 
Yes

From the Mitsubishi FX2N Programming manual

IndexReg.jpg
 
DairyBoy said:
Mchl, Thanks, but the editor throws out the structure that you suggested (only one address allowed in the t function)

There's a good reason for that. I mixed up Z and N registers (somehow this happens often to me...). Of course in the example a Z register should be used. N go for Master Control Nesting (see MC and MCR instructions)

DairyBoy said:
, but I'm still looking for a way to move say, the data in D0 into another D register @(value in)D1. If D1=3, then move contents of D0 into D3, etc.

For this you also use N...arrr... Z registers, but it has been shown to you already.

Also: Q02 and up give you a total of 16 Z registers. Not much, but apparently sufficient for most uses.
 
Last edited:
Thanks everyone. I've run some experiments in the simulator and all come out as predicted with this new information. I like the idea of an implicit offset in the function; very useful for indexing chunks of contiguous data from different areas in the database. But then, that's probably why they did it...
 

Similar Topics

Howdy folks, I am an Allen Bradley guy currently living in an Emerson world. Working with Rx3i on PacSystems Machine Edition v. 9.6? i think...
Replies
3
Views
648
Hello, I'm very new to programming with absolutely zero schooling in this field and pretty hands off training in my new role, it's been fun...
Replies
4
Views
685
Hello Friends, I am trying to index M Bits, however GX Works2 is not allowing it with following message. https://ibb.co/zPcqj6M...
Replies
3
Views
1,406
Hi All, which the best way to do the indirect addressing in an optimize DB? Ccurrently this is my partial code inside an FB...
Replies
7
Views
2,292
Hey everyone, Just used the PLC5/Logix migration utility to convert a program, and while addressing the PCEs, I noticed a lot of errors for "XIC...
Replies
12
Views
2,038
Back
Top Bottom