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,472
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,665
What is the best way to extract the hour and minute from the register that comes from Yaskawa VFD. In studio 5000 I have a register saved as INT...
Replies
2
Views
64
I have an Allen Bradley temperature switch that I am trying to use in studio 5000. I am getting the message "Unable to interpret the IODD file"...
Replies
0
Views
45
Hi all. I want to ask what may seem a stupid question, as I have a project to send live data to a Yeacode line printer which will print meterage...
Replies
2
Views
105
Back
Top Bottom