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.

386 Array (File)/Misc. <strong>Instructions</strong> (FAL, FSC, COP, CPS, FLL, AVE, SRT, STD, SIZE)Example 2:Find the number of elements in the DATA member of string_1, whichis a string. Store the size in string_1_size. In this example, the DATAmember of string_1 has 82 elements. (The string uses the defaultSTRING data type.) Since each element holds one character, string_1can contain up to 82 characters.Relay LadderSIZESize in ElementsSource string_1.DATA[0]'$00'Dim. To Vary 0Size string_1_size82Structured TextSIZE(string_1.DATA[0],0,string_1_size);Example 3:Strings_a is an array of string structures. The SIZE instruction finds thenumber of elements in the DATA member of the string structure andstores the size in data_size_a. In this example, the DATA member has24 elements. (The string structure has a user-specified length of 24.)Relay LadderSIZESize in ElementsSource strings_a[0].DATA[0]'$00'Dim. To Vary 0Sizedata_size_a24Structured TextSIZE(strings_a[0].DATA[0],0,data_size_a);Publication 1756-RM003I-EN-P - January 2007

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

Saved successfully!

Ooh no, something went wrong!