chelton Posted July 13, 2020 Report Posted July 13, 2020 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.
IO_Rack Posted July 14, 2020 Report Posted July 14, 2020 It works. Which part is not working for you?
IO_Rack Posted July 14, 2020 Report Posted July 14, 2020 OK. You must mean this part... I don't know.
chelton Posted July 14, 2020 Author Report Posted July 14, 2020 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
IO_Rack Posted July 15, 2020 Report Posted July 15, 2020 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.
Moravuscz Posted July 17, 2020 Report Posted July 17, 2020 (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... 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 July 17, 2020 by Moravuscz
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now