Jump to content

Recommended Posts

Posted

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


Posted

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

 

Posted

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.

Posted (edited)

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

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...