4 threads on RS5000 indirect addressing not enough...

NotaHippie

Member
Join Date
Apr 2019
Location
Colorado
Posts
4
Good day.

I firmly believe there are stupid questions. This may be one of them.

I haven't found a clear solution on the other indirect addressing threads. I can't quite wrap my mind around how using additional array(s) will solve the issue.

On the attached screenshot:

FLLR5_SUP_TANK is just a dint,
FTTM_YM_SET_TANK is our Factory Talk Transaction Manager UDT, with a recipe dint.
CONV_ST_TO_PLANT4[41] is a recipe string being messaged from another contrologix. FSC compares to one of 5 1D recipe arrays for a positive match on the ilock.

I would obviously like to solve the cumbersome attached screenshot with something like CONV_ST_TO_PLANT4[41]=PLANT4_[FTTM_YM_SET_TANK[FLLR5_SUP_TANK].Yoghurt_Recipe]_ARRAY[FLLR5_FSC_CONTROL.POS]

This would be ridiculous, not to mention it doesn't work.

I know from reading the other threads that you can't "double" indirect address. So does the fact that I have to have an indirect address aka the .POS prohibit me from using any other indirect address in the expression?

Again, good day.

addressing_blunder.jpg
 
Last edited:
Welcome!
FYI your image didn't attach. The site or something seems to be having issues with images. Maybe save your image as a PDF and attach that.
 
Yup only one nested indirect address is allowed inside an expression. However if you have a 2-D array both elements can be indirect (Sample_Tag[Indirect_X][Indirect_Y])

If it were more than the handful of recipes that you have here (5 options) I would do the following:
1.. capture a change of "FLLR5_SUP_TANK" i.e. NEQ FLLR5_SUP_TANK Last_ID
2.. copy value from "FTTM_YM_SET_TANK[FLLR5_SUP_TANK].Yoghurt_Recipe" to a new tag "FSC_TANK_ID"
3.. copy all 54 elements in the array from PLANT4_[FSC_TANK_ID]_ARRAY tag to a new tag "PLANT4_FSC_WORK[xxx]"
4.. MOV FLLR5_SUP_TANK Last_ID
5.. do the fsc with the following expression:

CONV_ST_TO_PLANT4[41]=PLANT4_FSC_WORK[FLLR5_FSC_CONTROL.POS]

6.. CLR Last_ID to refresh the temporary work array if data changes elsewhere in the process
 
You need to be careful when using the same Control structure in multiple instructions. It is generally recommended to have a separate instances. For example, do not use "FLLR5_FSC_CONTROL" in four FSC instructions. You might get away with it in this case if there is a reset (not shown) for the found condition.

(Also looks like a typo on the fourth FSC, control FLLR4 referencing FLLR5 in the expression.)
 
Double Nesting is possible if a little awkward

Whilst double nesting an indirect index isn't possible, you can double nest by using an indirect index inside an indirect addressing routine. (in fact you can nest just about as many times as you want)

Something along the lines of the attached picture. The message instruction points back to a tag defined by a string inside the current PLC, meaning that you can create a string of anything you like and reference to it (so long as the tag has been pre-created)
[I'm not actually double nesting in the image below in the same way as the post asked but the same method will work for it too]

Indirect Addressing.png
 
You need to be careful when using the same Control structure in multiple instructions. It is generally recommended to have a separate instances. For example, do not use "FLLR5_FSC_CONTROL" in four FSC instructions. You might get away with it in this case if there is a reset (not shown) for the found condition.

(Also looks like a typo on the fourth FSC, control FLLR4 referencing FLLR5 in the expression.)

Yargh you got me with the typo. And thanks for the insights, I do have a reset but have figured out a hopefully better way at this point with just one FSC.
 

Similar Topics

Not sure if it's a setting somewhere I can change or if it's normal/expected behavior, but if I'm away from this forum for over a day or so (like...
Replies
1
Views
599
Not sure if it me, but is it possible to download a complete thread into a nice PDF or something. I seen a post from Phil Melore back in 2003 but...
Replies
3
Views
2,037
Hey Everyone, I recall seeing multiple threads a while back regarding needing a certain version of RSLinx to establish communications for a...
Replies
2
Views
1,640
This is to Phil, but I think that others may want to comment. There seems to be a wave or resurrected threads recently. And it seems that it is...
Replies
12
Views
2,796
Hi, Anyone else having issues with plctalk and displaying all threads correctly? It's not a big problem, just curious. I'm using IE8 beta, but...
Replies
5
Views
2,393
Back
Top Bottom