Or logic For integer Value equal a number

I think it does not allow using a CONTROL object that is a member of an array of CONTROL objects.


Try creating a CONTROL object TEST_TEG0 (Data Type = CONTROL, not CONTROL[N]), and use that in the Control input, and use TEST_TEG0.POS in the Expression input.




Update: see below.


fsc.png
 
Last edited:
It's the nested "[....]" it is baulking at.

If you want to keep your control tags in an array, you could make TEST_TEG0 as an alias to TEST_TEG[0], TEST_TEG1 an alias to TEST_TEG[1], and so on ....
 
You could always indirect address Integer[x] and use a counter that increments x by one each scan (self resetting after counting to 20), and then compare the values for each of them one at a time. Of course it will take 20 scans to check all 20 values. It works but depending on how important speed is in the application it might not be the best approach.

Can you give a quick example? I’m curious if a second option if my first option doesn’t work.

Thanks everyone for your help! It means a lot.
 
See attached files

@Cstep: If it works out for me, it should do the same for you.
Just one question "1001" is one thousand and one or binary 1001 (decimal 9) ?, this is important when making the comparison.

I cand send even the program if you need it.

As you can see my mother language is spanish , but in this case it does not matter.

william

fsc tags.JPG
 

Attachments

  • FSC report.pdf
    19.1 KB · Views: 9
I'm working from home on administrative detail so I don't have access to the software to send a screen shot. I don't spend a lot of time in AB land anymore and it's been nearly 20 years since the days I could do elaborate rungs in Logix using only text entries. Hopefully this crude outline gets the idea across if I didn't mess anything up.

Rung 1: -| |-S:FS-------------MOV (20 into pointer)
Rung 2: LES (pointer < 21)-----ADD (pointer + 1---------Destination: pointer)
Rung 3: EQU (pointer = 21)--------MOV (0 into pointer)
Rung 4: EQU (INT[pointer] = 1001)---------( ) Your boolean tag

First rung is only important if you want to make absolutely sure you scan all 20 array elements on start up, otherwise [0] will be skipped on the first loop.

Like I said, I don't spend a whole lot of time in AB these days so wasn't aware of FSC. Plan to check it out though the next time I am in Studio.
 
The FSC function is the best way to do what you need
if the processor doesn't support the build or write one your self using a simple loop
we did searches before they had the function
 
@Cstep: If it works out for me, it should do the same for you.
Just one question "1001" is one thousand and one or binary 1001 (decimal 9) ?, this is important when making the comparison.

I cand send even the program if you need it.

As you can see my mother language is spanish , but in this case it does not matter.

william

1001 is the integer form fault that comes in. See images. Once any once of those are read I want to send to a bit displaying a fault on the HMI. The HMI alarms only read bits or discrete.

Fault Codes.PNG
 

Similar Topics

I have a machine which is undergoing upgradation. As part of the process two SEW drives are being replaced., existing Gen B with new Gen C. The...
Replies
3
Views
148
Hello Dear users, I am writing about a problem that has been bothering me for a few days, i.e. I am trying to establish remote access to the Allen...
Replies
0
Views
75
My PLC is currently running the program and the process is still live. One of my 1769-if16C cards values are all frozen but the card is not...
Replies
1
Views
111
need to find C bits in the logic. They are hidden someplace! Thank you! Bob
Replies
5
Views
181
Good day everyone. if you have a logic for 3 pumps (lead/lag/off), would you please email it to me? I really appreciate it!
Replies
7
Views
174
Back
Top Bottom