EasyManua.ls Logo

Allen-Bradley Logix5000

Allen-Bradley Logix5000
708 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
570 Rockwell Automation Publication 1756-RM003N-EN-P - October 2011
Chapter 16 Math Conversion Instructions (DEG, RAD, TOD, FRD, TRN, TRUNC)
Truncate (TRN)
The TRN instruction removes (truncates) the fractional part of the Source and
stores the result in the Destination.
Operands:
Relay Ladder
Structured Text
Use TRUNC as a function. This function truncates source and stores the result in
dest.
See Structured Text Programming
for information on the syntax of expressions
within structured text.
Function Block
FBD_TRUNCATE Structure
Operand Type Format Description
Source REAL Immediate
Tag
Value to truncate
Destination SINT
INT
DINT
REAL
Tag Tag to store the result
Operand Type Format Description
TRN tag FBD_TRUNCATE Structure TRN structure
dest := TRUNC(source);
Input Parameter Data Type Description
EnableIn BOOL Enable input. If cleared, the instruction does not execute and outputs are not updated.
Default is set.
Source REAL Input to the conversion instruction.
Valid = any float
Output Parameter Data Type Description
EnableOut BOOL The instruction produced a valid result.
Dest DINT Result of the conversion instruction. Arithmetic status flags are set for this output.

Table of Contents

Other manuals for Allen-Bradley Logix5000

Related product manuals