Interesting problem Mitsubishi is it a flaw ?

parky

Member
Join Date
Oct 2004
Location
Midlands
Posts
5,642
Some time ago, I looked at a form of indirect addressing on Q series PLC's, the normal way is to use the "Z" registers as an indirect pointer, so for example:
[Move 10 Z0] // load the index register with a constant of 10
[Move D0Z0, D100] //move D10 (D0 with offset of Z0 (10)) to D100
Fine it works as expected.
However, there is another way with a function called ADRSET, so the code
ADRSET[D0,D100] //get the actual address of D0 & store in D100
ADD[10,D100,D100] // Add an offset of 10 to the address in D100
MOV[ @D100, D102] // move the contents of the register (D0 +10 (D10) to D102
Works ok in GXDeveloper or GXWorks2 Ladder.
However, in GXWorks2 in FBD there is a function called ADRSET but cannot use the "@" symbol in a variable. see code, it will not compile:
Now have looked in the help files & in the functions list but no answers, has anybody tried this, is it a bug in the FBD if so, why include the ADRSET function if you cannot use it, or is it just there is some other instruction that is the equivelent of the @ in FBD, if so I cannot find any information on it in the help or on-line.
The pic shows the two ways, ladder compiles ok & runs, FBD does not.

Lad_FBD.png
 
BTW, it makes me proud when there is something you don't know regarding GxWorks2 or Gx IEC Developer and I know. There are only few guys with that much expertise in Mitsu, like you have.
 
Yeah, I know it does not work, it's stupid, why do they have the abillity to get the indirect address but not use it, I was hoping that for some reason they had changed the symbol or use a special function, my Mitsubishi manuals in e-Viewer does not show that text you highlighted, typical japanese some explanations are a bit well, poor perhaps the translation. Oh well, it's Z registers then, not that I would probably use the ADRSET but just found it a bit weird why they have included the setting of the address but not the way to access it in FBD.
 
Yes I did try it some time ago i.e. use ladder in a FB, as I said, not really got an application for it at the moment have an idea though for an ex client. I certainly do not know much about the newer hardware i.e. FX5, IQF, TIA & CLX however, been in the industry for over 45 years so from AB to Siemens & all those in between I have gained a lot as well as the best ways to tackle most control scenarios, as I'm now sort of retired, the control sector is moving on & costly so my experience comes from the past, can only give limited information based on what I know with current systems and putting past experience into modern systems. I'm sure you know probably things I don't, like all of us, we do not always get exposed to certain systems like motion control, only done a little bit as the last few years most of my work has been in food manufacturing i.e. batch control, most of the packaging machines I have had dealings with are OEM with their own systems engineers & of course the proliferation of servos in this field is now standard.
It is sad that on this forum there are only a few that either have the experience on Mitsi, Omron etc. but as this is predominently a US site, RW being the preferred systems & what seems to be certainly more issues with their hardware/software
 
Hi parky, you'll be pleased to know you can use ADRSET function and the @ notation in FBD/structured LD in GX Works3 for IQR series PLCs.
 
Yes I came to that conclusion, however, even if global labels are being used you cannot use the label you have to use actual address for example:
Assume the global labels are D0 = My_Source, My_Address = D100 & My_Dest = D10
ADRSET[MY_Source,My_Address] Fine this is ok
MOV[@My_Address, My_Dest] will not work
MOV[@D100,My_Dest] is ok
I think for clarity using the pointers as an offset is probably the way to go.
 
I agree, when you know the device address like with Q stick to using the Z registers.

I've found ADRSET is most useful in GXW3 when using pure labels, or VAR IN of FBs (i.e. no known device address set) to obtain the actual address when needing the source value as a reference, particularly for arrays or strings.
 
Yes probably right, in the Q or Fx series the compiler compiles symbolic only addresses into physical addresses depending on the compiler settings, these are normally located in the D9000 range so care needs to be used as the compiler only knows the physical address of the indirect pointer start address, if you could use a symbolic only with the @ it will at compile time allocate a physical address to that so adding to the address get pointer could overwrite some other compiler allocated physical address.
At least in the Q or FX symbolic addresses if tied to physical ones you know if the address of say D100 & you use the Z registers by adding 10 to the pointer will only address D110.
As in a non physical address lets say at compile time it allocated that to D9888
Then you add 10 to the pointer that would be D9898, however, unless it is done as an array the compiler would not know D9898 was being used so could use it for another symbol.
 

Similar Topics

Hi friends I am facing one strange problem these days.I have siemens S7 PLC communication and WinCC in our system.In PLC we are using DB121 for...
Replies
6
Views
1,900
There was a thread that delt with a wire or rebar mill that moved steel at a speed of up to 100 m/s. The metal is rolled through 'stands', each...
Replies
35
Views
6,249
We have a piece of equipment that runs a slc 500 1747-L40C with the 2 slot expansion rack connected to a panelveiw 300 2711 K3A2L1 over the pic...
Replies
6
Views
4,128
Good morning everyone, I've got 2 servo driven axes that each use a Heidenhain glass slide to the motion controller for position and velocity...
Replies
4
Views
1,387
Back
Top Bottom