12.07.2015 Views

Logix5000 Controllers General Instructions - SLAC Confluence

Logix5000 Controllers General Instructions - SLAC Confluence

Logix5000 Controllers General Instructions - SLAC Confluence

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Math Conversion <strong>Instructions</strong> (DEG, RAD, TOD, FRD, TRN, TRUNC) 567Truncate (TRN)The TRN instruction removes (truncates) the fractional part of theSource and stores the result in the Destination.Operands:Relay LadderOperand Type Format DescriptionSource REAL immediate value to truncatetagDestinationSINTtagtag to store the resultINTDINTREALStructured Textdest := TRUNC(source);Use TRUNC as a function. This function truncates source and storesthe result in dest.See Appendix B for information on the syntax of expressions withinstructured text.Function BlockOperand Type Format DescriptionTRN tag FBD_TRUNCATE structure TRN structureFBD_TRUNCATE StructureInput Parameter Data Type DescriptionEnableIn 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 floatOutput Parameter Data Type DescriptionEnableOut BOOL The instruction produced a valid result.Dest DINT Result of the conversion instruction. Arithmetic status flags are set for this output.Publication 1756-RM003I-EN-P - January 2007

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!