{"id":"iec-ln","model_id":"LN","name":"CODESYS LN","summary":"LN is an IEC operator that calculates the natural logarithm of a numeric input. It accepts any numeric basic data type as input and returns a REAL or LREAL result. For example, LN(45) yields approximately 3.80666.","study_notes":["Permitted input data types: any numeric basic data type.","Permitted output data types: REAL and LREAL.","Example in ST: q := LN(45); returns 3.80666."],"safety_notes":[],"sources":[{"url":"https://infosys.beckhoff.com/content/1033/tc3_plc_intro/2529106571.html","title":"Beckhoff Information System","accessed":"2026-10-26"},{"url":"https://content.helpme-codesys.com/en/CODESYS%20Development%20System/_cds_operator_ln.html","title":"CODESYS Group","accessed":"2026-10-26"}],"verification":{"status":"source_checked","checked_at":"2026-10-26","values":2,"method":"llm_source_check"},"updated_at":"2026-10-26","type":"instruction","spec":{"language":"iec_61131_3","code":"LN","parameters":[],"dialect":"CODESYS","related":[],"standards":[]},"url":"https://machineschema.com/instruction/iec-ln","license":"https://creativecommons.org/licenses/by/4.0/"}