Operating instructions
Example for bar code scanner Page 12 of 12 Issued: 03/2002
5. Operating instructions
If you have carried out all described steps correctly, your system is now ready for scanning.
The scanner reads the bar codes and stores them in a telegram which is sent to the basic unit. The program in
the basic unit is designed in a way that it permanently receives the incoming telegrams of the scanner. Then the
telegrams are checked whether they are error-free (telegram structure check). If this is the case, the scanned
bar code is filtered out of the telegram and supplied for further processing.
The scanned bar code is compared to reference telegrams stored in a table (VALID_SCANS). In case of
coincidence, the assigned text is read from another table (VALID_SCAN_TEXT) and supplied for output at the
terminal. If the bar code does not match a stored reference telegram, a default text is output at the terminal. The
table VALID_SCAN_TEXT is already pre-initialized with values. The table containing the reference codes
(VALID_SCANS) is empty at the beginning.
Therefore, the first step when taking the program into operation is to determine the reference codes. For this
purpose the program provides a TEACH_MODE. In this mode all scanned bar codes are entered to the
VALID_SCANS table one after the other. You can start the TEACH-MODE by either connecting input E62,0 of
the PLC to 24 V DC or by forcing this input with TRUE (refer to 907 AC 1131 documentation, part 1)
. Now hold
all bar codes which shall be entered to the reference codes table in front of the scanning window one after the
other. In the program it is defined that a maximum of 10 reference codes can be entered. After all reference
codes have been scanned, apply a FALSE signal to input E62,0 (apply 0 V DC to the input or delete the input by
forcing with <CTRL><F7>). This will terminate the TEACH MODE.
F NOTE: When the TEACH MODE is entered a second time, the VALID_SCANS table is completely
deleted and the new scanned telegrams are entered to the table.
Bar codes which are scanned after this are compared to the values of the reference telegrams as described
above and in case of coincidence the assigned texts are output on the terminal. If no terminal is connected you
can read this text from the variable "OUTPUT_TEXT".
The following information is applied to the PLC outputs:
• The outputs A63.04 and A63.5 indicate whether the communication between the scanner and the
PLC is running. If the outputs are alternately flashing, the communication is ok. If both outputs are
off (LEDs do not light), the connection between the scanner and the PLC is disturbed (check the
connecting cable and the supply voltage of the devices).
• The outputs A63.06 and A63.7 indicate whether the communication between terminal and PLC is
running. If the outputs are alternately flashing, the communication is ok. If both outputs are off
(LEDs do not light), the connection between the terminal and the PLC is disturbed (check the
ARCNET connection, the addresses (NODE numbers) and the supply voltage of the devices).
• The outputs A62.0 ... A62.7 display the total number of telegrams received without error.
• The outputs A62.8 ... A62.15 display the number of the reference telegram matching the scanned
code.
F NOTE: If the displayed number is higher than the number of available reference telegrams, no
match was detected.