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...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

622 ASCII Conversion <strong>Instructions</strong> (STOD, STOR, DTOS, RTOS, UPPER, LOWER)String To DINT (STOD)The STOD instruction converts the ASCII representation of an integerto an integer or REAL value.Operands:STODString To DINTSource ???Dest ???Relay LadderOperand Type Format Enter NotesSource string tag tag that contains the valuein ASCIIDestinationSINTINTDINTtagtag to store the integervalueString data types are:• default STRING data type• any new string data type that you createIf the Source value is a floating-point number,the instruction converts only the non-fractionalpart of the number (regardless of thedestination data type).REALSTOD(Source,Dest);Structured TextThe operands are the same as those for the relay ladderSTOD instruction.Description:Arithmetic Status Flags:The STOD converts the Source to an integer and places the result inthe Destination.• The instruction converts positive and negative numbers.• If the Source string contains non-numeric characters, the STODconverts the first set of contiguous numbers:– The instruction skips any initial control or non-numericcharacters (except the minus sign in front of a number).– If the string contains multiple groups of numbers that areseparated by delimiters (for example, / ), the instructionconverts only the first group of numbers.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!