curlyandshemp
Lifetime Supporting Member
I am relatively new to the S7-300 family, but have over 15 years S5 experience and 6 years Contrologix experience.
I have an app in S7 , where I need to lookup up a product text description based on a DINT product code entered via an HMI. In the Clgx world, I would have 2 arrays set up to do this, one array of DINTs would be filled with all the valid product codes, and another array of STRINGS would be filled with the text descriptions. DINT[1] would correspond with STRING[1], DINT[2] with STRING[2] ...etc.I would use the FSC ( File Search and Compare ) instruction to find the position of the valid entered product code in the DINT array. The element position of the found product code would give me the index value to point into the array of STRINGS to acquire the text description.
I cannot seem to find any S7-300 equivalent instruction, or a standard function block to perform the same. Has anyone else done this before?
Thanks
Ian
I have an app in S7 , where I need to lookup up a product text description based on a DINT product code entered via an HMI. In the Clgx world, I would have 2 arrays set up to do this, one array of DINTs would be filled with all the valid product codes, and another array of STRINGS would be filled with the text descriptions. DINT[1] would correspond with STRING[1], DINT[2] with STRING[2] ...etc.I would use the FSC ( File Search and Compare ) instruction to find the position of the valid entered product code in the DINT array. The element position of the found product code would give me the index value to point into the array of STRINGS to acquire the text description.
I cannot seem to find any S7-300 equivalent instruction, or a standard function block to perform the same. Has anyone else done this before?
Thanks
Ian