Sample program 1

Sample program 1 1: Download

Connection of a serial bar code scanner

In this example a bar code reader is connected to the EL6001. Characters will be read by the reader until the ASCII character 0x0D (13dec, CR) is received.

Data:

A detailed description for the use of the serial communication library is stored in the Beckhoff Information System.

Beckhoff Information System -> TwinCAT -> TwinCAT PLC -> TwinCAT libraries for PC-based systems -> TwinCAT PLC Library : Serial communication

Starting the example program

The application examples have been tested with a test configuration and are described accordingly.

Certain deviations when setting up actual applications are possible.

The following hardware and software were used for the test configuration:

Procedure for starting the program

Sample program 1 2:Fig.152: Searching the Ethernet adapter
Sample program 1 3:Fig.153: Selection and confirmation of the Ethernet adapter

Activation of the configuration and confirmation:

Sample program 1 4:Fig.154: Activation of the configuration
Sample program 1 5:Fig.155: Confirming the activation of the configuration
Sample program 1 10:Fig.160: Received barcode