RSL5000 indirect addressing to 3 levels

DairyBoy

Member
Join Date
Jun 2007
Location
UK
Posts
393
Hi all. I have a tag called "SYS_PARAs" which is dimensioned 4,12,36 and I want to move data into specific locations from another tag so I've used a COP function and set the destination as: SYS_PARAs[HMI_WR_SYS_No,HMI_WR_RTE_No,0] but when I float the mouse over the indirect portion of the address, it shows HMI_WR_SYS_No,HMI_WR_RTE_No,0 as one undefined tag. If I insert a space after the commas it shows each component, e.g. "HMI_WR_SYS_No," as the undefined tag and if I insert spaces before and after the commas it identifies the tags ok and checks out when the routine is verified. Is this really the correct format or should I be using more square brackets? I thought that commas were the correct separators, but not with so much fresh air around them! Thanks.
 
Thanks Bernie. On reflection that makes: three sets of indirects, but it doesn't pass validation. The tags are recognised but the error is "invalid expression or tag". I don't think it's a tag-type issue; they're all dint. A cursor float over the "SYS_1_PARAs" part yields "invalid array subscript: SYS_PARAs[HMI_WR_SYS_No]" Only the first set of brackets, with or without spaces between the components. If I put everything in sq brackets: SYS_PARAs[[HMI_WR_SYS_No][HMI_WR_RTE_No][0]] the cursor float rejects everything. I'll challenge the R.A. guys tomorrow. It's supposed to be a public holiday here today, but this prog has got me tied to the desk :cry:
 
Ok, so my three sets of brackets was a wild guess. Now at work I predefined the array index variables. Once defined it accepted them all packed together - no spaces. But it didn't seem to recognise undeclared variables correctly when seperated by commas.

As far as indirects (and arrays aren't really indirects) I think nested indirects are what is not permitted.
 
Last edited:
do it step-by-step ...

change the tagnames to something simple like "JOE" and "SAM" and "TOM" ... put a resonable value in each pointer ... get it WORKING that way ...

then (and ONLY then) go back and "Edit the Properties" for each tag - and call them whatever long confusing names you want ...

I know this is (probably?) NOT your problem - but the weirdest "tagname won't work" case that I ever had to help a customer with involved a "CAPITAL I" (as in "India") which had accidentally been typed in as a "lowercase l" (as in "Lima") ... since the software doesn't usually display "serifs" it wasn't obvious why the tagname wouldn't work right until we Copied-and-Pasted its name into Notepad and changed the font ...

INDIRECT_HMI.JPG
 
Last edited:
So, another step backwards for RSL then? In 500 I can (should I really want to wind up the customer's engineer) address a coil as:
B[N7:0]:[N7:1].[N7:2] although N7:0 in the offline file has to be pre-loaded with a valid dummy value before verification. Ok, so I've never done it to 3 levels, but to 2? Yes; it's a computer- that's what they (should be able to) do.
 
Thanks for taking the time to try it, Bernie. The tags are in the database, they're dint and the project has been saved, so what am I doing wrong if it still says:
"undefined tag: HMI_WR_SYS_No,HMI_WR_RTE_No,0" ? Surely I don't have to create a tag called "HMI_WR_SYS_No,HMI_WR_RTE_No,0" ?
 
Yep, same as mine (except it's a copy function). What does the cursor have to say when it's floated over the indexing portion of the instruction?

BTW, online help file says:

For this array: Specify:
one dimension: array_name[subscript_0]
two dimension: array_name[subscript_0, subscript_1]
three dimension: array_name[subscript_0, subscript_1, subscript_2]

Maybe the editor expects everything the cursor encounters to be declared in the data base. It's been a long day.
 
The cursor says they are undefined!

But as I change their values, using the Tag Monitor, and the values in the array everything matches up, the displayed value is correct. The compiler accepts it.

Ok, so just a confused cursor. Verifying your observation, the cursor doesn't recognise the comma as a tag terminator, but the compiler does.
 
Last edited:
Ron, I've had similar things happen, and I can stare at the code for long periods of time and not see the obvious. There have been times when I've even gone to the point of deleting the line and manually retyping it and then verify it - and finally all of sudden the mistake becomes obvious - the one misplaced letter that our brains insisted on "auto correcting" for us when we looked at it.

o_O
 
Thanks for your patience, Ron. I can sleep tonight without dreaming of rearranging one tidy line into goodness knows how many. I know.. I'll dream of the hmi instead :ROFLMAO:
 
I know this is (probably?) NOT your problem - but the weirdest "tagname won't work" case that I ever had to help a customer with involved a "CAPITAL I" (as in "India") which had accidentally been typed in as a "lowercase l" (as in "Lima") ... since the software doesn't usually display "serifs" it wasn't obvious why the tagname wouldn't work right until we Copied-and-Pasted its name into Notepad and changed the font ...

That's nasty.
 

Similar Topics

I'm trying to use indirect addressing on the RS Logix 5000 ladder platform, how does that work? The PLC5/500 to 5000 conversion instructions did...
Replies
1
Views
1,411
I am using version V17.01.00 (CPR 9 SR 1) I have a fairly large machine with multiple PIO nodes on an ethernet network. I am getting a flashing...
Replies
2
Views
1,433
Hello, My coworker and I are commissioning a new panel. We have a 1732-AENTR series C remote IO thats Rev 6.1. The project file from a previous...
Replies
3
Views
1,625
Hello all. Yes, I remember well that RSL5k v.20 was plagued with issues however, it used to run on my laptop. After many years of hibernation I...
Replies
2
Views
1,573
Is there are way to set up RSLogix 5000 to start up with a category in the Controller Organizer 'minimized'? For instance, make the Add-On...
Replies
2
Views
1,747
Back
Top Bottom