Skip to main content

Example - Ladder Diagram

COS


The COS instruction calculates the cosine of the REAL operand, S, and saves the result in an assigned REAL data register, D.

Ladder Diagram Example


When the contact, M0.2, is ON (1), the instruction executes cos(0.865) and saves the result, 0.648640.


Memory Monitor

COSP


The COSP one-shot instruction calculates the cosine of the REAL operand, S, and saves the result in an assigned REAL data register, D.
Every time this instruction executes, it energizes the output only once.

Ladder Diagram Example


When the contact, M1.0, is ON (1), the instruction executes cos(-1.234) and saves the result, 0.330465.


Memory Monitor