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.

562 Math Conversion <strong>Instructions</strong> (DEG, RAD, TOD, FRD, TRN, TRUNC)Convert to BCD (TOD)The TOD instruction converts a decimal value (0 ≤ Source ≤ 99,999,999) toa BCD value and stores the result in the Destination.Operands:Relay LadderOperand Type Format DescriptionSource SINTimmediate value to convert to decimalINTtagDestinationDINTA SINT or INT tag converts to a DINT value by zero-fill.SINTtagstores the resultINTDINTFunction BlockOperand Type Format DescriptionTOD tag FBD_CONVERT structure TOD structureFBD_CONVERT StructureInput Parameter Data Type DescriptionEnableIn BOOL Enable input. If cleared, the instruction does not execute and outputs are not updated.Default is set.Source DINT Input to the conversion instruction.Valid = any integerOutput 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.Description:BCD is the Binary Coded Decimal number system that expressesindividual decimal digits (0-9) in a 4-bit binary notation.If you enter a negative Source, the instruction generates a minor faultand clears the Destination.Arithmetic Status Flags:Arithmetic status flags are affected.Publication 1756-RM003I-EN-P - January 2007

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

Saved successfully!

Ooh no, something went wrong!