{"id":"iec-right","model_id":"RIGHT","name":"CODESYS RIGHT","summary":"RIGHT is a string function that returns a specified number of characters from the right side of an input string. RIGHT(STR, SIZE) returns the first SIZE characters from the right in STR. Its return type is STRING(255), and it is used in structured text programs.","study_notes":["RIGHT (STR, SIZE) returns the first SIZE characters from the right in string STR.","The example RIGHT('SUSI',3) returns 'USI'.","The function return type is STRING(255)."],"safety_notes":[],"sources":[{"url":"https://infosys.beckhoff.com/content/1033/tcplclib_tc2_standard/74423307.html","title":"Beckhoff Information System","accessed":"2026-10-26"},{"url":"https://content.helpme-codesys.com/en/libs/Standard/Current/String-Functions/RIGHT.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":"structured_text","code":"RIGHT","group":"String Functions","syntax":"RIGHT (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-right","license":"https://creativecommons.org/licenses/by/4.0/"}