Help - Search - Members - Calendar
Full Version: Control Logix Indirect Address'
Forums.MrPLC.com > PLCs and Supporting Devices > Allen Bradley
hipoint2
Does anybody know if you can use an expression for a indirect address'. For example

ADD(Test[whocares-1],1,test2);
TWControls
Yes except the whocares-1. The "-" is an invalid charactor

Misunderstood the question. No I'm pretty sure you can't
Alaric
As long as Test is an array and Whocares is a DINT tag, you can do that.


QUOTE
Yest except the whocares-1. The "-" is an invalid charactor

I first assumed that was Whocares minus 1, which is a valid expression, but not embedded in a ladder ADD instruction. You can embed that in a CPT instruction however or in ST.
CPT Test2 "Test[Whocares - 1] + 1"
TWControls
Actually Alaric it looks like it is a valid expression. oops.gif I just tried it and it worked. Only one catch. If whocares is 0 then it points to -1 and faults the processor.
hipoint2
That would explain why I couldn't find the darn thing in the tag database. The new things that you learn about these Logix controllers. Thanks again.
Alaric
QUOTE(TWControls @ Aug 1 2006, 01:59 PM) [snapback]37606[/snapback]
Actually Alaric it looks like it is a valid expression. oops.gif I just tried it and it worked. Only one catch. If whocares is 0 then it points to -1 and faults the processor.



Well I'll be dipped. I learned something too. I would have thought it was valid only in a CPT instruction. I'll have to give this a try myself. I've got a CompactLogix at my desk I can try it on.



TWControls
Ok I've played with it and can't find any snags in it besides watching not to point outside the data boundary. Hipoint, I wold still use caution in using this method

It does not work with the Micrologix 1100 so I'm guessing that it doesn't work with any RsLogix 500 products

This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2010 Invision Power Services, Inc.