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.

354 Array (File)/Misc. <strong>Instructions</strong> (FAL, FSC, COP, CPS, FLL, AVE, SRT, STD, SIZE)Example 3:Search for a string in an array of strings. When enabled, the FSCinstruction compares the characters in code to 10 elements incode_table.codecode_tablecode_table_search.POSSAMAFG 0BEH 1HUO 2SAK 3SAM 4FQG 5CLE 6CAK 7DET 8BWG 9The FSC instruction finds that this arrayelement equals code. The instruction setsthe .FD and .IN bits. The .POS (4) valueindicates the position of the equal element.To continue comparing the rest of the array,clear the .IN bit.FSC expressionsYou program expressions in FSC instructions the same as expressionsin CMP instructions. Use the following sections for information onvalid operators, format, and order of operation, which are common toboth instructions.Publication 1756-RM003I-EN-P - January 2007

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

Saved successfully!

Ooh no, something went wrong!