Studio 5000 Find instruction help! Not working??

lunenburger

Member
Join Date
Jul 2008
Location
Summerside
Posts
207
I am using Studio 5000 Version 30 and Compactlogix.

I have a recipe created in a UDT structure, with a string value called name.
There are 50 Recipes in the RecipeList array
I want to take a string value called "ScannedRecipe" and have the PLC go down the list of 50 Recipes and find the name that matches, and load the recipe number into the CurrentRecipe list (see pic 1)

I am trying to use the find instruction, and there are no errors but it is also not working. (see pic 2)

I feel that i may need to use a wildcard or something instead of the zero in the search tag (RecipeList[0].Name but nothings working.

If anyone knows a better way i am open to other options.....

Thanks in advance

pic 1.png pic 2.png
 
Got it working with the FSC instruction. (see pic)
Have to unlatch the .IN and .FD bits of the RecipeSearch control word in the next rung....

res.png
 
Before COP instruction, for FIND instruction you need to analyze that Result is >0 because it passes power all the time, found or not.
For FSC, you need to check for .FD bit
 
In the Not Found Branch I would also add a XIC FSC.DN Bit. That way you know the search has completed and Not Found.
 
You should try to go back to FIND instruction.
FSC is probably overkill for this simple task.
But if you want to scan through an array then FSC is the way to go
 
Last edited:

Similar Topics

Hi, When installing new PC, how do I find what EDS file that is used for a device in an existing project. Without access to Studio 5000 on the...
Replies
3
Views
5,455
Hello! I am in the process of converting a Horner program into Studio 5000 for a customers gasifier. The Oxygen sensors are +/- 1000 mV. The...
Replies
3
Views
2,656
Hi everyone, I have an issue with installation of Studio 5000 33.00.02 DVD Media disc 2 with View Designer on Windows 11. After installation...
Replies
0
Views
31
Anyone have problems/solutions with Rehosting Studio 5000 to a new computer. Our IT department successfully Rehosted 2 laptops, but the other 2...
Replies
1
Views
103
Hi, I'm quite new to Rockwell PLC and currently trying to implement the following if Sw1 then for i:=1 to 20 by 1 do xEnable := 1...
Replies
4
Views
123
Back
Top Bottom