{"id":"iec-find","model_id":"FIND","name":"CODESYS FIND","summary":"FIND is a CODESYS Standard library string function declared as FUNCTION FIND : INT. It searches for the first occurrence of substring STR2 in string STR1 and returns the character position. If STR2 is not found in STR1, it returns 0.","study_notes":["Example in ST: arINT1 := FIND('abcdef','de'); returns 4."],"safety_notes":[],"sources":[{"url":"https://infosys.beckhoff.com/content/1033/tcplclib_tc2_standard/74414091.html","title":"Beckhoff Information System","accessed":"2026-10-26"},{"url":"https://content.helpme-codesys.com/en/libs/Standard/Current/String-Functions/FIND.html","title":"CODESYS Group","accessed":"2026-10-26"}],"verification":{"status":"source_checked","checked_at":"2026-10-26","values":12,"method":"llm_source_check"},"updated_at":"2026-10-26","type":"instruction","spec":{"language":"structured_text","code":"FIND","group":"String Functions","syntax":"FIND(STR1, STR2)","parameters":[{"name":"FIND","data_type":"INT","description":"Character position of the first occurrence of STR2 in STR1; 0 if no occurrence is found."},{"name":"STR1","data_type":"STRING(255)","description":"String within which STR2 is searched."},{"name":"STR2","data_type":"STRING(255)","description":"String whose position is searched in STR1."}],"dialect":"CODESYS","related":[],"standards":[]},"url":"https://machineschema.com/instruction/iec-find","license":"https://creativecommons.org/licenses/by/4.0/"}