RSLogix / Logix Designer - Writing same value in an array

If you want to be minimalist, you don't need the extra tag for MIN_TIME_ABS. You could ABS MIN_TIME to MIN_TIME (itself) before the MUL to eliminate any negativity...

Edit: ah yes, good one DrBB.
 
Last edited:
Not exactly

The NEQ is there to trigger a rising edge of the FAL's input rung, because the FAL will only run on the single scan when that rising edge is detected, so even if the rung stays True on subsequent scans, the FAL will not write anything to the destination until the input rung transitions first to False and then back to True.

As it turns out, the output of the NEQ will be a one shot, and another one shot cannot occur until MIN_TIME_1000 changes to a new, different value.

Ah, yes, my bad....Had FLL in my head still from the earlier discussion. Carry on.
 
I don't think this LIM will pass the value, it will only be OFF if outside the range.


Unless you just don't want it to pass a value outside the range, then this is correct.


Edit #3: Yeah, I guess that was your point, I'm seeing it now. I'm struggling getting my mind off that I'm not in FBD anymore.
:site:


Yeah, some instructions (XIC/XIO a.k.a. normally open/closed contact, ONS, comparisons (LES/LEQ/GRT/GEQ/EQU/NEQ/LIM), etc.) AND the result of their operation on their operands with the state (True or False) of the incoming rung and put that ANDed evaluation on their output rung, which usually affects either what the output instructions do (OTE, TOF/TON, etc.), or whether they do anything (OTU/OTL, FAL/CTU/CTD/CTUD/FSC/..., ADD/SUB/MUL/DIV, etc.).

The "instructions pass current flow, or not," and other, mental models of PLC ladder logic will break your heart at some point. The only model that is always reliabelis described in this video series; watching the first three or four videos in that series at 1.5-2x normal speed will be the most productive half hour you ever spend on this topic.
 


I will look at it, thanks.


I'm really struggling to understand the basics of Rockwell and also Ladder syntax in Rockwell.


I usually do SFC and FBD with Schneider, and the thing I miss the most right now is the ability to use an "output" more than once.


Ex: logic 1 is enabled: use that one; logic 2 is enabled, use the other one. And on and on and on.


It's the same tag on both OUT.


With Rockwell, even if the "Block" is disabled, OUT is not "floating", it's still writing into it.


I have another problem coming up next post. I'm learning a lot these days.

ADD.jpg
 
Last edited:
This screenshot is the AOI with the timers you've been helping me with (the one on the right).


Purpose of this is to give a clear visual to the maintenance / P&C guys on the statuses of the inputs. I know some people won't like it. If anyone have better or constructive ideas, i will be glad to hear them.



DI_REMAP_LD


So from left to right, we have the wired input. IN_15 is the end of the 24VDC chain to give me a QUALity bit in case I'm relying on a low to take action (is it a real low value, or my 24DC is failed?)


I have a mask to negate (BNOT) some of the inputs because I want to alarm on high all the time. And because BNOT takes a lot of room in a page (with SE it's a dot on the input leg), I'm using a DINT mask to make the FBD cleaner.


This is also where I have my simulator for testing and FAT to basically clear most of the alarms when activated.




DI_HMI_REMAP_LD


This is where I deal with quality and annunciation time.


Tags ending with _HMI are the tags going to the Modbus Remap and this is why it's not a straight line betwen the 2 AOI / blocks. That way I can remap a wired input to another location without touching the Modbus Remap (and Gateway addressing, and HMI, and SCADA). If the input mask is set to "1", that means that the alarm will stay on for at least 5 seconds, making sure that the HMI/SCADA will catch it in case it goes on and off between 2 HMI Modbus scans, which happened enough that I'm still doing this. If it's a "control" input, mask should be "0", unlike 43UCS_AUTO which I used to test.


It's looking better now but I just don't understand why _APS_F_HMI is showing "0" when OUT_02 is showing "1".


If it was an Unity Pro program, I would be looking at what else is writing in that tag, but that cannot happen with Rockwell if I'm getting it right.




I won't be having a good time with that project.




Thanks again everyone.

DI.jpg
 
Last edited:
You could ABS MIN_TIME to MIN_TIME (itself) before the MUL to eliminate any negativity...


I did it at first, which I found weird that it would even work.


But the value was cycling 0 / -10 / 0 / -10 / 0 / etc.

Didn't like it.
 
But the value was cycling 0 / -10 / 0 / -10 / 0 / etc.
That sounds like you ABS'd MIN_TIME_1000 to itself while a negative MIN_TIME was also being MUL'd to MIN_TIME_1000. It was positive after the ABS to the .PRE, but then negative from the MUL to the ABS which is why you would see it flicker while online in Studio. ABS MIN_TIME, not MIN_TIME_1000 would be better in this case.

But, then drbitboy indirectly noted that an INT or a DINT can be 1 more negative than the positive limit of the datatype and ABS isn't bulletproof.
 
It's looking better now but I just don't understand why _APS_F_HMI is showing "0" when OUT_02 is showing "1".

What does the MASK input of the DI_HMI_REMAP_LD block do? Never mind.

Seeing the code inside the AOIs would help to debug.

Although I don't understand the code exactly, you should be able to XOR Local:3:I.Data, as an INT, with the BNOT_MASK in a single instruction, and then the result is an INT comprising bits OUT_00 through OUT_15.
 
Last edited:
What does the MASK input of the DI_HMI_REMAP_LD block do? Never mind.

Seeing the code inside the AOIs would help to debug.

Although I don't understand the code exactly, you should be able to XOR Local:3:I.Data, as an INT, with the BNOT_MASK in a single instruction, and then the result is an INT comprising bits OUT_00 through OUT_15.


Yeah, I'm using BOOL as Inputs and Outputs. I could indeed use INT.X for both of them, but I was wondering if there were limitations doing so.


So, if I follow you well, that would be possible to drive all outputs from the same rungs for all 16 of it?

DI_HMI.jpg
 
Yeah, I'm using BOOL as Inputs and Outputs. I could indeed use INT.X for both of them, but I was wondering if there were limitations doing so.


Looks like my first limitation would be to lose the individual inputs and outputs, which defeats the purpose of the AOIs.
 
So, if I follow you well, that would be possible to drive all outputs from the same rungs for all 16 of it?

yes. Loops are not best implemented in ladder, but it is possible (as I showed).

whether the output of the AOI is sixteen bools or one 16-bit INT is a matter of complete indifference, if we assume the HMI can be driven by either sixteen OUT_xx references or sixteen OUT_INT.xx references.
 
Last edited:
Looks like my first limitation would be to lose the individual inputs and outputs, which defeats the purpose of the AOIs.
Wait.

Do you have one instance of an AOI evaluating logic on 16 boolean pairs (IN_xx and MASK.xx;xx=0-15), or sixteen instances of an AOI with each AOI instance evaluating logic on one boolean pair?

Because the latter might make more sense, two rungs (the OSR is unnecessary) in the AOI, and sixteen instances of (rungs with) that AOI.
 

Similar Topics

Hi. Which of these system bits should I use to know that a particular AI or AO channel is faulted? Like I lost the 4-20mA loop, or the input is...
Replies
10
Views
880
Hi. I'll say it again, I worked mostly with Unity Pro for the last 12 years and I'm trying to convert our FBD standard to Rockwell Logix...
Replies
13
Views
1,507
So I have a question, How would I convert or transfer a program from Logix Designer to Rslogix 500. Im going to be taking said program and putting...
Replies
6
Views
1,615
Hello everyone! I am new to PLC programming and am using Studio 5000 to work with AB PLCs. My company uses VMware to allow me to remotely...
Replies
3
Views
1,325
All, Please help. I'm reaching the end of my rope with this thing... I can find tech notes galore on fatal errors with logix 5000 for everything...
Replies
7
Views
5,288
Back
Top Bottom