{"id":"iec-left","model_id":"LEFT","name":"CODESYS LEFT","summary":"LEFT is a string function that returns a specified number of characters from the start of a string. It takes a STRING(255) input and an INT size, and returns a STRING(255); LEFT('SUSI',3) returns 'SUS'.","study_notes":["The function declaration is FUNCTION LEFT : STRING(255).","The return value is a STRING(255) resulting string.","Example: VarSTRING1 := LEFT('SUSI',3); the result is 'SUS'."],"safety_notes":[],"sources":[{"url":"https://infosys.beckhoff.com/content/1033/tcplclib_tc2_standard/74417163.html","title":"Beckhoff Information System","accessed":"2026-10-26"},{"url":"https://content.helpme-codesys.com/en/libs/Standard/Current/String-Functions/LEFT.html","title":"CODESYS Group","accessed":"2026-10-26"}],"verification":{"status":"source_checked","checked_at":"2026-10-26","values":9,"method":"llm_source_check"},"updated_at":"2026-10-26","type":"instruction","spec":{"language":"iec_61131_3","code":"LEFT","group":"String Functions","syntax":"LEFT (STR, SIZE)","parameters":[{"name":"STR","data_type":"STRING(255)","description":"String to be analyzed"},{"name":"SIZE","data_type":"INT","description":"Number of characters"}],"dialect":"CODESYS","related":[],"standards":[]},"url":"https://machineschema.com/instruction/iec-left","license":"https://creativecommons.org/licenses/by/4.0/"}