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.

Structured Text Programming 663Assign an ASCII character to a stringUse the assignment operator to assign an ASCII character to anelement of the DATA member of a string tag. To assign a character,specify the value of the character or specify the tag name, DATAmember, and element of the character. For example:This is OKThis is not OK.string1.DATA[0]:= 65; string1.DATA[0] := A;string1.DATA[0]:= string2.DATA[0]; string1 := string2;To add or insert a string of characters to a string tag, use either ofthese ASCII string instructions:Toadd characters to the end of a stringinsert characters into a stringUse This InstructionCONCATINSERTExpressionsAn expression is a tag name, equation, or comparison. To write anexpression, use any of the following:• tag name that stores the value (variable)• number that you enter directly into the expression(immediate value)• functions, such as: ABS, TRUNC• operators, such as: +, -, , And, OrAs you write expressions, follow these general rules:• Use any combination of upper-case and lower-case letter. Forexample, these three variations of "AND" are acceptable: AND,And, and.• For more complex requirements, use parentheses to groupexpressions within expressions. This makes the wholeexpression easier to read and ensures that the expressionexecutes in the desired sequence. See “Determine the order ofexecution“on page 669.Publication 1756-RM003I-EN-P - January 2007

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

Saved successfully!

Ooh no, something went wrong!