Allen Bradley FSC Expression

bob1371

Lifetime Supporting Member
Join Date
Mar 2003
Location
Southern Indiana
Posts
355
Hello,

Trying to use an FSC instruction to search an array for part number.

Hardware -
5069-L306erms
C-More Headless HMI

Software -
Studio5000 v32.13

I have a Part_Recipe array of Data Type Recipe[1000]
One of the elements of the Recipe UDT is PartNumber of Data Type String

Operator inputs a 12 character alpha numeric part number on HMI and this is stored in a tag, PartNumber of Data Type String

I've added an image showing what I have for testing purposes. Part Recipe array element 2 has the part number that matches what PartNumber has. I figured once triggered the FSC would return a Position of 2 and stop but it runs to 999. I can only assume my expression is wrong.

FSC.PNG
 
You have indeed not set up the expression properly -- you have it comparing PartNumber to the same first part number in the array (position 0) 1000 times; since that value never changes it will either find a match the first time or never do so.

Instead of [0] you need to use the FSC's current position to iterate through the array, [C01_Cav1_FileSearch.POS]

EDIT: Your logic elsewhere may already prevent it being an issue, but if BAllen remains true the scan after the position is found, it will continue through the rest of the array.
 
Last edited:

Similar Topics

Hi how's it going. Was just wondering if someone could help me out. Recently one of the guys over on the LinuxCNC forums put me onto getting an...
Replies
15
Views
326
Hello, Does anyone have one of these cables and willing to open the case so I can see the cable connections inside? 2707-NC5 I have sourced the...
Replies
3
Views
95
Currently trying to find: micrologix ethernet interface 1761-NET-ENI AIC to micrologix 761-CBL-AM00 Ser C cable These are used for micrologix...
Replies
3
Views
138
in allen bradley kinetix 300 drive first E31 error shows after resting drive E11 error occurs need solution to reset E11 fault code
Replies
4
Views
179
Hi, I have a ControlLogix system with 1756-IF16 analogue inputs. I can't scale the inputs at the card as there is a requirement to facilitate...
Replies
14
Views
463
Back
Top Bottom