Banner iVu Plus User Manual

iVu Plus BCR Communications User's Guide
Online Only - rev. A 1/7/2011
Contents
Contents
1 iVu Plus Communications ...................................................................................................3
1.1 iVu Plus Communications ........................................................................................................................3
1.1.1 Communication Channels ............................................................................................................3
1.1.2 Command Channel .......................................................................................................................3
1.1.4 Image Export ...............................................................................................................................5
1.2 Enabling Communications ........................................................................................................................6
1.2.1 Setting Up Ethernet Communications ...........................................................................................6
1.2.2 Setting Up Serial Communications .............................................................................................11
2 Testing and Troubleshooting iVu Plus Communications ...............................................16
2.1 Understanding the Communication Log .................................................................................................16
2.2 Ethernet I/O ............................................................................................................................................16
2.2.1 Ethernet I/O Status ....................................................................................................................16
2.3 Serial I/O .................................................................................................................................................17
2.3.1 Using the Port Status Screen for Testing RS-232 Communications ..........................................17
2.3.2 Using the iVu Command Channel Sample Application or a Terminal Program for Testing ........18
2.3.3 Verifying Basic Receive Functionality .........................................................................................18
3 Command Channel Primer ................................................................................................21
3.1 Command Channel Commands .............................................................................................................21
3.1.1 Command Flow ..........................................................................................................................21
3.1.2 String Delimiters and Escaping ...................................................................................................22
3.1.3 Command Channel Command Synopsis ....................................................................................22
3.2 Conventions Used for Examples ............................................................................................................23
3.3 Examples ................................................................................................................................................23
3.3.1 Example 1: How to Trigger the Sensor and Retrieve Barcode Data using the Command Channel
...................................................................................................................................................................23
3.3.2 Example 2: How to Modify Barcode Compare Data Using the Command Channel ...................23
3.4 iVu Plus Command Channel Reference ................................................................................................24
3.5 Command Channel Error Codes ............................................................................................................33
2 Online Only - rev. A
1 iVu Plus Communications
1.1 iVu Plus Communications
The iVu Plus provides for communicating with other devices via Ethernet or a UART serial communications port (RS-232). In order to establish an Ethernet connection to the sensor, the external device must be configured with the correct IP address and correct TCP port to communicate. If planning to use the serial communications connection, port settings for baud rate, data bits, parity, and stop bits must be configured on the iVu Plus to match the settings of the external device.
1.1.1 Communication Channels
The iVu Plus BCR supports up to three communications channels. To access the channels, go to
• Command Channel — a bi-directional communication protocol that currently supports ASCII, and enables other devices to remotely control the iVu Plus sensor and access sensor results
• Data Export — used to export selected inspection data to a remote device
• Image Export — used to export inspection images to a remote device
Data export and command channel can be configured for either Ethernet or Serial I/O (but not both); image export is only available over Ethernet. The table below briefly summarizes valid communication channel configuration options.
Command Channels
Command Channel Yes No No Yes Yes No
Data Export Yes No Yes No No Yes
Image Export Yes No Yes No Yes No
Scenario #1 Scenario #2 Scenario #3
Ethernet Serial I/O Ethernet Serial I/O Ethernet Serial I/O
1.1.2 Command Channel
The iVu Plus BCR command channel is a bi-directional communication protocol that currently supports ASCII via either Ethernet or the RS-232 serial interface, and enables other devices to remotely control the iVu sensor and access sensor results.
do trigger\x0D\x0A
A
B
OK\x0D\x0A
D
C
A Control Device, which can be a PLC, PC program, or a terminal C Response Frame
B Request Frame D iVu Plus Sensor
The following are some of the functionality available via the command channel:
Online Only - rev. A
www.bannerengineering.com - tel: 763-544-3164 3
iVu Plus BCR Communications User's Guide
• Get sensor information (such as version and sensor name)
• Control "discrete" I/O (such as trigger and teach)
• Get sensor results (such as sensor status)
• Change the running inspection
1.1.2 Command Channel Sample Application
The iVu Plus BCR installation CD has a Command Channel sample application that provides an easy interface to execute commands. In a production environment, you will need to create your own application for bi-directional communication with the sensor.
1.1.3 Data Export
The iVu Plus sensor provides for exporting user-selected inspection data via either Ethernet or the RS-232 serial interface. Inspection data that can be exported includes:
• Pass/Fail Output
• Inspection Name
• Inspection Results
• Frame #
• Inspection Time (ms)
4 www.bannerengineering.com - tel: 763-544-3164 Online Only - rev. A
iVu Plus BCR Communications User's Guide
1.1.3 Sample Application
The iVu Plus BCR installation CD has a Data Export sample application that provides for viewing exported data while setting up the sensor, etc. In a production environment, you will need to create your own application to process data exported from the sensor.
1.1.4 Image Export
Image export is only supported on Ethernet ports. Inspection images are a maximum 8-bits per pixel grayscale images in Windows BMP format that represent all the data in a full Field of View (FOV).
Each exported image is comprised of a header (64 bytes) followed by the image data (approximately ). All 16- and 32-bit numeric entries are little endian.
The header includes the following information:
NOTE: If FOV's are adjusted so that they are smaller, the bitmaps will also be smaller.
1.1.4 Image Export Sample Application
The iVu Plus BCR installation CD has a Image Export sample application that provides a way to save exported images. In a production environment, you will need to write your own application to process exported images, for example to display them on an HMI or to save them to disk.
Online Only - rev. A www.bannerengineering.com - tel: 763-544-3164 5
iVu Plus BCR Communications User's Guide
1.2 Enabling Communications
1.2.1 Setting Up Ethernet Communications
The following is the general flow for setting up for Ethernet communications between the iVu Plus sensor and a remote device:
NOTE: These instructions assume that the remote device is a PC running Windows XP.
On the Windows PC, configure the IP address as follows:
Windows XP Windows 7
1. Open Network Properties on the PC (right-click on the Net­work Neighborhood icon).
2. On the Local Area Connection, right-click on Properties..
3. In the dialog, click on Internet Protocol (TCP/IP) and click the Properties button.
1. Open Network Connections by clicking on the Start button, then selecting the Control Panel followed by Network and In­ternet, and clicking Manage network connections.
2. Right-click the connection you want to change, then click Properties. If you are prompted for an administrator pass­word or confirmation, type the password or provide confirma­tion.
3. In the Networking dialog, click on Internet Protocol Version 4(TCP/IPv4) and click the Properties button.
6 www.bannerengineering.com - tel: 763-544-3164 Online Only - rev. A
iVu Plus BCR Communications User's Guide
Windows XP Windows 7
4. In the Internet Protocol (TCP/IP) Properties dialog, select Use the following IP address and make sure that the IP
address is 192.168.0.2, and the subnet mask is
255.255.255.0.
On the iVu sensor:
4. In the Internet Protocol (TCP/IPv4) Properties dialog, se­lect Use the following IP address and make sure that the IP address is 192.168.0.2, and the subnet mask is
255.255.255.0.
1. Go to Main Menu > System > Communications > Ethernet I/O and make sure that the sensor is configured as shown below.
Online Only - rev. A www.bannerengineering.com - tel: 763-544-3164 7
iVu Plus BCR Communications User's Guide
2. To enable the command channel over Ethernet:
a. Go to Main Menu > System > Communications > Command Channel > Connection , and select Ethernet [IP Port #
32000].
b. Configure the field and end-of-frame delimiters. Go to Main Menu > System > Communications > Command Channel >
Delimiters .
8 www.bannerengineering.com - tel: 763-544-3164 Online Only - rev. A
iVu Plus BCR Communications User's Guide
Valid end-of-frame delimiters are: <comma>, <colon>, <semicolon>, <CR>, <CR><LF>, <LF><CR>, or <ETX>.
c. Verify that the iVu receives and transmits data correctly.
3. To enable Data Export over Ethernet:
a. Go to Main Menu > System > Communications > Data Export > Connection and select Serial I/O from the drop-down.
Online Only - rev. A www.bannerengineering.com - tel: 763-544-3164 9
iVu Plus BCR Communications User's Guide
b. Go to Main Menu > System > Communications > Data Export > Data To Export and select the inspection data to export.
c. Go to Main Menu > System > Communications > Data Export > Output Format and select the Start String, Delimiter, and
End String.
d. Go to Main Menu > System > Communications > Data Export > Advanced .
10 www.bannerengineering.com - tel: 763-544-3164 Online Only - rev. A
iVu Plus BCR Communications User's Guide
During the Data and Image export operation the sensor's output channels might become full. This can occur if the sensor is producing export data (frames) faster than the data can be exported from the device (due to bandwidth limitations) or faster than the client is reading the channel export data.
This setting affects how the sensor will behave in this situation.
• Select Hold READY to ensure that all frames are transmitted. In this case, the READY signal will remain inactive (sensor is busy) until the new frame has been added to the channel for transmission. Triggers might be missed during this time.
• Select Do not hold READY to cause the sensor to discard the new frame if the channel is full and thus activate the READY signal immediately after the current inspection is complete. In this case, the discarded frames will not be trans­mitted.
Communications Channel Ports
The following are the default Ethernet port settings for the communications channels:
• Command Channel — 32200
• Data Export — 32100
• Image Export — 32000
1.2.2 Setting Up Serial Communications
The general flow for setting up for serial communications:
1. Prepare the connection — RS-232 wiring.
Electrically connect the control device and the iVu sensor. On the iVu, the pins/wire colors used for serial communications via RS-232 are shown in the table below.
iVu RS-232 Connections
Pin # Wire Color Description
10 Light-Blue TX
11 Black Signal Ground
12 Violet RX
2. Configure port settings (baud rate, data bits, parity, and stop bits) on the iVu to match the settings on the control device. Go to Main Menu > System > Communications > Serial I/O .
Online Only - rev. A www.bannerengineering.com - tel: 763-544-3164 11
Loading...
+ 25 hidden pages