Rockwell-automation Logix5000 Controllers ASCII Strings Programming Ma Bedienungsanleitung Seite 21

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 32
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 20
Processing ASCII characters Chapter 2
Create the PRODUCT_INFO Data Type
To create a Product_Info user-defined date type in the Controller Organizer,
right-click User-Defined and click New Data Type. Configure the user-defined
data type as follows.
Data Type: PRODUCT_INFO
Name
PRODUCT_INFO
Description
Identifies the destination for an item based on an ASCII string of characters that identify the
item
Members
Name Data Type Style Description
Product_ID STRING
ASCII characters that identify the item
Lane DINT Decimal Destination for the item, based on its ID
Search for the characters
You can search for characters by creating the following ladder logic routine.
The SIZE instruction performs the following:
Counts the number of elements in the sort_table array (type
PRODUCT_INFO). This array contains the product ID for each item and
the corresponding lane number for the item.
Counts the number of elements in Dimension 0 of the array. In this case,
the only dimension.
Sets the Length of the subsequent FSC instruction equal to the size of the
sort_table array.
The FSC instruction searches each Product_ID member in the sort_table array
until the instruction finds a match to the product_id tag.
Rockwell Automation Publication 1756-PM013D-EN-P - October 2014 21
Seitenansicht 20
1 2 ... 16 17 18 19 20 21 22 23 24 25 26 ... 31 32

Kommentare zu diesen Handbüchern

Keine Kommentare