Banner iVu Plus BCR User manual

Type
User manual
iVu Plus BCR Communications
Instruction Manual
Original Instructions
B_3084221 Rev. C
18 March 2014
Contents
1 Introduction
.................................................................................................................. 3
2 iVu Plus Communication Summary of Ethernet and Serial ............................................. 4
2.1 Communication Channels ..........................................................................................................4
2.2 Industrial Ethernet ...................................................................................................................4
2.3 Command Channel ....................................................................................................................4
2.4 Data Export ..............................................................................................................................5
2.5 Image Export .......................................................................................................................... 6
3 Enabling Communications ..............................................................................................8
3.1 Setting Up Ethernet Communications ..........................................................................................8
3.1.1 Windows XP ...................................................................................................................8
3.1.2 Windows 7 .....................................................................................................................8
3.1.3 Sensor Setup for Ethernet Communications ........................................................................9
3.1.4 Communications Channel Ports .......................................................................................11
3.2 Setting Up Serial Communications .............................................................................................12
4 Testing and Troubleshooting iVu Plus Communications ................................................ 15
4.1 Understanding the Communication Log ...................................................................................... 15
4.2 Ethernet I/O ..........................................................................................................................15
4.2.1 Ethernet I/O Status .......................................................................................................15
4.3 Serial I/O ..............................................................................................................................16
4.3.1 Using the Port Status Screen for Testing RS-232 Communications ........................................16
4.3.2 Using the iVu Command Channel Sample Application or a Terminal Program for Testing ..........16
4.3.3 Verifying Basic Receive Functionality ................................................................................ 16
5 Command Channel Primer ........................................................................................... 18
5.1 Command Channel Commands ..................................................................................................18
5.1.1 Command Flow .............................................................................................................18
5.1.2 String Delimiters and Escaping ........................................................................................ 18
5.1.3 Command Channel Command Synopsis ............................................................................ 18
5.2 Conventions Used for Examples .................................................................................................19
5.3 Examples .............................................................................................................................. 19
5.3.1 How to Trigger the Sensor and Retrieve Barcode Data using the Command Channel ............... 19
5.3.2 How to Modify Barcode Compare Data Using the Command Channel .....................................20
5.4 Command Channel Reference .................................................................................................. 21
5.4.1 Info Command Group ....................................................................................................21
5.4.2 System Command Group ...............................................................................................21
5.4.3 Status Command Group .................................................................................................22
5.4.4 Trigger Command Group ................................................................................................22
5.4.5 Imager Command Group ............................................................................................... 23
5.4.6 Teach Command Group ................................................................................................. 23
5.4.7 ProductChange Command Group .....................................................................................24
5.4.8 History Command Group ................................................................................................24
5.4.9 Inspection Command Group ...........................................................................................25
5.4.10 BCR_INPUT Command Group ........................................................................................25
5.4.11 BCR_RESULT Command Group ..................................................................................... 26
5.4.12 BCR_HISTORY Command Group ....................................................................................26
5.5 Command Channel Command Status Register .............................................................................26
5.6 Command Channel Error Codes .................................................................................................26
iVu Plus BCR Communications
1 Introduction
The iVuPlus device can be controlled or monitored over Industrial Ethernet using Ethernet/IP, Modbus/TCP or PCCC
protocols. This document will help you to set up the iVu Plus in the desired configuration and provide you with information
you will need to connect to the master device (PLC, HMI, etc.).
iVu Plus BCR Communications
3
2 iVu Plus Communication Summary of Ethernet and
Serial
The iVu Plus communicates 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 TCP
port to communicate. 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.
2.1 Communication Channels
The iVu Plus BCR supports up to four communications channels. To access the channels, go to Main Menu > System
>
Communications.
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
Industrial Ethernet—a bi-directional communication channel that allows the user to control the sensor and access
sensor results using Ethernet/IP, Modbus/TCP, or PCCC protocol
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
Scenario #1 Scenario #2 Scenario #3
Ethernet Serial I/O Ethernet Serial I/O Ethernet Serial I/O
Command Channel Yes No No Yes Yes No
Industrial Ethernet Yes No Yes No Yes No
Data Export Yes No Yes No No Yes
Image Export Yes No Yes No Yes No
2.2 Industrial Ethernet
Main Menu > System > Communications
> Industrial Ethernet
The iVuPlus device can be controlled or monitored over Industrial Ethernet using Ethernet/IP, Modbus/TCP or PCCC
protocols. This document will help you to set up the iVu Plus in the desired configuration and provide you with information
you will need to connect to the master device (PLC, HMI, etc.).
2.3 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.
iVu Plus BCR Communications
4
A
B
C
D
do trigger\x0D\x0A
OK\x0D\x0A
A Control Device, which can be a PLC, PC program, or a terminal C Response Frame
B Request Frame D iVu Plus BCR Sensor
The following are some of the functionality available via the command channel:
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
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.
2.4 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
Sensor Result
Pass/Fail
iVu Plus BCR Communications
5
Sensor Result (see Table 1 on page
6 for additional information)
Frame #
Inspection Time (ms)
Table 1: Sensor Results
Sensor Type Data to Export
Barcode Barcode Count
Data Length
Symbol Type
Barcode Data
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.
2.5 Image Export
Image export is only supported on Ethernet ports. Inspection images are a maximum 752×480 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
361K). All 16- and
32-bit numeric entries are little endian.
The header includes the following information:
Byte Offset Field ID Size in
Bytes
Data Type Description
0-15 Header Prefix 16 char "IVU PLUS IMAGE"
16-19 Header Version 4 UInt32 1
20-23 Image Size 4 UInt32 Number of bytes (Windows BMP image)
24-27 Image Frame Number 4 UInt32 Most recently snapped image frame number
28-29 Image Width 2 UInt16 752 (max)
30-31 Image Height 2 UInt16 480 (max)
32-33 Image Format 2 UInt16 0: Bitmap, 1: JPEG
34-63 Reserved 32 byte Reserved for future use
NOTE: If FOV's are adjusted so that they are smaller, the bitmaps will also be smaller.
iVu Plus BCR Communications
6
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.
iVu Plus BCR Communications
7
3 Enabling Communications
3.1 Setting Up Ethernet Communications
Configure both the PC and the sensor using the following instructions.
3.1.1 Windows XP
1.
Open Network Properties on the PC (right-click on the Network 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.
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.
3.1.2 Windows 7
1.
Open Network Connections by clicking on the Start button, then selecting the Control Panel followed by Network
and Internet, and clicking Manage network connections.
2. Right-click the connection you want to change, then click Properties. If you are prompted for an administrator
password or confirmation, type the password or provide confirmation.
3. In the Networking dialog, click on Internet Protocol Version 4(TCP/IPv4) and click the Properties button.
iVu Plus BCR Communications
8
4.
In the Internet Protocol (TCP/IPv4) 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.
3.1.3 Sensor Setup for Ethernet Communications
1.
Go to Main Menu > System > Communications > Ethernet I/O and make sure that the sensor is configured
as shown below.
2.
To enable the command channel over Ethernet:
a. Go to Main Menu > System > Communications > Command Channel > Connection, and select
Ethernet [IP Port # 32000].
iVu Plus BCR Communications
9
b. Configure the field and end-of-frame delimiters. Go to Main Menu > System > Communications >
Command Channel > Delimiters.
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.
b.
Go to Main Menu > System > Communications > Data Export > Data To Export and select the
inspection data to export.
iVu Plus BCR Communications
10
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.
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 transmitted.
3.1.4 Communications Channel Ports
The following are the default Ethernet port settings for the communications channels:
Command Channel — 32200
Data Export — 32100
Image Export — 32000
iVu Plus BCR Communications
11
3.2 Setting Up Serial Communications
1. 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.
Table 2: 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.
3.
To enable the command channel over the serial connection:
a. Go to Main Menu > System > Communications > Command Channel > Connection and select Serial
I/O.
b. Configure the field and end-of-frame delimiters. Go to Main Menu > System > Communications >
Command Channel > Delimiters.
Valid end-of-frame delimiters are: <comma>, <colon>, <semicolon>, <CR>, <CR><LF>, <LF><CR>, or
<ETX>.
c.
Optionally, if you want to trigger the iVu from the control device, set the trigger mode to Command (go to
Main Menu > Imager > Trigger and select Command from the drop-down).
iVu Plus BCR Communications
12
d.
Verify that the iVu receives and transmits data correctly.
4. To enable Data Export over the serial connection:
a. Go to Main Menu > System > Communications > Data Export > Connection and select Serial I/O
from the drop-down.
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.
iVu Plus BCR Communications
13
d. Go to Main Menu > System > Communications > Data Export > Advanced.
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 transmitted.
iVu Plus BCR Communications
14
4 Testing and Troubleshooting iVu Plus
Communications
4.1 Understanding the Communication Log
The iVu Plus sensor includes the following Communication Logs:
Command Channel Log that can be used to ensure that commands are properly formed (syntax is correct), and
provides a history of commands issued along with responses to these commands. To access the Command Channel
Log, go to Main Menu > Logs > Communication Logs > Command Channel
Data Export and Image Output logs that are purely output logs (that is, there is no receive activity to log)
Some notes about the logs:
To see an expanded view of each entry, click on the small right-triangle control on each entry
To save the log, click the save icon. The saved communication log can be loaded into the emulator for
troubleshooting offline
The table below describes the icons used in the Communication Log, the up-arrow indicates an incoming request to the iVu
from the control device; the down-arrow indicates an outgoing response from the iVu to the control device.
Icon Description
Port opened.
Port closed.
Indicates that the command has been processed without errors.
Indicates that the incoming entry is stalled (no new bytes), or end-of-frame delimiter
was not received
, or client is not reading data on ethernet.
If the response frame contains an error or is dropped, the log entry icons for the request
and the response frames will be colored red, and the displayed error count will
increment by one.
If the command takes a long time to process, the last long entry will change to an
hourglass (for example, during trigger of long inspections).
For Ethernet channels:
The channel's log will show an Enabled entry that indicates which port is being listened to
When a client connects, a log entry is added that indicates which IP address connected
When a client closes the connection, a log entry indicates that the channel is no longer being listened to
4.2 Ethernet I/O
4.2.1 Ethernet I/O Status
The Ethernet I/O Status screen can be used to verify that the Ethernet wiring has been correctly set up. In addition to
determining if the link has been established, incoming and outgoing traffic can be monitored.
iVu Plus BCR Communications
15
4.3 Serial I/O
4.3.1 Using the Port Status Screen for Testing RS-232 Communications
The Port Status screen can be used to ensure data is entering and exiting the sensor. This can be useful for debugging
issues such as improper wiring, mismatched baud rates, or other serial I/O issues. To access the Port Status screen, go to
Main Menu > System
> Communications > Serial I/O and click on the Status button.
The upper field shows the bytes received (request frame) on the iVu from the control device.
The lower field shows the bytes sent (response frame) from the iVu to the control device.
Port Errors
The Port Errors screen can help to debug communications channel issues: Parity, Break, and Framing indicate mismatched
port settings or, in the case of Break, incorrect cabling.
4.3.2 Using the iVu Command Channel Sample Application or a Terminal
Program for Testing
The easiest way to test that the iVu command channel is correctly receiving and transmitting data is to use either the iVu
Command Channel Sample App (available on the installation CD) or to use a terminal program running on a PC:
If using a terminal program, in the terminal program's configuration:
Set new-line transmit to <CR><LF> (and set the end-of-frame delimiters on the iVu to match).
Enable local echo.
Set the Serial port set up so that the PC port number's baud rate, data, parity, and stop bits match those setup on
the iVu.
4.3.3 Verifying Basic Receive Functionality
To verify the iVu can receive request frames from the requesting device:
1. On the iVu Sensor, go to the Main Menu > System > Communications > Serial I/O > Port Status screen.
iVu Plus BCR Communications
16
2.
On the requesting device, transmit one or more bytes to the iVu sensor.
If the data byte values appear correct and the number sent by the requesting device matches the number
received by the iVu sensor, then the transmit/receive functionality is working properly.
If the connection is incorrect (electrically) or if the baud rate is mismatched, no bytes will appear in the
upper field on the Port Status screen.
If the connection is correct (electrically), bytes will appear in the upper field of the Port Status screen in the
order they were received.
If the Port Status: Errors at the bottom of the Port Status screen highlights red, then the connection is
correct electrically but there is likely a settings mismatch between the iVu sensor and the requesting
device. Verify the settings on both devices.
If the bytes appear with no errors but appear incorrect or there are too many or too few, then the port
settings (for example, baud rate) are likely mismatched in a way that does not generate serial hardware
errors. Verify the settings on both devices match exactly.
Verifying Basic Transmit Functionality
The iVu command channel will only send response frames to the requesting device if it receives a valid end-of-frame
delimiter from the requesting device. To verify transmit functionality:
1. Transmit an end-of-frame delimiter sequence from the requesting device to the iVu sensor. For example, in a
terminal program, simply hit Enter.
If a valid end-of-frame delimiter is received, the iVu sensor will immediately transmit a short error message back
to the requesting device (for example, ERROR 10000_COMMAND_MISSING).
2. Verify that the number of bytes sent by the requesting device are the same as the number shown in the lower field
of the Port Status screen on the iVu sensor. Go to the Main Menu > System > Communications > Serial I/O >
Port Status screen.
3.
If the byte count does not match, re-verify that the settings on both devices match exactly. If no bytes are
received, re-check the wiring.
If the correct response frame is received, then basic electrical and port settings are correct.
iVu Plus BCR Communications
17
5 Command Channel Primer
5.1 Command Channel Commands
All iVu command channel request command frames use the following syntax:
>> command group item value<EOF>
Notes
<EOF> is the end-of-frame delimiter. See below for a description.
All commands are in ASCII and are case-insensitive
command
An action to be performed on a particular iVu group; for example, get, set, do, login, or logout.
group
Identifies the iVu group that the command should act upon; for example, info, system, trigger, or bcr_input.
item
Further qualifies the action by specifying an item within the identified group; for example, comparedata or status.
value
For set commands, this identifies the data that must be set for the specified group item.
Note:
Item is not used with get commands.
<EOF>
Identifies the end-of-frame for the command so that the iVu knows to begin processing. The iVu will return a
response that includes the end-of-frame delimiter. The options for the <EOF> are set in the iVu Serial I/O menu,
and are as follows:
<comma>
<colon>
<semicolon>
<CR>
<CR><LF>
<LF><CR>
<ETX>
NOTE: When data is displayed on iVu screens such as the Port Status screen, printable
delimiters are displayed as expected. Non-printable characters, such as <CR> are
displayed in hex notation (\x0D).
5.1.1 Command Flow
The command flow should be such that a new command request should not be issued until the iVu command channel
acknowledges the previous command request.
For example, the following is a series of command requests and responses. The first request sets the trigger mode to
command and, once the sensor responds with an "OK," the next command request is issued to do (or execute) the trigger.
>> set trigger mode command\x0D\x0A
<< OK\x0D\x0A
>> do trigger\x0D\x0A
<< OK\x0D\x0A
5.1.2 String Delimiters and Escaping
By default setting, all strings used in commands are enclosed in quotation marks (""). All text in quotes is part of the
command. Quotes (") or back-slashes (\) that are part of the string must be escapted with a back-slash. For example:
"abc\"def\"ghi\\jkl"
Set the String Delimiter parameters to 'None' if strings should not be enclosed in quotation marks.
5.1.3 Command Channel Command Synopsis
There are a number of general types of commands to do, set, and get sensor data.
iVu Plus BCR Communications
18
Command Channel Response Frames
The iVu responds to all request frames with one or two responses depending on the type of command.
Do commands
All do commands are followed by one response that identifies the command status. For example:
>> do trigger\x0D\x0A
<< OK\x0D\x0A
Get commands
All get commands are followed by two responses: the first identifies the status of the command, and the second
contains the retrieved information. For example:
>> get bcr_input comparedata\x0D\x0A
<< OK\x0D\x0A
<< "012345ABCDEF"\x0D\x0A
Set commands
All set commands are followed by one response that identifies the command status. For example:
>> set bcr_input comparedata "012345ABCDEF"\x0D\x0A
<< OK\x0D\x0A
Command Channel Command Status
The command status is either OK or ERROR. If OK, then the command has fully and successfully completed. If an error is
returned it is in the form ERROR nnnnn_ERROR_IDENTIFIER
(for example ERROR 10001_COMMAND_NOT_RECOGNIZED).
Refer to Command Channel Error Codes on page 26 for a list of errors.
5.2 Conventions Used for Examples
There are a number of command channel examples included here, and the following are the conventions used in the
examples:
All examples use <CR><LF> for the end-of-frame delimiter, and this delimiter is always denoted in hex (\x0D\x0A)
since that is what is displayed in the iVu logs and, for example, the Port Status screen.
All commands are in bold text.
For each example, a command request to the iVu sensor is prefaced with a >>, and a command response frame
from the iVu sensor is prefaced by a << as shown below. These are only used to make the documentation clearer.
>> get info companyname\x0D\x0A
<< OK\x0D\x0A
<< "Banner Engineering Corp."\x0D\x0A
5.3 Examples
5.3.1 How to Trigger the Sensor and Retrieve Barcode Data using the Command
Channel
To trigger the sensor and retrieve barcode data, do the following:
1.
Go to the Main Menu > System > Sensor Configuration > Serial I/O.
2. Click on the Channel Mode button.
3. In the Channel Mode dialog, select Command from the drop-down list.
iVu Plus BCR Communications
19
4.
Set Trigger to Command. Go to the Main Menu > Imager > Trigger screen, and from the drop-down select
Command
5. Issue a trigger command as follows:
>> do trigger\x0D\x0A
<< OK\x0D\x0A
6.
Check that the inspection passed.
>> get inspection status\x0D\x0A
<< OK\x0D\x0A
<< Pass\x0D\x0A
7.
Get the barcode data read by the iVu sensor.
>> get bcr_result\x0D\x0A
<< OK\x0D\x0A
<< "0043000011201"x0D\x0A
5.3.2 How to Modify Barcode Compare Data Using the Command Channel
1. Go to the Main Menu > System > Sensor Configuration > Serial I/O.
2. Click on the Channel Mode button.
3. n the Channel Mode dialog, select Command from the drop-down list.
4.
Set Trigger to Command. Go to the Main Menu > Imager > Trigger screen, and from the drop-down select
Command.
5. Set the compare data.
>> set bcr_input comparedata "0043000011201"\x0D\x0A
<< OK\x0D\x0A
6.
Trigger the sensor.
>> do trigger\x0D\x0A
<< OK\x0D\x0A
7. Check that the inspection passed.
>> get inspection status\x0D\x0A
<< OK\x0D\x0A
<< Pass\x0D\x0A
iVu Plus BCR Communications
20
  • Page 1 1
  • Page 2 2
  • Page 3 3
  • Page 4 4
  • Page 5 5
  • Page 6 6
  • Page 7 7
  • Page 8 8
  • Page 9 9
  • Page 10 10
  • Page 11 11
  • Page 12 12
  • Page 13 13
  • Page 14 14
  • Page 15 15
  • Page 16 16
  • Page 17 17
  • Page 18 18
  • Page 19 19
  • Page 20 20
  • Page 21 21
  • Page 22 22
  • Page 23 23
  • Page 24 24
  • Page 25 25
  • Page 26 26
  • Page 27 27
  • Page 28 28

Banner iVu Plus BCR User manual

Type
User manual

Ask a question and I''ll find the answer in the document

Finding information in a document is now easier with AI