Skip to main content

Example - Ladder Diagram

BATAN


The BATAN instruction calculates the arctangent, or inverse tangent, of the 4-digit binary coded decimal (BCD) operand, S, and saves the result in an assigned 8-digit binary coded decimal (BCD) data register, D.

Ladder Diagram Example


When the contact, M1.5, is ON (1), the instruction executes atan(H4646) and saves the result, H00000345.


Memory Monitor

BATANP


The BATANP one-shot instruction calculates the arctangent, or inverse tangent, of the 4-digit binary coded decimal (BCD) operand, S, and saves the result in an assigned 8-digit binary coded decimal (BCD) data register, D.
Every time this instruction executes, it energizes the output only once.

Ladder Diagram Example


When the contact, M1.6, is ON (1), the instruction executes atan(H8888) and saves the result, H00000358.


Memory Monitor