File search (FSC) PLC2

mwatkins

Member
Join Date
Jun 2002
Posts
73
I have read about this but never used it. I am converting a PLC2 over to a SLC5/04, is there a way I can do something simular?
Would I use an FBC? I have never used this either.
Thanks for the help
 
The PLC-5 is really the heir to the PLC-2 application set, so it contains the FSC and FBC instructions that work similarly to the ones in the PLC-2/30. I don't think any of the smaller PLC-2 models had those file instructions, but they were all obsolete before I joined the Company five years ago so I don't know for sure. They aren't in the Mini PLC-2 manuals I have in hardcopy.

The FBC and DDT instructions were recently added to the SLC-5/03 and higher controllers in Series C firmware, to match the PLC-5 instruction set.

But as you've found, a File Search isn't built into the SLC-500 instruction set. So we have to "roll our own".

The point of the FSC is to move through a file of a determined length and compare a source value to each element of the file, and set a flag and pointer when a match is found.

A FOR-NEXT loop would be the conventional way to do this, but the SLC doesnt' have one of those, either.

A subroutine would be my preferred way to separate this function from the rest of the ladder logic. I'm going to run one through my bench SLC and I'll attach it to a later post.
 
What is the length of the FSC?
- If the FSC is only operating on a couple of words, then it would probably be easier to just do the logical operations on each of the words seperately instead of trying to create a For/Nxt loop in an SLC.

What is the expression?
-What logical operation is being done? i.e. NEQ, GRT Than etc.

What status bits from the FSC being used in the logic?
-i.e. how is the .FD bit being used?

My PLC2 memory is very foggy, so I am asking these questions based off of a PLC5.
 
The attached is an FSC subroutine for the SLC that just looks for equal values in an array of up to 255 words.

I only ran it on my emulator; your mileage may vary.
 

Similar Topics

Hello Everyone, I am searching doing a search using my compact logix L33 and I want to show all the data found ( it can be as high as 60, 70...
Replies
5
Views
3,012
Hi Could really do with some help, please. I'm trying to find HMS_1011.gsd for an AnyBus communicator OPC-G11S-PDP. I've tried their website...
Replies
3
Views
3,042
I have a block valve FESTO, with code like this: 1. VIGA 03-FB-4 (18,656 L307) - 4 Digital Output 2. VIGA 03-FB-4 (18,656 L307) - 4 Digital Output...
Replies
5
Views
3,926
With the FCS instruction in a PLC 2 would this be the same as using a SQC in a SLC? Does the FCS do the comparison as long as the rung stays true...
Replies
2
Views
3,987
Back
Top Bottom