You are on page 1of 4

December 15, 2010

String Length (SLEN), Extract String (EXTS), Find String (FNDS)

String Length (SLEN)


The String Length instruction is used to determine the length of a string up to 128
characters. When the enable rung goes high, the CPU determines the number of characters in
the input string and outputs that value to the Length tag which can be any type of integer or
floating point number.

techcorner.quantumautomation.com | 4400 East La Palma Ave. Anaheim, CA 92807. | P: 714-854-0800. | F: 714-854-0803


Page |2

Extract String (EXTS)


The Extract String instruction can be used to isolate a specified portion of a source string
tag or string constant. When the enable rung is ON, the operation will be performed every scan
and hold its output value when it is OFF. Just enter the source string constant or tag, the
starting location to extract data from (Start Index), the number of characters, and the destination
Tag. You can also choose to swap characters if necessary for your application.

techcorner.quantumautomation.com | 4400 East La Palma Ave. Anaheim, CA 92807. | P: 714-854-0800. | F: 714-854-0803


Page |3

Find String (FNDS)


The Find String instruction is useful for finding specific information within a source string,
tag or Hex data. You can narrow the search by using the To Index and From Index parameters
to specify where, within the source data, the search should be performed. Please see the
following page for a complete string manipulation example using the String Length, Extract
String, and the Find String instructions.

techcorner.quantumautomation.com | 4400 East La Palma Ave. Anaheim, CA 92807. | P: 714-854-0800. | F: 714-854-0803


Page |4

techcorner.quantumautomation.com | 4400 East La Palma Ave. Anaheim, CA 92807. | P: 714-854-0800. | F: 714-854-0803

You might also like