RSLogix 5000 mixing literals and tags

Maximuse

Member
Join Date
Apr 2013
Location
Ontario
Posts
51
Hello everyone,
I've done a lot of searching on this and haven't found an answer yet. As the thread title implies is there any way to mix these elements within an instruction?
I know it can be done within array square brackets but I haven't been able to employ the same methodology elsewhere.
Specifically I was trying to make a Limit instruction to do this:

--------LIM-----------
|
| Lo Lim: (Apple - 5)
|
| Test: Orange
|
| Hi Lim: (Apple + 5)
|
-----------------------

Thanks!
 
Hi,
Unfortunately this is not possible as far as I'm aware, however you could just add a rung previous to this and use a SUB instruction (Apple - 5) and move the answer into another tag (Banana) and an ADD instruction (Apple + 5) move that into another tag (Pear) then on your Limit test:

--------LIM-----------
|
| Lo Lim: (Banana)
|
| Test: Orange
|
| Hi Lim: (Pear)
|
-----------------------

Which is how I would go about it....
 
Welcome to the forum.

Use two CMP instructions instead of the LIM instruction. CMP will support computation expressions.

CMP Orange>=(Apple-5) CMP Orange<=(Apple+5) OTE Banana


Edit:
Better yet, change the expression so you can use a single CMP
CMP ABS(Apple-Orange)<=5
 
Last edited:
TConnolly, your first example is actually what I've started doing it was at least a way to get everything on one rung. However, I love your suggestion of using the ABS inside of the compute, great idea +1 to you good sir.
 

Similar Topics

Hello all, I have a question in regards to RSlogix 5000. I am having issues with the program force closing when I try to make online edits. We...
Replies
0
Views
95
Greetings ... someone sent me a request for some student handsouts that I developed ... turns out that I had this hosted on my business website...
Replies
0
Views
109
Thank you for any and all responses/help. I have an RSLogix 5000 v20 and a Cognex In-Sight v5.9 spreadsheet (8502P). I can not figure out how to...
Replies
0
Views
101
Hi All, I've been pulling my hair out trying to fix this for a few days and need some advice. I have V19.01, v20.05, V21, V24, V30, V31, V32...
Replies
5
Views
348
Hello Friends I have a installation with v16, v17, v18, v19, v20. When I tried to open a v20 file, the enable source protection was not enabled...
Replies
1
Views
214
Back
Top Bottom