chelton

Cx-Programmer Offset address

6 posts in this topic

In the manual for CJ2's under offset addressing it states you can offset address a symbol value. Attached is the snippet from the manual. It doesn't work for me? Can anyone tell me if it does actually work or its in the manual and isn't actually implemented.

5f0cf33fcaef6_Offsetaddress.thumb.png.a4

Share this post


Link to post
Share on other sites

It works.

Which part is not working for you?

Mr_PLC_OffsetAddress.JPG.7cd681bed98f34a

Share this post


Link to post
Share on other sites

OK. You must mean this part... I don't know.

Mr_PLC_OffsetAddressError.JPG.ad5919783b

Share this post


Link to post
Share on other sites

Yes that's what i mean,

The only reason I found out was because I added a variable to the symbol table which I was using elsewhere with an address offset. Then when i tried to compile I had errors.

D0[2] works 

D0.00[2] works

D0[D1] works

D0[symbol_01] works

Symbol_01[1] Fails

Symbol_01[Symbol_02] Fails

 

Share this post


Link to post
Share on other sites

A while back I had a similar issue with D0[symbol + 1] in ST language. (The + 1 wouldn't compile).

It turned out that Omron had a bug that was quickly fixed by the following CX Programmer update. Make sure you have the latest updates. If the problem still exists, send a message to Omron Tech Support and see what response you get.

Share this post


Link to post
Share on other sites

Hello,
to use "Symbol_01[Symbol_02]", Symbol_01 must be defined as Array, and Symbol_02 must have a value within the range of that array...
Clipboard01.thumb.png.badc151b16c08efa2f
I know that's Array addressing rather than using Offsets, I believe the effect should be the same.

Omron should probably fix this to work as advertised in the manual...

 

 

Edited by Moravuscz

Share this post


Link to post
Share on other sites

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