odd

PLCopen motion icon

 Function - Test if an integer is odd.

Inputs

Input

Data Type

See Data Types.

Range

Unit

Default

Description

IN

DINT

 

 

 

Input value.

Outputs

Output

Data Type

See Data Types.

Range

Unit

Description

Q

BOOL

 

 

  • TRUE if IN is odd.
  • FALSE if IN is even.

FBD Language Example

FFLD Language Example

  • In the FFLD Language, the input rung (EN) enables the operation.
    • The output rung keeps the state of the input rung.
    • The function is executed only if EN is TRUE.

IL Language Example

Not available.

ST Language Example

Q := ODD (IN);

See Also