{"id":"iec-max","model_id":"MAX","name":"CODESYS MAX","summary":"MAX is an IEC operator that returns the greatest value among its inputs. It is written as OUT := MAX(IN0, IN1, IN2, ...). The CODESYS example MAX(30,90,40) returns 90, and nested MAX calls are also shown.","study_notes":["The operator implements the maximum function.","Permitted data types: all.","Example: Var1 := MAX(30,90,40); returns 90.","Nested example: Var1 := MAX(40,MAX(90,30));","The syntax allows multiple inputs: IN0, IN1, IN2, ..."],"safety_notes":[],"sources":[{"url":"https://infosys.beckhoff.com/content/1033/tc3_plc_intro/2528961419.html","title":"Beckhoff Information System","accessed":"2026-10-26"},{"url":"https://content.helpme-codesys.com/en/CODESYS%20Development%20System/_cds_operator_max.html","title":"CODESYS Group","accessed":"2026-10-26"}],"verification":{"status":"source_checked","checked_at":"2026-10-26","values":3,"method":"llm_source_check"},"updated_at":"2026-10-26","type":"instruction","spec":{"language":"structured_text","code":"MAX","group":"maximum function","syntax":"OUT := MAX(IN0,IN1,IN2,...)","parameters":[],"dialect":"CODESYS","related":[],"standards":[]},"url":"https://machineschema.com/instruction/iec-max","license":"https://creativecommons.org/licenses/by/4.0/"}