UseDegreesPLCopen motion icon

FunctionClosed A function calculates a result according to the current value of its inputs. A function has no internal data and is not linked to declared instances. - Sets the unit for angles in all trigonometric functions.

Inputs

IN : BOOL     If TRUE, turn all trigonometric functions to use degrees
              If FALSE, turn all trigonometric functions to use radians (default)

Outputs

Q : BOOL      TRUE if functions use degrees before the call

Remarks

This function sets the working unit for the following functions:

SIN
COS
TAN
ASIN
ACOS
ATAN

ATAN2
sine
cosine
tangent
arc-sine
arc-cosine
arc-tangent
arc-tangent of Y / X

ST Language

Q := UseDegrees (IN);

FBD Language

FFLD Language

(* Input is the rung. The rung is the output *)

IL Language

Op1: LDClosed "Ladder diagram" Ladder logic is a method of drawing electrical logic schematics. It is now a very popular graphical language for programming Programmable Logic Controllers (PLCs). It was originally invented to describe logic made from relays. The name is based on the observation that programs in this language resemble ladders, with two vertical "rails" and a series of horizontal "rungs" between them   IN
     UseDegrees
     ST   Q