Industrialprotocolmanual en
Industrialprotocolmanual en
84-9220126-02 Rev D
Copyright ©2020
Omron Microscan Systems, Inc.
Tel: +1.425.226.5700 / 800.762.1149
Fax: +1.425.226.8250
All rights reserved. The information contained herein is proprietary and is provided solely for the purpose of
allowing customers to operate and/or service Omron Microscan-manufactured equipment and is not to be
released, reproduced, or used for any other purpose without written permission of Omron Microscan.
Throughout this manual, trademarked names might be used. We state herein that we are using the names to the
benefit of the trademark owner, with no intention of infringement.
Disclaimer
The information and specifications described in this manual are subject to change without notice.
Technical Support
For technical support, e-mail: helpdesk@microscan.com.
Warranty
For current warranty information, see: www.microscan.com/warranty.
PREFACE Welcome v
Purpose of This Manual v
Manual Conventions v
CHAPTER 4 Allen-Bradley PLC Setup via EDS for EtherNet/IP Operation 4-1
AB Rockwell RSLogix 5000 v20 PLC Integration with EDS 4-2
CHAPTER 5 Allen-Bradley PLC Setup via Generic Ethernet Module for EtherNet/IP
Operation 5-1
Integrating the Camera into a PLC Environment 5-2
CHAPTER 9 PROFINET I/O Blob Count Demo Using TIA Portal V13 and an Omron
Microscan Smart Camera 9-1
Overview 9-2
Troubleshooting 9-23
CHAPTER 10 PROFINET I/O Circle Locate Demo Using TIA Portal V13 and an Omron
Microscan Smart Camera 10-1
Overview 10-2
Troubleshooting 10-24
CHAPTER 11 PROFINET I/O Blob Count Demo Using STEP 7 and an Omron Microscan
Smart Camera 11-1
Overview 11-2
AutoVISION Setup 11-3
STEP 7 Setup 11-6
CHAPTER 12 PROFINET I/O Circle Locate Demo Using STEP 7 and an Omron Microscan
Smart Camera 12-1
Overview 12-2
AutoVISION Setup 12-3
STEP 7 Setup 12-8
CHAPTER 13 Legacy PROFINET I/O Demos Using Step 7 and TIA Portal V13 with an
Omron Microscan Smart Camera 13-1
Step 7 Overview 13-2
AutoVISION Setup for Step 7 Demo 13-3
Step 7 Setup 13-7
TIA Portal V13 Overview 13-27
Troubleshooting 13-50
PREFACE Welcome
Manual Conventions
The following typographical conventions are used throughout this manual.
Enabling Industrial
Protocols
CHAPTER 1 Enabling Industrial Protocols
Enabling Protocols
FrontRunner
Go to the File menu and select Configure Device. Go to the Industrial
Protocols tab. Select the industrial protocol you intend to use with the
camera.
Enabling Industrial
AutoVISION
Protocols
In the Connect view, and with a camera selected, click the button to the left of Details to
view camera settings. Click Modify to change camera settings. Select the desired
protocol from the Industrial Protocol dropdown menu, and then click Apply.
You will see the Reboot Required dialog after clicking Apply.
Note: A change to Industrial Protocol requires a reboot of the camera
before the new setting can take effect.
Choose Yes and the camera will be rebooted for you. AutoVISION will be
disabled while the reboot is in process. If you choose No, the change will
not take effect until you manually reboot the camera.
Using EtherNet/IP
CHAPTER 2 Using EtherNet/IP
Notes:
EtherNet/IP
Overview
The EtherNet/IP interface will be identified as Vendor Specific (100). The
interface is designed to support Class 1 Implicit I/O data exchange, and
Class 3 Explicit messages for serial commands not accessible with
Implicit messaging.
Necessary Tools
The following tools are helpful for configuring EtherNet/IP:
Using EtherNet/IP
EtherNet/IP Object Model
Omron Microscan Smart Cameras use Class 1 connected messaging to
communicate most of their data and services in a single connection.
EtherNet/IP Identity
Device Type
Vendor ID
Product Code
F4X0-F: 6901
Interface Revision
Major.Minor = 1.1
Assembly Layout
Input Assembly
The input assembly layout is described below.
Using EtherNet/IP
The input assembly layout is shown here:
Using EtherNet/IP
CmdCodeRslt (32-bit)
The value of CmdCodeRslt is only valid when ExeCmdAck is active (1), in response to
ExeCmd being active.
CmdRet (32-bit)
The value of CmdRet is only valid when ExeCmdAck is active (1), in response to
ExeCmd being active, and CmdCodeRslt is 0 (Success). The following table shows
which CmdCodes return data in the CmdRet register.
State (16-bit)
State reflects the following operational condition of the camera:
Using EtherNet/IP
The value of State determines which Control and Status signals are available:
Where:
Output Assembly
The output assembly layout is described below and shown in the following diagram.
Using EtherNet/IP
The output assembly layout is shown here:
Using EtherNet/IP
CmdCode and ExeCmd Operation
Service:
• Get Attribute Single (0xE)
Classes:
• bool = 104 (0x68)
Instance: 1
Attribute:
• 1 to 100 = In to PLC/Client
Using EtherNet/IP
Attribute Layout
When using explicit EtherNet/IP messaging, all global data objects can be read or written.
Each data type is stored in its own class object and an instance of 1 to read the global
data. For example, to read float2, the EtherNet/IP request would be for Service Code 14
(0xE), Class 107 (0x6B), Instance 1, Attribute 2.
The value received in response to Get Attribute Single depends on the type:
• Bool will return a 16-bit word with 0 for false or 1 for true
• Strings will return a counted string. Total size of a string data item is 2048 bytes. This
includes a 4 byte “length” field followed by 2044 eight bit characters. When accessing
strings explicitly, they are not limited to the size in the I/O assemblies. For example,
string3 is limited to 28 bytes in the input assembly. If the actual string is longer than
28 bytes, it will be truncated when reading via the assembly, but not truncated when
reading the same string via an attribute explicitly.
Assembly Class 109 can be used to read and write special EtherNet/IP-specific
registers.
Using EtherNet/IP
EtherNet/IP Control/Status Signal Operation
Using EtherNet/IP
PLC Tags and Serial Command Names
PLC tags are separated into IN and OUT for data direction. Within the IN and OUT groups,
the tags are sub-divided into fixed Status and Control fields, plus user-defined linked data
fields. This table shows how PLC tag names correspond to serial commands.
(Add-On Instructions)
Allen-Bradley AOI
CHAPTER 3 Allen-Bradley AOI (Add-On
Instructions) for EtherNet/IP
Operation
Notes:
Steps
• Install EDS File
• Import AOI File
• Test Communications and Review Data
(Add-On Instructions)
Allen-Bradley AOI
Click the Browse button to locate the EDS file (C:\Microscan\Vscape\Firmware\eds\).
Once the EDS file is located and selected, click the Next button.
Click the Next button for the image. Click the Next button for the summary.
Right-click the Ethernet node on the left pane and select New Module. Type Omron
Microscan in the filter box to list the device. Select the device from the newly added EDS
file. Double-click the device or select and click the Create button to add to the project.
Enter the name for your device and the IP address, then click OK.
If the camera has multiple assembly sizes, the Change button allows you to select the
other assembly formats.
(Add-On Instructions)
Allen-Bradley AOI
Click the Close button on the module selection dialog to continue. Now the device has
been added to the project and will be visible in the tree view under the Ethernet node.
The Import Configuration dialog will prompt you for information regarding the AOI file. Select
the Data Types to view the new tags and their attributes. Click OK when ready to continue.
(Add-On Instructions)
Allen-Bradley AOI
Test Communications and Review Data
After the reader module has been installed, you can start with a basic ladder logic program
to test the data to and from the device. Two steps are involved to test the communication:
(1.) Download an autovision job; (2.) Add logic to the PLC ladder logic.
Navigate to Microscan > Vscape > Tutorials and Samples > “Product Name” > EIP
Demo > SimpleTrigger_Job.avp.
This job has no tools loaded and is a simple job that allows the PLC to trigger the camera.
You can also set another Trigger action in the Trigger panel on the right side of the screen.
Now download the job to the camera by selecting the Save Job to Camera icon and
selecting New Slot.
(Add-On Instructions)
Allen-Bradley AOI
Then add the logic to the PLC. Do this by opening the MainRoutine editor and create an
Add-On-Instructions.
Right-click the second element and create a new tag for the Assembly_Input. It will
default to the AOI INPUT320 data type. Right-click the third element and create a new tag
for the Assembly_Output. It will default to the AOI OUTPUT320 data type.
Double-click the fourth element and click the down arrow in the combo box to link the
Connection_Input to the reader input data. The link should be the [product name]:
I.Data.
(Add-On Instructions)
Allen-Bradley AOI
Add a new rung by right clicking and selecting Add Rung.
(Add-On Instructions)
Allen-Bradley AOI
Now download the program to the PLC. Once the program has downloaded, set the PLC
to Run Mode.
Note: Be sure the path to the PLC has been set in the project so that communications to
the PLC can be established.
Toggle the bit Trigger by right-clicking and selecting Toggle Bit or by pressing Ctrl + T.
This action will set the Trigger tag high causing the trigger output bit to go high in the
Output Assembly. The camera will trigger on each rising edge (ie when the Trigger tag is
set to 1). This will confirm that communication is established between the PLC and the
camera.
Allen-Bradley PLC
Setup via EDS
CHAPTER 4 Allen-Bradley PLC Setup
via EDS for EtherNet/IP
Operation
Notes:
Allen-Bradley PLC
Setup via EDS
Select Add.
Select Browse.
Navigate to the EDS file, then Open it. The default install location is:
For F4X0-F: C:\Microscan\Vscape\Firmware\eds\MicroHAWK
For HAWK MV-4000: C:\Microscan\Vscape\Firmware\eds\HAWK MV4000
Allen-Bradley PLC
Setup via EDS
Click Finish.
Open RSLogix 5000 v20 and create the I/O Configuration for the base system, including
the system’s Ethernet interface.
Allen-Bradley PLC
Setup via EDS
Clear the Module Type Vendor Filters.
Scroll down the Module Type Vendor Filters until Omron Microscan comes into view,
then select Omron Microscan.
The New Module dialog is displayed. Type a unique name for this camera and its IP address.
Allen-Bradley PLC
Setup via EDS
Click OK, verify the camera was added to the Ethernet network, then open the controller
tags to verify that :I and :O tag sets were created.
Navigate to the product example routine file and select Import. The default install
directory is:
F4X0-F: C:\Microscan\Vscape\Tutorials and Samples\MicroHAWK\EIP Demo.
HAWK MV-4000: C:\Microscan\Vscape\Tutorials and Samples\HAWK MV-4000\EIP Demo.
Note: If you are using a HAWK MV-4000 Smart Camera, you can use this example routine
as well.
Allen-Bradley PLC
Setup via EDS
The Import Configuration dialog will be displayed.
Select Tags.
In the Final Name column, click Camera:I, then click the down arrow that appears on the right.
Allen-Bradley PLC
Setup via EDS
In the Final Name column, click Camera:O, then click the down arrow that appears on the right.
Click the Other Components icon in the tree view to select the Component References.
Select the camera in the Final Name column. Click OK to complete the import.
Click OK and the Main Routine and User-Defined tags will be populated.
Allen-Bradley PLC
Setup via EDS
Delete any empty rungs (check rung 0).
Note: Be sure the path to the PLC has been set in the project so that communications to
the PLC can be established.
Allen-Bradley PLC
Setup via EDS
Expand Scan_MV_IO_user so that the Echo in the .IN.Status and .OUT.Control
structures is visible.
This confirms that the PLC and camera have successful two-way communication.
The demo code expects a demo vision job to be loaded on the camera, which populates
the following input tags (camera to PLC) with vision tool results:
• .IN.long.long1
• .IN.float.float1
• .IN.string.string1
The demo code will operate the Control and Status signals of the camera regardless of
the vision job that is loaded. For a more detailed overview of the demo code and vision
job, see Allen-Bradley PLC Setup via Generic Ethernet Module for EtherNet/IP
Operation.
Allen-Bradley PLC
Setup via EDS
Set the Trigger to 1. This causes the demo code to trigger the camera, process the new
inspection data, record the results in the Scan_MV_demo_xxxx tags, and clear the
DataValid status signal.
The Trigger control changes to 0 when the camera is triggered. All processing is done
when the counter Scan_MV_dv_fall_count increments, along with the pass/fail counters
in the Scan_MV_demo_xxxx tags.
Allen-Bradley PLC
Setup via Generic
Ethernet Module
CHAPTER 5 Allen-Bradley PLC Setup via
Generic Ethernet Module for
EtherNet/IP Operation
This section describes how to use the Generic Ethernet Module to set up
an Allen-Bradley PLC for EtherNet/IP operation.
Notes:
Create the I/O Configuration for the base system, including the system’s Ethernet interface.
Add the camera by right-clicking the Ethernet interface and selecting New Module.
Allen-Bradley PLC
Setup via Generic
Ethernet Module
Select ETHERNET-MODULE – Generic Ethernet Module, and click OK.
Name: A useful name to rememberfor the camera. The example here is Scan_MV.
Input, Size: 80
Output, Size: 80
Example:
Allen-Bradley PLC
Setup via Generic
Ethernet Module
Configure the Required Packet Interval (RPI) and click OK.
Allen-Bradley PLC
Setup via Generic
Ethernet Module
At the Import Configuration window, find the Module Name that was assigned to the
Generic Module. Here the module name is Camera.
Click Camera:I and click the down arrow, then double-click the Scan_MV:I that appears
below it.
Click Camera:O and click the down-arrow, then double-click the Scan_MV:O that appears
below it.
Click the Other Components icon in the tree view. Click OK.
The tags and main program are now configured sufficiently to test communication with the
camera.
Allen-Bradley PLC
Setup via Generic
Ethernet Module
Select the control button next to Offline and then select Download.
Note: Be sure the path to the PLC has been set in the project so that communications to
the PLC can be established.
Once the program has downloaded, make sure the PLC is in Run Mode.
To open the Program Tags, double-click Program Tags, then select the Monitor Tags tab
at the bottom of the tag window.
Allen-Bradley PLC
Setup via Generic
Ethernet Module
Expand Scan_MV_IO_user so that the .IN.Status and .OUT.Control structures are
visible. Then scroll the window so Scan_MV_IO_user.OUT.Control.Echo is visible.
Allen-Bradley PLC
Setup via Generic
Ethernet Module
Scroll the window so Scan_MV_IO_user.IO.IN.Status.Echo is visible, and verify that it is
the same value as .OUT.Control.Echo.
This confirms that the PLC and camera have successful two-way communication.
Allen-Bradley PLC
Setup via Generic
Ethernet Module
Set the Trigger to 1. This causes the demo code to trigger the camera, process the new
inspection data, record the results in the Scan_MV_demo_xxxx tags, and clear the
DataValid status signal. The Trigger control changes to 0 when the camera is triggered.
The Scan_MV_dv_fall_count and pass/fail counters in the Scan_MV_demo_xxxx tags
increment when all processing is done. For example:
This configures the Measure (float101 and float102), Decode (string101) and Count
Blob (long101 and long102) tools in the same way they were configured in AutoVISION
during Try Out.
Note the Description column. It offers a hint for what each linked tag does in the vision job.
Allen-Bradley PLC
Setup via Generic
Ethernet Module
Trigger the Camera
To send a trigger to the camera, scroll to Scan_MV_IO_user.Control.Trigger.
Set the Trigger to 1. When the Trigger returns to a value of 0, the camera may be re-triggered.
If you connect to the camera with AutoVISION, it will display a new inspection result each
time the camera is triggered. Recall that the vision job was created with predefined
images to produce predictable Passed and Failed results. The camera’s illumination
lights will not flash when triggered.
The inspection results can be seen in the PLCs’s IN tags, as well as in AutoVISION. Open
the RSLogix tag window so Scan_MV_IO_user.IN.Status and bool are visible.
This example shows a Passed inspection, where the following tags are all 1:
• IN.Status.InspStat
Allen-Bradley PLC
Setup via Generic
Ethernet Module
If you scroll down to the IN.long, float, and string values, you will see the literal results of
the vision tools.
This example shows a Failed inspection, where every tool reports a fail.
Allen-Bradley PLC
Setup via Generic
Ethernet Module
This is the Failed inspection’s literal data.
Allen-Bradley PLC
Setup via Generic
Ethernet Module
Trigger the Camera Again
Trigger the camera twice and you will see the Status results stay the same for all triggers:
Why: Decode + Matchcode status always fails because the matchcode has been changed
to wrong code, or there is no decode.
InspStat = 0
Why: The Decode tool fails, so the overall Inspection result is a Fail.
PLC tags:
This section describes how to use Omron Microscan demo PLC code with
a vision job and camera target.
The EtherNet/IP demo files can be found where AutoVISION is installed,
in the folder C:\Microscan\Vscape\Tutorials and Samples\“Product
Name”\EIP demo. Open the EIP_demo.avp with AutoVISION and
download it to the camera.
During PLC integration, import the 32-000003-2.L5X file to create the
camera’s demo tags and ladder logic.
Notes:
• The camera communications protocol must be enabled for
EtherNet/IP before it can be used in this environment. Refer to
Chapter 1, Enabling Industrial Protocols, for information about
enabling communications protocols for the camera, and information
about switching camera communications protocols.
• AutoVISION and FrontRunner jobs use Omron Microscan Link
functionality to accommodate EtherNet/IP communications between
the camera and the PLC. For information about how to connect job
parameters and outputs to Omron Microscan Link tags, refer to the
Linking Datums to Omron Microscan Link Tags section of
Chapter 2 in the Visionscape FrontRunner User Manual.
Glossary of Terms
The following terms are used in the description of Microscan’s demo PLC
program.
Camera
The Omron Microscan Smart Camera used in this application, which
has an EtherNet/IP communication interface.
User App
The PLC logic code written by the end user or system integrator.
Demo Code
The PLC logic code distributed by Omron Microscan that can be imported
into the PLC’s ladder logic area. It encapsulates most of the device
Control and Status management.
The demo code expects a demo vision job loaded on the camera.
However, the demo code will operate whether or not the demo vision job
is loaded on the camera.
Active
A Control, Status, bool, or PLC logic “contact” in a 1 state.
Clear
A Control, Status, bool, or PLC logic “contact” in a 0 state.
One Shot
A PLC tag write operation that is performed once, typically in reaction to
an event. After a one shot operation, the PLC logic does not write to the
same tag again unless another event occurs.
Code
Vision Job Setup
The EtherNet/IP demo files can be found where AutoVISION is installed,
where the default folder is C:\Microscan\Vscape\Tutorials and
Samples\“Product Name”\EIP demo.
3. Browse to the EIP demo folder, select it, and click OK.
After the EIP demo folder has been enabled for image load, the
camera icon will change to a folder.
Before Try Out can be effective, the Measure, Decode, and Count
Tool parameters must be specified. After job download, the tool
parameters will be supplied by the PLC.
Measure Tolerance:
Decode Matchstring:
Count Tolerance:
Code
Fail:
Pass:
6. Add the camera and demo code to the PLC environment (see the
next section).
Scan_MV_demo_mode
Purpose
The demo mode tag takes three different values, putting the demo code
into one of three modes of operation:
User app can set the demo mode with one of three values to define the
demo code’s mode of operation.
This is the default mode of the demo code. In this mode, the user app
accesses the Scan_MV_IO_user tag to control and monitor the camera.
The user app must not access the Scan_MV_IO_internal tag set.
2 = Auto-trigger
Code
camera’s trigger after one second of idle time. The timer used to drive the
trigger is Scan_MV_trigger_delay_timer.
Depending on the mode, the demo code will run the appropriate level of code.
• In mode 0, only the I/O exchange rungs are executed. All others are
bypassed.
Scan_MV_IO_user
Purpose
User-accessible I/O data for the camera. The user app reads and writes
these I/O tags, and the demo code handles the actual on-the-wire control
of the camera.
The user app can determine that the Control is done when the Control is
clear (demo code changes the Control to a bit/bool value of 0). Do not
attempt to activate a Control unless it is clear.
The user app should activate the Controls using one shot writes. The use
app should not continuously hold a Control in an active state. Holding a
Control in an active state will prevent the demo code from notifying the
user app that the Control operation is complete by clearing the Control.
Usually, when a Control is clear (0), the camera is ready for the Control to
be activated again. Please see the Specific Control Guidelines and
Specific Status Guidelines below for qualifications.
The demo code waits for the user app to activate a Control. When the
user app activates a Control, the demo code handles all handshaking and
confirmation that the Control operation is performed by the camera. When
the operation is complete, the demo code clears the Control back to 0.
In order to take the camera Online and Offline, only one of these Controls
can go active (change from 0 to 1), and be active, at any given time.
ResetCount
After the user app activates ResetCount, the demo code will clear
ResetCount when the operation is complete. The next Inspection output
will be 1 (as can be seen if AutoVISION is connected to the camera in
run mode).
Trigger
After the user app activates the Trigger, the demo code will clear the
Trigger when the camera indicates it has accepted the Trigger.
Do not re-trigger the camera until DataValid in the Status register goes
active, all Inspection data has been processed, and DataValid is cleared
using the ResetDataValid Control.
ResetDataValid
When the user app sees DataValid go active, it should process the
Inspection data, then clear DataValid by activating ResetDataValid.
Code
To clear the Error Status, activate ResetError.
These Controls can be used to perform a job change, and query the
active job slot. The demo code includes tags with pre-defined CmdCode
and CmdCodeRslt definitions:
The demo code records the final result of the command operation by
copying CmdCode, CmdArg, CmdCodeRslt and CmdRet to the
following tags:
When the demo code automates the command process, the PLC
integrator is responsible for the following steps:
1. Deactivate all Controls and clear DataValid and Error status signals.
This is a best-practice measure to ensure that the PLC has
transitioned from a state of triggering and processing inspections to
issuing a command.
Scan_MV_CmdCodeRslt_last is 0 (Success)
6. Put the camera online (if necessary), and continue with normal
runtime operation.
Code
Online
TriggerReady
DataValid
When DataValid goes active, the user app should process the Inspection
data, then clear DataValid using the ResetDataValid control. This is
handled, by the demo code in mode 1 and 2, as a demonstration for the
user app.
If the camera’s DataValid goes active, but the user app has not cleared a
previous DataValid event, the demo code does not overwrite
Scan_MV_IO_user with new Inspection data. Instead, the demo code
increments the counter Scan_MV_dv_err_count. The new Inspection
data remains stranded in the Scan_MV_internal tag set, and is
effectively lost.
Scan_MV_trigger_count
Incremented by the demo code when a new trigger is issued to the
camera over the EtherNet/IP interface (Trigger Control activated).
Scan_MV_trigger_err_count
Incremented by the demo code if the user app attempts to trigger the
camera when TriggerReady is not active.
Scan_MV_dv_err_count
Incremented by the demo code when new Inspection data is received
from the camera, but the user app has not cleared the previous DataValid.
Scan_MV_status_err_count
Incremented by the demo code whenever the Error Status goes active.
Scan_MV_demo_blob, Scan_MV_demo_decode,
Scan_MV_demo_InspStat, Scan_MV_demo_measure
Purpose
These tags record counts and min and max values of several EIP IN data
members.
The demo code expects a demo vision job to be loaded on the camera,
and a demo target to be in the camera’s field of view. The demo PLC code
will operate without the demo vision job being loaded on the camera.
However, the data records will not be valid.
The demo vision job has the following data members linked to certain job
tools:
IN
OUT
Code
Float102 = Measure upper tolerance
String101 = Matchcode
Each tag set records the following data for each vision job tool result received in the
Inspection report:
The user app can follow the demo code’s usage of these tags for further application logic
development.
During runtime, the user app can change the OUT data members, and observe the
change in tool status after a new trigger.
Specifically, the PLC integrator would typically modify the logic beginning at the following rungs:
Demo Target
The demo vision job uses predefined images. It is unnecessary to have the camera aimed
at any specific target. If preferred, the job can be changed to enable the camera’s image
sensor. In this case, the demo targets should be printed approximately 2.5 inches (63
mm) wide by 1.6 inches (40 mm) tall, centered on white paper larger than the camera’s
field of view, and presented to the camera with the Data Matrix symbol on the right:
“Pass” Image
Code
Demo Code Usage
The user app example of the demo code watches for Data Valid. When it goes active, the
user app example processes the user I/O data, updates each demo record with the
results, then uses ResetDataValid to clear DataValid.
Scan_MV_IO_internal, Scan_MV_ons_internal
Purpose
None. The user app must not attempt to read or write to this tag set.
The demo code uses this tag set to abstract the on-the-wire control of the camera from the
user app.
EtherNet/IP Operation
Omron PLC Setup for
CHAPTER 7 Omron PLC Setup for
EtherNet/IP Operation
Notes:
• The camera communications protocol must be enabled for
EtherNet/IP before it can be used in this environment. Refer to
Chapter 1, Enabling Industrial Protocols, for information about
enabling communications protocols for the camera, and information
about switching camera communications protocols.
Start the CX-Programmer application and select menu item File > New. Enter the desired
Device Name. Select the Device Type and then click Settings to the right of the Device
Type menu.
In the Device Type Settings dialog, select the correct CPU Type and click OK.
EtherNet/IP Operation
Omron PLC Setup for
Select USB from the Network Type menu and click OK.
Connect to the PLC via USB connection. Select the menu item PLC > Work Online or
click the online icon in the tool bar. When prompted, click Yes to complete the connection.
Once successfully connected, the background of the right pane will turn gray and the
online icons in the ribbon will remain clicked.
To complete the next steps the PLC must be in Program Mode. Right-click the PLC node
in the tree view in the left pane and select Operating Mode > Program.
Click Yes at the I/O table creation prompt. Click Yes at the Initialize CPU bus settings
prompt. Click Transfer at the transfer prompt. Click OK at the results prompt. The IO table
will now be updated with the current PLC hardware settings.
EtherNet/IP Operation
Omron PLC Setup for
To edit the EtherNet/IP items and mapping, double-click the EtherNet/IP node.
Input the desired IP settings and then click Transfer [PC to Unit].
When prompted to transfer, click Yes. After the transfer prompt click Close. When
prompted to restart the unit click Yes. Once the unit resets, click OK at the prompt. Close
the IO edit dialog.
Physically power down the unit and adjust the rotary switches to match the last octet of the
new IP address from above. Then power the unit back on.
Set the CX-Programmer application to offline by selecting PLC > Work Offline or the
online icon in the ribbon.
In the CX-Programmer application, double-click the PLC node. In the Network Type menu,
select EtherNet/IP. Click Settings to the right of Network Type and enter the PLC’s new IP
address. Click the OK buttons to close the dialogs.
Set the CX-Programmer back to online. You will be prompted with a connection via
EtherNet/IP. Click Yes to complete the connection.
Double-click the IO Table and Unit Setup node. Expand the Built-In Port/Inner Board
node. Right-click and select Start Special Application > Start with Settings Inherited.
EtherNet/IP Operation
Omron PLC Setup for
Select Network Configurator and click OK. Select port TCP:2 and click OK. Then click
OK for EtherNet/IP_1 connection.
To install the EDS file, select EDS File > Install. Navigate to the EDS folder
C:\Microscan\Vscape\Firmware\eds\MicroHAWK or
C:\Microscan\Vscape\Firmware\eds\HAWK. Select the correct file and click Open to
load the file. All other EDS files can be downloaded from www.microscan.com.
Expand the left tree view to open the OMRON Corporation files. Locate CJ2M-EIP21 for
this example and drag it to the line in the right pane.
Expand the Vendor Collection node for the camera connected to the PLC and drag it to
the line in the right pane.
Right-click near the newly-added icons and select Change IP Address. Enter the IP
address for the PLC and the camera or reader attached and click OK.
Double-click the PLC icon to edit the device parameters. This is where you will be linking
and mapping the EtherNet/IP assembly data to the internal memory of the PLC. Select the
Tag Sets tab. Select the In - Consume tab at the top. Click Edit Tags below. Then click
New to edit/create a new tag. In this example we are naming this tag 300 for the
peripheral memory linked to the input data. Select the size (320 bytes) for the entire input
assembly. Click Regist then Close to continue.
EtherNet/IP Operation
Omron PLC Setup for
Select the Out - Produce tab and then click New. For the output assembly you are going
to map to peripheral memory address 500 with 320 bytes. Click Regist and then Close.
Click OK on the Edit Tags dialog. When prompted to register new tags click Yes.
Click the Connections tab on the Edit Device Parameters dialog. Click the download
button in the middle to register the device.
In the lower pane, double-click the PLC in the registered device list. This will open the
linking dialog. If there are multiple connection types, they can be selected from the
Connection I/O Type menu. In the Originator Device section, select the Input Tag then
the Output Tag. Adjust the RPI if needed. When done, click Regist and then Close.
The registered device will now display the tags that are linked. Click OK to continue.
EtherNet/IP Operation
Omron PLC Setup for
Download the new tags and links to the PLC by selecting Device > Parameter > Download
or by clicking the download icon in the ribbon. Click Yes when prompted to download.
When the List of Devices That Are Executing dialog appears, select the PLC and click
Download after Changed to Program Mode. When prompted to return the state, click
Yes to continue.
Select Network > Check Connection in the Network Configurator to ensure that there
are no connection problems.
Notes:
PROFINET I/O
GSDML Files
Below are the GSDML Files for the specified devices. These files have been tested on
Siemens Step7 and TIA Portals version 13 to version 15.
F4X0-F GSDML File:
GSDML-V2.33- Omron Microscan Systems, Inc.-MicroHAWKMV40-20160824.xml
HAWK MV-4000 GSDML File:
GSDML-V2.33- Omron Microscan Systems, Inc.-HAWKMV4000-20180530.xml
CmdRet (32-bit)
The value of CmdRet is only valid when ExeCmdAck is active (1), in response to
ExeCmd being active, and CmdCodeRslt is 0 (Success). The following chart shows
which CmdCodes return data in the CmdRet register.
State (16-bit)
State reflects the following operational condition of the camera:
This section describes how to use Omron Microscan demo PLC code with
a vision job and camera target. The PROFINET I/O demo files can be
found where AutoVISION is installed, in the folder: C:\Microscan\
Tutorials and Samples\“Product Name”\PROFINET demo\
TIAPortal_Demos\BlobDemo. Open Blob_Demo.avp with AutoVISION
and download them to the camera.
Notes:
• The camera communications protocol must be enabled for
PROFINET I/O before it can be used in this environment. Refer to
Chapter 1, Enabling Industrial Protocols, for information about
enabling and switching communications protocols.
Overview
In this demonstration, you will learn how to load a saved job into the camera, establish
connectivity via PROFINET I/O to a Siemens ET200SP CPU PLC, and run some example
programs that interface with the camera. While evaluating PROFINET I/O capabilities, you will:
• Begin with AutoVISION.
Open a sample demo vision job in AutoVISION and use the Try Out feature to learn what
to expect from the camera before it is connected to the PLC.
• Prepare the PLC.
Integrate the camera into the PLC environment with TIA Portal software and the GSD file.
• Run the camera.
Trigger the camera while it is online with the PLC and observe changes in the Inspection
status as the PLC reconfigures the vision job’s parameters. Prior to starting AutoVISION,
make sure the camera is either connected to the PLC or both PLC and camera are on the
same physical network. Ensure that the PC, PLC, and camera have the same network
class and corresponding subnet addresses.
Open AutoVISION and select the camera.
Count Demo
C:\Microscan\Vscape\Tutorials And Samples\“Product Name”
\PROFINET demo\TIAPortal_Demos\BlobDemo. Select BlobDemo.avp.
The Blob tool data item linked to the PROFINET I/O structure as shown here:
A file browser will open. Then navigate to the same folder where the demo job was loaded
PROFINET I/O Demo. If the images are located, the icon will change from a camera to a folder.
By clicking the Try Job Once icon, the application will cycle through the entire job with the
loaded image.
There are two images on file. One will pass the inspection and one will fail.
Count Demo
this point the job is ready to run and can be tested. However, in order to run the job
change demo this job needs to be loaded into Slot 1. Click back to the Edit view from the
top ribbon bar.
Click the slot icon and select Slot 1 or New Slot if no slots are currently in use.
Now the job and images will be saved to the flash memory of the camera.
Create a new project from the menu item Project->New. The default name is Project1 as
seen below. Fill out the required information, then click Create.
Count Demo
Double-click Add new device.
Open the SIMATIC ET200 CPU arrow, then open the ET200SP CPU arrow, then open the
CPU 1510SP-1 PN, then click on 6ES7 510-1DJ01-0AB0. You will see the screen below.
Click OK.
Count Demo
Click the lower green box on the PLC picture. The following will be displayed in the lower pane.
Click Add new subnet. The Subnet field will show PN/IE_1. Now go to the IP address
field, and type the IP address you wish to use for this device. Click Save Project often to
save your work.
To add these modules, first click the arrow next to DI, keep clicking on arrows until you find
the order number for device 1. Click and hold down the left mouse key. Drag it to slot 2 just
to the left.
Count Demo
Do the same thing for device 2, looking under the DQ arrow. Your display should now look
like this:
Now click on the PLC picture on slot 2. You will see the following screen:
Be sure the Enable new potential group (light Base Unit) is selected. Do the same for
Slot 3. Save the project.
Count Demo
following area. Other field devices->PROFINET IO ->General->MICROSCAN->Smart
Camera->“Product Name”. Left-click on the camera and hold it. Drag it to the left into the
Devices and networks panel. Your screen will look like this:
On the camera picture, click the Not assigned link, then click on PLC_1.PROFINET IO-System.
This has just connected the camera to the PROFINET network.
Double-click the picture of the camera. In the bottom pane you will see the following:
Enter the name of the device in the Name: field. Then click Ethernet addresses on the left,
and type in the IP address of the camera. This will allow the PLC to set the camera IP.
Count Demo
From TIA Portal, open the example program from the menu Project > Open. Click the
Browse button to locate the (BlobDemo.ap13) program. The BlobDemo is located in
C:\Microscan\Vscape\Tutorials and Samples\“Product Name”\PROFINET
Demo\TIAPortal_Demos\BlobDemo. In the left pane in the Devices tab, open the
PLC_1[CPU 1510SP-1 PN] arrow. Open the Program blocks arrow. Select all the blocks
as shown below.
Right-click and copy. Go to your new project and open the same arrows, right-click on
Program blocks, then click paste. Be sure to save your work. You may need to delete the
Main [OB1] in the new project first.
Now back in the left pane of the BlobDemo project, click on PLC data types, right-click,
copy, and paste them into the new project PLC data types.
In the left pane of the BlobDemo project, click on Watch and force tables. Right-click on
Watch table_1, then copy. Paste into new project Watch and force tables. Be sure to save
the project.
Count Demo
Depending on the order the PLC can load things, we may need to change the IO
addresses in our block to match the Device Overview in the Device view screen.
Double-click on the camera picture, and the Device overview will be displayed to the right.
The image below is intended as an example only and may not exactly resemble your
Device Overview.
From the Hardware catalog display to the far right, open the Module selection. You will
see the following:
You must manually drag and drop “Int In” into the Device Overview pane. Click “Int In” and
TIA will highlight the slot to drag it to. TIA will only allow you to insert them into their proper
slot position.
Your device view should now look as follows. The example addresses shown will not be
the same for your device.
Count Demo
Devices pane, open the Program blocks arrow, and double-click on OB1 [OB1]. This will
open a screen in the middle pane. Scroll this middle pane down until you see Network 1.
Change the numbers here to match with the Device overview display, as shown in the
example below. Leave the DB_Number as is.
Repeat this for Network 4, using the Int In_1 address from the Device Overview and put it
in the INT_ADDR below. Leave the DB_Number as is.
Be sure to save the project. Click the PLC_1 {CPU 1510SP-1 PN] top level, then click the
compile icon.
There should be NO compile errors. If there are no errors, click the download icon.
Count Demo
Click Start Search. PLC_1 should be displayed with the address you gave it. Click Load. If you
see a screen similar to below, do a memory reset (MRES) on the PLC, and try to load again. If
this continues to be an issue, click Continue without synchronization and continue.
All LEDS on the PLC should be GREEN. Click Go online. You should see the following:
Count Demo
If all LEDs are not green, go offline and click the Accessible devices icon.
Click Start search. The PLC and the F4X0-F should be displayed here.
If the name of the camera is not correct, you will not connect. The default name is the
name of the camera along with the last 3 of the MAC address. (Example: microhawk186c49
for the F430-F.) Go back to the general settings of the camera in the device view, and
change the name if required. Re-compile, and re-load. Try running again. This is the most
common reason for not connecting.
Count Demo
Be sure to store a job in a slot in the camera memory as described earlier. To execute this
test properly, load another job into Slot 2 of the camera. For example, the
Circle_LocatorDemo job. You must release control of the device by clicking on the
Connect tab and change the lock icon to closed as in the following image, then click the
Run tab again for job change to work properly.
Go to Watch table_1, and click the button with the glasses and “play” symbol. This begins
the monitoring of data.
Using the Watch table_1 elements ChangeJob and New_JobSlot, click on the Modify
Value column next to New_JobSlot, type 2, type Enter. Click on the Modify value to the
right of ChangeJob and enter TRUE. Click on the lightning bolt with a 1 at the top. This will
set the job slot to 2. Then click the lightning bolt button again.
The current job will be changed to the job in slot 2. To verify that this clears all changes
made to the Modify value column, click on Modify value to the right of
Get_CurrentJobSlot. Enter TRUE, and click on the lightning bolt button again.
You will see the current job listed to the right of Current_JobSlot. You can repeat this
procedure changing the slot back to 1 and verify that the current job slot is now 1.
Clear any changes made to the Modify value column. If you want to watch the inspection,
be sure AutoVISION is running and connected to the device. Be sure the job is running. If
you choose not to run AutoVISION, you can look at the LEDs on the device to confirm
your triggers. Change the value to the right of Trigger to be TRUE, and click the lightning
bolt button again.
You will see the NumberOfParts change to either 2 or 5. The pass and fail bools will
indicate whether the inspection has passed or failed. Also, the appropriate counters will
have incremented. Each click of the lightning bolt button will cause an inspection, which
will bounce from one image to the next. One will pass and the next will fail.
Count Demo
next to ResetCounters to TRUE, and click the lightning bolt button again. You will see all
the counters in blue reset to 0.
If you clear this again, set the Trigger to TRUE, and click the lightning bolt button again, you
will notice that the counts start at 1 on both the PLC counters and AutoVISION counters.
Reset Error
If at any time there is an error indicated by a TRUE in any of the values below, you can
clear the error by entering a TRUE to the right of ResetError and clicking the lightning
button. Reset it to FALSE and click the button again. Any errors in the values below
should be cleared.
This section describes how to use Omron Microscan demo PLC code with
a vision job and camera target. The PROFINET I/O demo files can be
found where AutoVISION is installed, in the folder: C:\Microscan\Tutorials
and Samples\“Product Name”\PROFINET demo\ TIAPortal_Demos\
Circle_LocateDemo. Open Circle_LocatorDemo.avp with AutoVISION
and download it to the camera.
Notes:
• The camera communications protocol must be enabled for
PROFINET I/O before it can be used in this environment. Refer to
Chapter 1, Enabling Industrial Protocols, for information about
enabling and switching communications protocols.
Overview
In this demonstration, you will learn how to load a saved job into the camera, establish
connectivity via PROFINET I/O to a Siemens ET200SP CPU PLC, and run some example
programs that interface with the camera. While evaluating PROFINET I/O capabilities, you will:
• Begin with AutoVISION.
Open a sample demo vision job in AutoVISION and use the Try Out feature to learn what
to expect from the camera before it is connected to the PLC.
• Prepare the PLC.
Integrate the camera into the PLC environment with TIA Portal software and the GSD file.
• Run the camera.
Trigger the camera while it is online with the PLC and observe changes in the Inspection
status as the PLC reconfigures the vision job’s parameters. Prior to starting AutoVISION,
make sure the camera is either connected to the PLC or both PLC and camera are on the
same physical network. Ensure that the PC, PLC, and camera have the same network
class and corresponding subnet addresses.
Open AutoVISION and select the camera.
The demo job will include two tools: Locate Shape and Circle.
Once the job has loaded, the next step is to link the pre-saved images on the local PC. On
the Camera button, click the far left icon to select and load an image.
A file browser will open. Then navigate to the same folder where the demo job was loaded
PROFINET I/O Demo. If the images are located, the icon will change from a camera to a folder.
By clicking the Try Job Once icon, the application will cycle through the entire job with the
loaded image.
Now click the Run button on the top ribbon. This will download the job to the camera. At
this point the job is ready to run and can be tested. However, in order to run the job
change demo this job needs to be loaded into Slot 1. Click back to the Edit view from the
top ribbon bar.
Click the slot icon and select Slot 1 or New Slot if no slots are currently in use.
Now the job and images will be saved to the flash memory of the camera.
Create a new project from the menu item Project->New. The default name is Project1 as
seen below. Fill out the required information, then click Create.
The screen below shows the main screen you will see when a project is opened.
Click the lower green box on the PLC picture. The following will be displayed in the lower pane.
Click Add new subnet. The Subnet field will show PN/IE_1. Now go to the IP address
field, and type the IP address you wish to use for this device. Click Save Project often to
save your work.
To add these modules, first click the arrow next to DI, keep clicking on arrows until you find
the order number for device 1. Click and hold down the left mouse key. Drag it to slot 2 just
to the left.
Do the same thing for device 2, looking under the DQ arrow. Your display should now look
like this:
Now click on the PLC picture on slot 2. You will see the following screen:
Look at the right panel and click Hardware Catalog. Use the arrows to open up the
following area. Other field devices->PROFINET IO ->General->MICROSCAN->Smart
Camera->“Product Name”. Left-click on F430-F and hold it. Drag it to the left into the
Devices and networks panel. Your screen will look like this:
On the F4X0-F picture, click the Not assigned link, then click on PLC_1.PROFINET IO-
System. This has just connected the F4X0-F to the PROFINET network.
Enter the name of the device in the Name: field. Then click Ethernet addresses on the left,
and type in the IP address of the camera. This will allow the PLC to set the camera IP.
Now back in the left pane of the Circle_LocatorDemo project, click on PLC data types,
right-click, copy, and paste them into the new project PLC data types.
In the left pane of the Circle_LocatorDemo project, click on Watch and force tables. Right-
click on Watch table_1, then copy. Paste into new project Watch and force tables. Be sure
to save the project.
Double-click on the camera picture, and the Device overview will be displayed to the right.
The image below is intended as an example only and may not exactly resemble your
Device Overview.
From the Hardware catalog display to the far right, open the Module selection. You will
see the following:
Your device view should now look as follows. The example addresses shown will not be
the same for your device.
You need to modify the PLC program blocks to agree with this display. On the left under the
Devices pane, open the Program blocks arrow, and double-click on OB1 [OB1]. This will
open a screen in the middle pane. Scroll this middle pane down until you see Network 1.
Change the numbers here to match with the Device overview display, as shown in the
example below. Leave the DB_Number as-is.
Repeat this for Network 4, using the Boolean In_1 address and the Float In_1address
from the Device Overview and put it in the BOOL_ADDR and FLOAT_ADDR respectively.
Leave the DB_Number as-is.
There should be NO compile errors. If there are no errors, click the download icon.
Select your PC network interface, and change the Connection to interface/subnet to PN/IE_1.
Click Start Search. PLC_1 should be displayed with the address you gave it. Click Load. If you
see a screen similar to below, do a memory reset (MRES) on the PLC, and try to load again. If
this continues to be an issue, click Continue without synchronization and continue.
Troubleshooting
If all LEDs are not green, go offline and click the Accessible devices icon.
Click Start search. The PLC and the F4X0-F should be displayed here.
If the name of the camera is not correct, you will not connect. The default name is the
name of the camera along with the last 3 of the MAC address. (Example: microhawk186c49
for the F430-F.) Go back to the general settings of the camera in the device view, and
change the name if required. Re-compile, and re-load. Try running again. This is the most
common reason for not connecting.
Be sure to store a job in a slot in the camera memory as described earlier. To execute this
test properly, load another job into Slot 2 of the camera. For example, the BlobDemo job.
You must release control of the device by clicking on the Connect tab and change the lock
icon to closed as in the following image, then click the Run tab again for job change to
work properly.
Go to Watch table_1, and click the button with the glasses and “play” symbol. This begins
the monitoring of data.
Using the Watch table_1 elements ChangeJob and New_JobSlot, click on the Modify
Value column next to New_JobSlot, type 2, and type Enter. Click on the Modify value to
the right of ChangeJob and enter TRUE. Click on the lightning bolt with a 1 at the top. This
will set the job slot to 2. Then click the lightning bolt button again.
You will see the current job listed to the right of Current_JobSlot. You can repeat this
procedure, changing the slot back to 1 and verify that the current job slot is now 1.
Clear any changes made to the Modify value column. If you want to watch the inspection,
be sure AutoVISION is running and connected to the device. Be sure the job is running. If
you choose not to run AutoVISION, you can look at the LEDs on the device to confirm
your triggers. Change the value to the right of Trigger to be TRUE, and click the lightning
bolt button again.
You will see the InstancePoints, Status, and RadiusDatum change based on the picture.
The pass and fail bools will indicate whether the inspection has passed or failed. Also, the
appropriate counters will have incremented. Each click of the lightning bolt button will
cause an inspection which will bounce from one image to the next. One will pass and the
next will fail.
To reset the counters, clear all settings in the Modify value column, and change the one
next to ResetCounters to TRUE, and click the lightning bolt button again. You will see all
the counters in blue reset to 0.
If you clear this again, set the Trigger to TRUE, and click the lightning bolt button again, you
will notice that the counts start at 1 on both the PLC counters and AutoVISION counters.
Reset Error
If at any time there is an error indicated by a TRUE in any of the values below, you can
clear the error by entering a TRUE to the right of ResetError and clicking the lightning bolt
button. Reset it to FALSE and click the button again. Any errors in the values below
should be cleared.
This section describes how to use Omron Microscan demo PLC code with
a vision job and camera target.
The PROFINET I/O demo files can be found where AutoVISION is
installed, in the folder: C:\Microscan\Vscape\Tutorials and Samples
\“Product Name”\PROFINET Demo\Step7_Demos\BlobDemo. Open
BlobDemo.avp and download it to the camera.
Notes:
• The camera communications protocol must be enabled for
PROFINET I/O before it can be used in this environment. Refer to
Chapter 1, Enabling Industrial Protocols, for information about
enabling and switching communications protocols.
• AutoVISION and FrontRunner jobs use Omron Microscan Link
functionality to accommodate PROFINET I/O communications
between the camera and the PLC. For information about how to
connect job parameters and outputs to Omron Microscan Link tags,
refer to the Linking Datums to Omron Microscan Link Tags
section of Chapter 2 in the Visionscape FrontRunner User Manual.
Important: PROFINET I/O allows the IP address and subnet mask of the
camera to be assigned automatically by the PLC. In order to allow this,
the F4X0-F may not have an assigned IP address on reboot until the PLC
is set to Run mode. During this time, the F4X0-F will not be visible on the
network for AutoVISION or Visionscape FrontRunner.
Overview
In this demonstration, you will learn how to load a saved job into the
camera, establish connectivity via PROFINET I/O to a Siemens S7 PLC,
and run some example programs that interface with the camera.
Open a sample demo vision job in AutoVISION and use the Try Out
feature to learn what to expect from the camera before it is connected to
the PLC.
Integrate the camera into the PLC environment with STEP 7 software and
the GSD file.
Trigger the camera while it is online with the PLC and observe changes in
the Inspection status as the PLC reconfigures the vision job’s parameters.
Count Demo
Prior to starting AutoVISION, make sure the camera is either connected to the PLC or
both PLC and camera are on the same physical network. Ensure that the PC, PLC, and
camera have the same network class and corresponding subnet addresses.
From the Image view, click the Load a Job button. Then navigate to C:\Microscan
\Vscape\Tutorials And Samples\“Product Name”\PROFINET Demo\Step7_Demos
\BlobDemo. Select BlobDemo.avp.
The Blob tool data item linked to the PROFINET I/O structure as shown here:
A file browser will open. Then navigate to the same folder where the demo job was loaded
PROFINET I/O Demo. If the images are located, the icon will change from a camera to a folder.
By clicking the Try Job Once icon, the application will cycle through the entire job with the
loaded image.
Count Demo
Now click the Run button on the top ribbon. This will download the job to the camera. At
this point the job is ready to run and can be tested. However, in order to run the job
change demo this job needs to be loaded into Slot 1. Click back to the Edit view from the
top ribbon bar.
Click the slot icon and select Slot 1 or New Slot if no slots are currently in use.
Now the job and images will be saved to the flash memory of the camera.
STEP 7 Setup
This section was created using Siemens STEP 7 software version 5.5 +
SP2 and an ET200S PLC, catalog number 6ES7 151-8AB01-0AB0, CPU
Version 3.2. It was tested with a 315-2 PN/DP PLC, catalog number
6ES7-315-2EH13-0AB0, CPU Version 2.6.
Create a new project from the menu item File > New. Select the project
location on disk then enter the name and click the OK button. In the
example below, the name is Start. Once the project is first created, you
will see the dialog. This dialog is the main entry point into the PLC
program and hardware settings.
Count Demo
correct one to the SIMATIC software. From the menu, select Options >
Set PG/PC Interface. This will open the Set PG/PC Interface dialog and
list the available network cards. On the Access Path tab select the NIC
card with (TCP/IP >) in the name.
In the SIMATIC Manager dialog, right-click and select Insert New Object.
This is where you will select the base station. For example, when
configuring an ET200-s, select SIMATIC 300 Station since it’s based on
the 300 series CPU.
After the station has been added, right-click and add Industrial Ethernet.
Expand the Start tree node on the left pane and click the station. On the
right pane you will see a Hardware icon.
Count Demo
Make sure the Catalog is selected in the ribbon bar on the top. This will
add a tree view on the right pane with all the available hardware devices.
If the latest GSDML file hasn’t been imported, follow the next steps to
import.
GSDML
• Install the GSD file from the menu item Options > Install GSD File.
Count Demo
Make sure the catalog number and version matches the PLC exactly.
The catalog number will be displayed on the bottom of the view.
Some CPUs are modules that will require a generic rack to be added prior. If your PLC
requires a rack, you will be prompted to add the rack prior to being allowed to insert the
CPU module.
After the CPU is added, a popup dialog will prompt the Properties relating to the IP
information.
Select Ethernet(1) on the bottom list box and enter the correct IP address of the CPU.
Once the CPU has been added, add any additional expansion modules, if installed. Click
the CPU on the left pane and the bottom pane will list the available ports and slots.
Add the camera in the location (PROFINET I/O > Additional Field Devices > General >
Microscan). The camera can be added by drag and drop to Ethernet(1): PROFINET-I/O
System (100) or by selecting the Ethernet(1) line first and double-clicking the camera.
Once the camera has been added the icon will appear on the configuration dialog.
Count Demo
properties dialog. Under the device name, enter the existing name of the
camera or a unique name.
Click the camera icon and the data slot address mapping will be displayed below. Take
note of the address values since they will be needed in the demo application. Since there
is an infinite combination of modules and slot configurations, the addressing is unique to
every setup.
Count Demo
Int In. This will highlight its appropriate slot. Drag and drop this highlighted slot. The table
should resemble the following:
Once the hardware configuration has been completed, it’s time to compile and download.
Click the compile and save icon on the ribbon. If there are any configuration conflicts, the
application will prompt a warning at this point.
Once compiled, click the download icon on the ribbon to send the information to the PLC.
At this point close or minimize the HW Config dialog and re-visit the SIMATIC Manager
dialog. The CPU should be added next to the Hardware icon and in the tree view in the left
pane. Expand the CPU tree item and remaining child items below it.
Count Demo
From the HW Config dialog open Edit Ethernet Node from the menu item PLC >
Ethernet > Edit Ethernet Node. From the SIMATIC Manager dialog open Edit Ethernet
Node from the menu item PLC > Edit Ethernet Node.
Edit the Device Name, if necessary, to match the name entered previously in
the camera properties dialog, and click the Assign Name button.
Select the objects minus the System data object and copy with a right-click and Copy or
CTRL + C. Paste into the current project with a right-click > paste or CTRL + V. When
prompted that OB1 already exists, click the Yes button to overwrite it. Now the example
program is imported to the current project.
Count Demo
This will download the new copied functions and system data to the PLC. Now it’s time to
update the new addressing from the hardware installation prior. Double-click the OB1
block to open the LAD/STL/FBD editor. OB1 is the main routine of the PLC program.
Scroll down to Network 1. This is where the data is mapped from the camera to the local
data structure. FC1 is a function that pushes the input data from the camera to the
program structure. Click the numbers to match the address on the hardware as shown.
Click the following buttons on the popup dialogs:
Count Demo
hardware config view.
The addresses on the right must be copied to Network 1 to match. Ex: HW config shows
Status as address 0..1. Copy 0 into Network 1, STATUS value.
Repeat the same steps for Network 6 to update the output data mapping. Keep in mind
that all input addresses are under the (I address) column and the output addresses are
under the (Q address) column. Save to the PC and download to the PLC.
Do a master reset and set the PLC to RUN mode. Make sure all LEDs indicate good.
To establish a live connection to the PLC, click the Monitor Variable button on the ribbon.
This will update data from the PLC to the dialog. The top title bar will go blue and the
bottom status will show run with a green progress bar.
Count Demo
Change Jobs + Get Current Job Slot
Be sure to follow instructions in the AutoVISION Setup section to store a job in a slot in the
camera memory. To properly execute this test, load another job into slot 2 of the camera.
For example, the Circle_LocatorDemo job. You must release control of the device by
clicking on the Connect tab and change the lock icon to closed as in the following image,
then click the Run tab again for job change to work properly.
Using the VAT_1 elements ChangeJob and New_JobSlot. Click the Modify value
column next to New_JobSlot, type 2, and type Enter. Click on the Modify Value column to
the right of ChangeJob and enter TRUE. Click on the icon indicated at the top.
The current job will be changed to the job in slot 2. To verify this, clear all changes made
to the Modify value column, and click Modify value to the right of Get_CurrentJobSlot.
Enter TRUE, and click on the indicated icon again.
You will see the
current job listed to
the right of
Current_JobSlot.
You may repeat
this procedure
changing the slot
back to 1 and verify
the current job slot
is now 1.
Be sure the current job selected is slot 1. Clear any changes made to the Modify value
column. If you want to watch the inspection, be sure AutoVISION is running, and
connected to the device. Be sure the job is running. If you choose not to run AutoVISION,
you may look at the LEDs on the device to confirm your triggers. Change the value to the
right of Trigger to TRUE, and click the indicated icon.
You will see the NumberOfParts change to either 2 or 5. The pass and fail bools will
indicate whether the inspection has passed or failed. Also, the appropriate counters will
have incremented. Each press of the icon will cause an inspection which will bounce from
one image to the next. One will pass and the next will fail.
Count Demo
To reset the counters, clear all settings in the Modify value column, and change the one
next to ResetCounters to TRUE, and click the icon again. You will see all the counters in
blue reset to 0.
If you clear this again and set the Trigger to TRUE, and click the lightning bolt button again,
you will notice that the counts start at 1 on both the PLC counters and AutoVISION counters.
Reset Error
If at any time there is an error indicated by a TRUE in any of the values below, you can
clear the error by entering a TRUE to the right of ResetError and clicking the icon. Reset
it to FALSE and click the button again. Any errors in the values below should be cleared.
This section describes how to use Omron Microscan demo PLC code with
a vision job and camera target.
The PROFINET I/O demo files can be found where AutoVISION is
installed, in the folder: C:\Microscan\Vscape\Tutorials and Samples
\“Product Name”\PROFINET Demo \Step7_Demos \Circle_LocatorDemo.
Open Circle_LocatorDemo.avp and download it to the camera.
Notes:
• The camera communications protocol must be enabled for
PROFINET I/O before it can be used in this environment. Refer to
Chapter 1, Enabling Industrial Protocols, for information about
enabling and switching communications protocols.
• AutoVISION and FrontRunner jobs use Omron Microscan Link
functionality to accommodate PROFINET I/O communications
between the camera and the PLC. For information about how to
connect job parameters and outputs to Omron Microscan Link tags,
refer to the Linking Datums to Omron Microscan Link Tags
section of Chapter 2 in the Visionscape FrontRunner User Manual.
Important: PROFINET I/O allows the IP address and subnet mask of the
camera to be assigned automatically by the PLC. In order to allow this,
the F4X0-F may not have an assigned IP address on reboot until the PLC
is set to Run mode. During this time, the F4X0-F will not be visible on the
network for AutoVISION or Visionscape FrontRunner.
Overview
In this demonstration, you will learn how to load a saved job into the
camera, establish connectivity via PROFINET I/O to a Siemens S7 PLC,
and run some example programs that interface with the camera.
Open a sample demo vision job in AutoVISION and use the Try Out
feature to learn what to expect from the camera before it is connected to
the PLC.
Integrate the camera into the PLC environment with STEP 7 software and
the GSD file.
Trigger the camera while it is online with the PLC and observe changes in
the Inspection status as the PLC reconfigures the vision job’s parameters.
Count Demo
Prior to starting AutoVISION, make sure the camera is either connected to the PLC or
both PLC and camera are on the same physical network. Ensure that the PC, PLC, and
camera have the same network class and corresponding subnet addresses.
From the Image view, click the Load a Job button. Then navigate to
C:\Microscan\Vscape\Tutorials And Samples\“Product Name”
\PROFINET demo\Step7_Demos\Circle_LocatorDemo. Select
Circle_LocatorDemo.avp.
The demo job will include two tools: Locate Shape and Circle.
Count Demo
the Camera button, click the far left icon to select and load an image.
A file browser will open. Then navigate to the same folder where the demo job was loaded
PROFINET I/O Demo. If the images are located, the icon will change from a camera to a folder.
By clicking the Try Job Once icon, the application will cycle through the entire job with the
loaded image.
There are two images on file. One will pass the inspection and one will fail.
Count Demo
this point the job is ready to run and can be tested. However, in order to run the job
change demo this job needs to be loaded into Slot 1. Click back to the Edit view from the
top ribbon bar.
Click the slot icon and select Slot 1 or New Slot if no slots are currently in use.
Now the job and images will be saved to the flash memory of the camera.
STEP 7 Setup
This section was created using Siemens STEP 7 software version 5.5 +
SP2 and an ET200S PLC, catalog number 6ES7 151-8AB01-0AB0, CPU
Version 3.2. It was tested with a 315-2 PN/DP PLC, catalog number
6ES7-315-2EH13-0AB0, CPU Version 2.6.
Create a new project from the menu item File > New. Select the project
location on disk then enter the name and click the OK button. In the
example below, the name is Start. Once the project is first created, you
will see the dialog. This dialog is the main entry point into the PLC
program and hardware settings.
Count Demo
correct one to the SIMATIC software. From the menu, select Options >
Set PG/PC Interface. This will open the Set PG/PC Interface dialog and
list the available network cards. On the Access Path tab select the NIC
card with (TCP/IP >) in the name.
In the SIMATIC Manager dialog, right-click and select Insert New Object.
This is where you will select the base station. For example, when
configuring an ET200-s, select SIMATIC 300 Station since it’s based on
the 300 series CPU.
After the station has been added, right-click and add Industrial Ethernet.
Expand the Start tree node on the left pane and click the station. On the
right pane you will see a Hardware icon.
Count Demo
Make sure the Catalog is selected in the ribbon bar on the top. This will
add a tree view on the right pane with all the available hardware devices.
If the latest GSDML file hasn’t been imported, follow the next steps to
import.
GSDML
• Install the GSD file from the menu item Options > Install GSD File.
Count Demo
catalog number and version matches the PLC exactly. The catalog number will be
displayed on the bottom of the view.
Some CPUs are modules that will require a generic rack to be added prior. If your PLC
requires a rack, you will be prompted to add the rack prior to being allowed to insert the
CPU module.
After the CPU is added, a popup dialog will prompt the Properties relating to the IP
information.
Select Ethernet(1) on the bottom list box and enter the correct IP address of the CPU.
Once the CPU has been added, add any additional expansion modules, if installed. Click
the CPU on the left pane and the bottom pane will list the available ports and slots.
Add the camera in the location (PROFINET I/O > Additional Field Devices > General >
Microscan). The camera can be added by drag and drop to Ethernet(1): PROFINET-I/O
System (100) or by selecting the Ethernet(1) line first and double-clicking the camera.
Once the camera has been added the icon will appear on the configuration dialog.
Once the camera has been added, double-click the icon to open the properties dialog.
Under the device name, enter the existing name of the camera or a unique name.
If a unique name is used, the device has to be manually updated. View Updating camera
name section.
Count Demo
note of the address values since they will be needed in the demo application. Since there
is an infinite combination of modules and slot configurations, the addressing is unique to
every setup.
This demo uses the Boolean In and Float In for data. To the right under PROFINET I/O
“Product Name”, click on Boolean In. This will highlight its appropriate slot. Drag and
drop this to the highlighted slot. Repeat this for the Float In. The table should now appear
as shown below.
Count Demo
Click the compile and save icon on the ribbon. If there are any configuration conflicts, the
application will prompt a warning at this point.
Once compiled, click the download icon on the ribbon to send the information to the PLC.
At this point close or minimize the HW Config dialog and re-visit the SIMATIC Manager
dialog. The CPU should be added next to the Hardware icon and in the tree view in the left
pane. Expand the CPU tree item and remaining child items below it.
Edit the Device Name, if necessary, to match the name entered previously in
the camera properties dialog, and click the Assign Name button.
Count Demo
From the SIMATIC Manager, open the example program from the menu File > Open.
Click the Browse button to locate the (BlobDemo) program. The BlobDemo is located in
\Microscan\Vscape\Tutorials and Samples\“Product Name”\PROFINET Demo\
Step7_Demos\Circle_LocatorDemo\S7Circle_LocatorDemo\Circle_LocatorDemo.s7p.
Select the objects minus the System data object and copy with a right-click and Copy or
CTRL + C. Paste into the current project with a right-click > paste or CTRL + V. When
prompted that OB1 already exists, click the Yes button to overwrite it. Now the example
program is imported to the current project.
Select the Blocks icon on the left pane. Then click the download button on the top ribbon.
This will download the new copied functions and system data to the PLC. Now it’s time to
update the new addressing from the hardware installation prior. Double-click the OB1
block to open the LAD/STL/FBD editor. OB1 is the main routine of the PLC program.
Count Demo
data structure. FC1 is a function that pushes the input data from the camera to the
program structure. Click the numbers to match the address on the hardware as shown.
Click the following buttons on the popup dialogs:
Note: This is the address mapping view of the camera module which is derived from the
hardware config view.
The addresses on the right must be copied to Network 1 to match. Ex: HW config shows
Status as address 0..1. Copy 0 into Network 1, STATUS value.
Repeat the same steps for Network 6 to update the output data mapping. Keep in mind
that all input addresses are under the (I address) column and the output addresses are
under the (Q address) column. Save to the PC and download to the PLC.
Do a master reset and set the PLC to RUN mode. Make sure all LEDs indicate good.
Count Demo
In the SIMATIC Manager dialog, double-click the VAT_1 icon. This will open the variable
table dialog for the data type demo. Maximize the internal dialog to increase the viewing area.
To establish a live connection to the PLC, click the Monitor Variable button on the ribbon.
This will update data from the PLC to the dialog. The top title bar will go blue and the
bottom status will show run with a green progress bar.
Using the VAT_1 elements ChangeJob and New_JobSlot. Click the Modify value
column next to New_JobSlot, type 2, and type Enter. Click on the Modify Value column to
the right of ChangeJob and enter TRUE. Click the icon indicated at the top.
The current job will be changed to the job in slot 2. To verify this, clear all changes made
to the Modify value column, and click Modify value to the right of Get_CurrentJobSlot.
Enter TRUE, and click on the indicated icon again.
You will see the
current job listed to
the right of
Current_JobSlot.
You may repeat
this procedure
changing the slot
back to 1 and verify
the current job slot
is now 1.
Count Demo
Be sure the current job selected is slot 1. Clear any changes made to the Modify value
column. If you want to watch the inspection, be sure AutoVISION is running, and
connected to the device. Be sure the job is running. If you choose not to run AutoVISION,
you may look at the LEDs on the device to confirm your triggers. Change the value to the
right of Trigger to TRUE, and click the indicated icon.
You will see various changes as shown above. The pass and fail bools will indicate
whether the inspection has passed or failed. Also, the appropriate counters will have
incremented. Each click of the icon will cause an inspection which will bounce from one
image to the next. One will pass and the next will fail.
Reset Counters
To reset the counters, clear all settings in the Modify value column, change the one next to
ResetCounters to TRUE, and click the icon again. You will see all the counters in blue
reset to 0.
If you clear this again and set the Trigger to TRUE, and click the lightning bolt button again,
you will notice that the counts start at 1 on both the PLC counters and AutoVISION counters.
Reset Error
If at any time there is an error indicated by a TRUE in any of the values below, you can
clear the error by entering a TRUE to the right of ResetError and clicking the icon. Reset
it to FALSE and click the button again. Any errors in the values below should be cleared.
STEP 7 Overview
In this demonstration, you will learn how to load a saved job into the
camera, establish connectivity via PROFINET I/O to a Siemens S7 PLC,
and run some example programs that interface with the camera.
Open a sample demo vision job in AutoVISION and use the Try Out
feature to learn what to expect from the camera before it is connected to
the PLC.
Integrate the camera into the PLC environment with STEP 7 software and
the GSD file.
Trigger the camera while it is online with the PLC and observe changes in
the Inspection status as the PLC reconfigures the vision job’s parameters.
Demos
Prior to starting AutoVISION, make sure the camera is either connected to the PLC or
both PLC and camera are on the same physical network. Ensure that the PC, PLC, and
camera have the same network class and corresponding subnet addresses.
From the Image view, click the Load a Job button. Then navigate to \Microscan \Vscape
\Tutorials And Samples\“Product Name”\PROFINET demo \STEP7_Demos
\Legacy_AVDemo. Select Legacy_AVDemo.avp.
The demo job will include three tools: Measure, Decode, and Count Blobs.
Each tool has data items linked to the PROFINET I/O structure as shown here.
Demos
load an image.
A file browser will open. Then navigate to the same folder where the
demo job was loaded – PROFINET demo. If the images are located, the
icon will change from a camera to a folder.
By clicking the Try Job Once icon, the application will cycle through the
entire job with the loaded image.
There are two images on file. One will pass all three inspections and one will fail all three.
Now click the Run button on the top ribbon. This will download the job to the camera.
At this point the job is ready to run and can be tested. However, in order to run the job
change demo this job needs to be loaded into Slot 1. Click back to the Edit view from the
top ribbon bar.
Click the slot icon and select Slot 1 or New Slot if no slots are currently in use.
Now the job and images will be saved to the flash memory of the camera.
Demos
This section was created using Siemens STEP 7 software version 5.5 +
SP2 and an ET200S PLC, catalog number 6ES7 151-8AB01-0AB0, CPU
Version 3.2. It was tested with a 315-2 PN/DP PLC, catalog number
6ES7-315-2EH13-0AB0, CPU Version 2.6.
Create a new project from the menu item File > New. Select the project
location on disk then enter the name and click the OK button. In the
example below, the name is Start. Once the project is first created, you
will see the dialog. This dialog is the main entry point into the PLC
program and hardware settings.
The PC may have multiple network cards so it’s imperative to map the
correct one to the SIMATIC software. From the menu, select Options >
Set PG/PC Interface. This will open the Set PG/PC Interface dialog and
list the available network cards. On the Access Path tab select the NIC
card with (TCP/IP >) in the name.
In the SIMATIC Manager dialog, right-click and select Insert New Object.
This is where you will select the base station. For example, when
configuring an ET200-s, select SIMATIC 300 Station since it’s based on
the 300 series CPU.
Demos
Expand the Start tree node on the left pane and click the station. On the
right pane you will see a Hardware icon.
Make sure the Catalog is selected in the ribbon bar on the top. This will
add a tree view on the right pane with all the available hardware devices.
If the latest GSDML file hasn’t been imported, follow the next steps to
import.
GSDML
• Install the GSD file from the menu item Options > Install GSD File.
Demos
• Select the file and click the Install button.
Add the CPU from the catalog view by drag and drop or double-click.
Make sure the catalog number and version matches the PLC exactly. The
catalog number will be displayed on the bottom of the view.
Some CPUs are modules that will require a generic rack to be added
prior. If your PLC requires a rack, you will be prompted to add the rack
prior to being allowed to insert the CPU module.
After the CPU is added, a popup dialog will prompt the Properties relating
to the IP information.
Demos
Once the CPU has been added, add any additional expansion modules, if
installed. Click the CPU on the left pane and the bottom pane will list the
available ports and slots.
Add the camera in the location (PROFINET I/O > Additional Field
Devices > General > Microscan > Smart Camera\“Product Name”).
The camera can be added by drag and drop to Ethernet(1): PROFINET-
I/O System (100) or by selecting the Ethernet(1) line first and double-
clicking the camera. Once the camera has been added the icon will
appear on the configuration dialog.
Once the camera has been added, double-click the icon to open the
properties dialog. Under the device name, enter the existing name of the
camera or a unique name.
Demos
Click the camera icon and the data slot address mapping will be displayed below. Take
note of the address values since they will be needed in the demo application. Since there
is an infinite combination of modules and slot configurations, the addressing is unique to
every setup.
You must manually add the remaining slots into the display shown on the previous page
from the database to the right.
Drag and drop all these data elements into the HW display. It will only allow you to drop them
in the appropriate slot. When finished, your HW display should resemble the following:
Once the hardware configuration has been completed, it’s time to compile and download.
Click the compile and save icon on the ribbon. If there are any configuration conflicts, the
application will prompt a warning at this point.
Demos
At this point close or minimize the HW Config dialog and re-visit the
SIMATIC Manager dialog. The CPU should be added next to the
Hardware icon and in the tree view in the left pane. Expand the CPU tree
item and remaining child items below it.
Edit the Device Name, if necessary, to match the name entered previously in
the camera properties dialog, and click the Assign Name button.
Demos
From the SIMATIC Manager, open the example program from the menu File > Open.
Click the Browse button to locate the (AVDemo) program. The AVDemo is located in
\Microscan\Vscape\Tutorials and Samples\“Product Name”\PROFINET
Demo\STEP7_Demos\Legacy_AVDemo\300PLC_w.s7p.
Select the objects minus the System data object and copy with right-click > copy or
CTRL+C. Paste into current project with right-click > past or CTRL+V. When prompted
that OB1 already exists, click the Yes button to overwrite it. Now the example program is
imported to the current project.
Select the Blocks icon on the left pane. Then click the download button on the top ribbon.
This will download the new copied functions and system data to the PLC. Now it’s time to
update the new addressing from the hardware installation prior. Double-click the OB1
block to open the LAD/STL/FBD editor. OB1 is the main routine of the PLC program.
Demos
program structure. Click the numbers to match the address on the hardware as shown.
Click the following buttons on the popup dialogs:
Note: This is the address mapping view of the camera module which is derived from the
hardware config view.
Repeat the same steps for Network 5 to update the output data mapping. Keep in mind
that all input addresses are under the (I address) column and the output addresses are
under the (Q address) column. Save to the PC and download to the PLC.
Do a master reset and set the PLC to RUN mode. Make sure all LEDs indicate good.
Demos
In the SIMATIC Manager dialog, double-click the VAT_1 icon. This will
open the variable table dialog for the data type demo. Maximize the
internal dialog to increase the viewing area.
There are two demo modes in this example. The modes are set in
“USER”.Demo.DemoMode (DB101.DBW 2).
0 = AutoVISION Test
The AutoVISION Test will demonstrate communications between the PLC and the current
job loaded from AutoVISION.
To start triggering the camera program, right-click inside the Status Value column of the
“USER.Demo.DemoTrigType” (DB101.DBW 0) row.
Change the value from 0 to 1 to begin triggering and running the job on the camera.
Demos
and “USER”.Demo.CountFail:
The tolerances are below the counters. The inspection values and status bits are below
the tolerances.
In some instances a large job could take longer to load. Increment the delay time to adjust for
job size. The image below shows Function Block 4, Network 6, where the delay is located.
To run the Job Change Test you first need to use AutoVISION to download another job to
slot 2 on the camera. In AutoVISION, connect to the camera and select the Connect icon
at the top of the user interface. Click the Load a Job icon. Locate Legacy_AVDemo.avp
and click the Open button. Once the job has loaded into AutoVISION, click the Edit button
at the top of the user interface. Then click Save the Job to a Slot on the camera icon in
the menu at the top of the user interface. Select New Slot, which should be 2. When switching
between tests, disable the current routine by setting the "USER".Demo.DemoTrigType to 0.
Now there should be two jobs loaded in the camera’s flash memory. Using the SIMATIC
Manager, open VAT_1. Click the Monitor Variable icon. On the row
"USER".Demo.DemoMode, right-click and modify to one. Right-click the row
"USER".Demo.DemoTrigType and Modify Address to 1 to start the demo. AutoVISION
should be closed for this demo to work.
This demo will cycle through loading jobs from slots 1, 2, and 3. Each cycle will be counted
in the variable table "USER".Demo.CountExecutions. The job load success is
determined by the camera’s status register "Legacy_AVDemo.Input.CmdCodeRslt" =
0x0. If the job load is successful the counter "USER".Demo.CountPass will increment. If
the job load fails when "Legacy_AVDemo".Input.CmdCodeRslt ! = 0x0, then the counter
"USER".Demo.CountFail will increment.
OB1 calls FB1 to process the AutoVISION test. To view the ladder logic, select FB1, right-click, and
select Called Block > Open. Then select the main menu item Open ONLINE to view processes.
Demos
In this demonstration, you will learn how to load a saved job into the camera, establish
connectivity via PROFINET I/O to a Siemens ET200SP CPU PLC, and run some example
programs that interface with the camera. While evaluating PROFINET I/O capabilities, you will:
• Begin with AutoVISION.
Open a sample demo vision job in AutoVISION and use the Try Out feature to learn what
to expect from the camera before it is connected to the PLC.
• Prepare the PLC.
Integrate the camera into the PLC environment with TIA Portal software and the GSD file.
• Run the camera.
Trigger the camera while it is online with the PLC and observe changes in the Inspection
status as the PLC reconfigures the vision job’s parameters. Prior to starting AutoVISION,
make sure the camera is either connected to the PLC or both PLC and camera are on the
same physical network. Ensure that the PC, PLC, and camera have the same network
class and corresponding subnet addresses.
Open AutoVISION and select the camera.
From the Image view, click the Load a Job button. Then navigate to
C:\Microscan\Vscape\Tutorials And Samples\“Product Name”
\PROFINET demo\TIAPortal_Demos\Legacy_AVDemo. Select
Legacy_AVDemo.avp.
The demo job will include three tools: Measure, Decode, and Count Blobs.
Demos
This data is transferred cyclically between the camera and PLC.
Once the job has loaded, the next step is to link the pre-saved images on the local PC. On
the Camera button, click the far left icon to select and load an image.
A file browser will open. Then navigate to the same folder where the demo job was loaded
PROFINET I/O Demo. If the images are located, the icon will change from a camera to a folder.
By clicking the Try Job Once icon, the application will cycle through the entire job with the
loaded image.
There are two images on file. One will pass all three inspections and one will fail all three.
Demos
change demo this job needs to be loaded into Slot 1. Click back to the Edit view from the
top ribbon bar.
Click the slot icon and select Slot 1 or New Slot if no slots are currently in use.
Now the job and images will be saved to the flash memory of the camera.
Create a new project from the menu item Project->New. The default name is Project1 as
seen below. Fill out the required information, then click Create.
Demos
Double-click Add new device.
Open the SIMATIC ET200 CPU arrow, then open the ET200SP CPU arrow, then open the
CPU 1510SP-1 PN, then click on 6ES7 510-1DJ01-0AB0. You will see the screen below.
Click OK.
Demos
Click the lower green box on the PLC picture. The following will be displayed in the lower pane.
Click Add new subnet. The Subnet field will show PN/IE_1. Now go to the IP address
field, and type the IP address you wish to use for this device. Click Save Project often to
save your work.
To add these modules, first click the arrow next to DI, keep clicking on arrows until you find
the order number for device 1. Click and hold down the left mouse key. Drag it to slot 2 just
to the left.
Demos
Do the same thing for device 2, looking under the DQ arrow. Your display should now look
like this:
Now click on the PLC picture on slot 2. You will see the following screen:
Be sure the Enable new potential group (light Base Unit) is selected. Do the same for
Slot 3. Save the project.
Demos
Camera->“Product Name”. Left-click on the camera and hold it. Drag it to the left into the
Devices and networks panel. Your screen will look like this:
On the camera picture, click the Not assigned link, then click on PLC_1.PROFINET IO-System.
This has just connected the camera to the PROFINET network.
Double-click the picture of the camera. In the bottom pane you will see the following:
Enter the name of the device in the Name: field. Then click Ethernet addresses on the left,
and type in the IP address of the camera. This will allow the PLC to set the camera IP.
Demos
From TIA Portal, open the example program from the menu Project > Open. Click the
Browse button to locate the (MicroHAWK231.ap13) program. The AVDemo is located in
C:\Microscan\Vscape\Tutorials and Samples\“Product Name”\PROFINET Demo
\TIAPortal_Demos\Legacy_AVDemo. In the left pane in the Devices tab, open the
PLC_1[CPU 1510SP-1 PN] arrow. Open the Program blocks arrow. Select all the blocks
as shown below.
Right click and copy. Go to your new project and open the same arrows, right click on
Program blocks, then click paste. Select Main[OB1] right click, and hit delete. Be sure to
save your work.
Now back in the left pane of the AVDemo project, click on PLC data types, right-click,
copy, and paste them into the new project PLC data types.
In the left pane of the AVDemo project, click on Watch and force tables. Right click on
Watch table_1, then copy. Paste into new project Watch and force tables. Be sure to save
the project.
In the left pane on the AVDemo project open the PLC tags arrow. Double-click on Default
tag table. You should see the following:
Type Ctrl-A to select all, and right-click copy. Open the new project PLC tags in the same
way, and paste these in.
Demos
Depending on the order the PLC can load things, we may need to change the IO
addresses in our block to match the Device Overview in the Device view screen.
Double-click on the camera picture, and the Device overview will be displayed to the right.
The image below is intended as an example only and may not exactly resemble your
Device Overview.
From the Hardware catalog display to the far right, open the Module selection. You will
see the following:
You must manually drag and drop each one of these in the Device Overview pane. Click
on one of the entries and TIA will highlight the appropriate slot to drag it to. TIA will only
allow you to insert entries into their proper slot position.
Your device view should now look as follows. The example addresses shown will not be
the same for your device.
Demos
open a screen in the middle pane. Scroll this middle pane down until you see Network 4.
Original Mapping
Change the numbers here to match with the Device overview display, as shown in the
example below.
Updated Mapping
Be sure to save the project. Click the PLC_1 {CPU 1510SP-1 PN] top level, then click the
compile icon.
There should be NO compile errors. If there are no errors, click the download icon.
Demos
Select your PC network interface, and change the Connection to interface/subnet to PN/IE_1.
Click Start Search. PLC_1 should be displayed with the address you gave it. Click Load. If you
see a screen similar to below, do a memory reset (MRES) on the PLC, and try to load again. If
this continues to be an issue, click Continue without synchronization and continue.
Demos
Troubleshooting
If all LEDs are not green, go offline and click the Accessible devices icon.
Click Start search. The PLC and the camera should be displayed here.
If the name of the camera is not correct, you will not connect. The default name is the
name of the camera along with the last 3 of the MAC address. (Example: microhawk186c49
for the F430-F.) Go back to the general settings of the camera in the device view, and
change the name if required. Re-compile, and re-load. Try running again. This is the most
common reason for not connecting.
Demos
In the left pane click the Watch and force tables arrow. Double-click Watch table_1. The
watch table will open in the center pane. Click on the monitor variables icon.
There are two demo modes in this example. The modes are set in:
“USER”.Demo.DemoMode (DB101.DBW 2)
0 = AutoVISION Test
The AutoVISION Test will demonstrate communications between the PLC and the current
job loaded from AutoVISION.
When the program is triggering the camera, each cycle will produce either a pass or fail all
state. Each state is counted in "USER".Demo.CountPass:
Demos
These counters can be cleared by right-clicking the row “USER”.Demo.ClearCounters
and selecting Modify Address to 1.
The tolerances are below the counters. The inspection values and status bits are below
the tolerances.
In some instances a large job could take longer to load. Increment the delay time to adjust for
job size. The image below shows Function Block 3, Network 6, where the delay is located.
To run the Job Change Test you first need to use AutoVISION to download another job to
slot 2 on the camera. In AutoVISION, connect to the camera and select the Connect icon
at the top of the user interface. Click the Load a Job icon. Locate Legacy_AVDemo.avp
and click the Open button. Once the job has loaded into AutoVISION, click the Edit button
at the top of the user interface. Then click Save the Job to a Slot on the camera icon in
the menu at the top of the user interface. Select New Slot, which should be 2. When
switching between tests, disable the current routine by setting the
"USER".Demo.DemoTrigType to 0. Now there should be two jobs loaded in the camera’s
flash memory.
In the left pane of TIA Portal, click on the Watch and force tables arrow. Double-click on
Watch table_1. The watch table will open in the center pane. Click on the monitor
variables icon.
This demo will cycle through loading jobs from slots 1 and 2. Each cycle will be counted in
the variable table "USER".Demo.CountExecutions. The job load success is determined
by the camera’s status register "Legacy_AVDemo.Input.CmdCodeRslt" = 0x0. If the job
load is successful the counter "USER".Demo.CountPass will increment. If the job load
fails when "Legacy_AVDemo".Input.CmdCodeRslt ! = 0x0, then the counter
"USER".Demo.CountFail will increment. OB1 calls FB1 to process the AutoVISION test.
To view the ladder logic, double-click AUTOVISION_TEST[ FB1]. This will open the block
in the center pane.
Serial Commands
APPENDIX A Serial Commands
Serial Commands
Serial Command Syntax
< > = Required argument. Replace appropriately.
For example:
-u <DB_User_name> becomes -u av where av replaces DB_User_name.
| = Mutually exclusive arguments. Choose one from the list.
{ } = Used with | to specify a list of choices for an argument.
[ ] = Optional parameter.
Important: Unless otherwise stated, commands will respond with !OK on success and
!ERROR on failure.
Serial Commands
Command: OFFLINE
Response: !OK
Command: QUERYAUTOCAL
Response: 0;3478;226;50;300 (Exposure was 3478 μs.)
Command: AUTOCAL -exp=0 -expval=1000 (Fixed exposure at 1000 μs.)
Response: 31;1000;98;50;300 (Exposure stayed at 1000 μs and gain has changed from
0% to 31%.)
Important: AUTOCAL only functions when the camera is OFFLINE.
GET {tagname|service|service.tagname}
Gets value of a global tag.
The tagname must correspond to one of the supported tags within the device. Use the INFO
command to get a full list of tags and services, as well as attributes of the tag and list of subtags.
The command is terminated by a carriage return and/or line feed character.
Include an index to get a single value from an array such as GET int1. If the index is omitted,
the full array of values will be returned in a comma-separated list of values.
Send Get {tagname|service.tagname|service} to get the value of a tag within the global
data service. To get the value of a tag within another service, prefix the tagname with the
service name. For example, a GET <service.tagname> command such as GET
eip.input for the EIP input assembly.
The AVP service allows retrieval of step and datum information from the job tree using
forward slash ‘/’ in the symbolic name path. GET avp/insp1/snapshot1/status paths are
not case-sensitive and do not need to be fully qualified if unique.
GET avp/snapshot1/status will return the same result if there is only one inspection.
When issued against a step, GET avp/snapshot1 will return the values for all datums.
Success Return: On success will return the value stored in the tag.
For example: ABCD
Fail Return: On failure will return !ERROR followed by the reason for the failure.
For example: !ERROR Tag matchstring66 not found
Important: This command only functions when the camera is ONLINE.
Note: For monochrome cameras, the only formats available are TIF, PNG, and JPG. For
color cameras, the only formats available are RAW, PNG, and BMP.
Note: If BMP is selected, the system will return a PNG file.
Note: All image file types return complete file information that can be saved directly to disk
except the RAW file type, which requires explicit conversion.
-quality=n specifies a JPG compression quality of n less than or equal to 100. The default
quality is 80 if not specified. This setting is only supported for the JPG file type.
Note: PNG, RAW, TIF, and BMP formats provide lossless image compression. If format is
set to PNG, RAW, TIF, or BMP, the quality setting does not apply.
woi=left,top,right,bottom specifies a rectangular area of the image to be included in the
output image. If omitted, the full image buffer is returned.
-inspection=n specifies the inspection from which to retrieve an image. The image will be
from the first snapshot within that inspection. If not specified, the image will be from the
first inspection that contains a snapshot.
The following example will retrieve an image from the camera with these settings: Protocol:
ymodem; Format: png; Quality: N/A; Inspection: second inspection.
GETIMAGE –transfer=ymodem –format=png –inspection=2
The following example will retrieve an image from the camera with these settings: Protocol:
ymodem; Format: jpg (default); Quality: 50; Inspection: first inspection (default).
GETIMAGE –transfer=ymodem –quality=50
Important: This command only functions when the camera is ONLINE.
HELP
Returns a list of all serial commands showing correct syntax and functionality descriptions.
INFO [tagname|service]
Gets information about a tag or service.
INFO with no arguments gets a list of services.
INFO <service> gets a list of tags in that service.
INFO <service.tagname> gets attributes of the tag as well as a list of subtags.
The AVP service allows retrieval of step and datum information from the job tree using
forward slash ‘/’ in the symbolic name path. INFO avp/insp1/snapshot1/status paths
are not case-sensitive and do not need to be fully qualified if unique.
INFO avp/snapshot1/status will return the same result if there is only one inspection.
When issued against a step, INFO avp/snapshot1 returns properties of the step, a list of
child datums, and a list of child steps. Child steps are indicated by a trailing forward slash.
JOBBOOT [-slot=]<n>
Sets bootup job slot n (RS-232 only).
Serial Commands
JOBDELETE {[-slot=]n|-all}
Deletes job in slot n, or all jobs if -all.
Important: Does not delete the current job loaded in camera memory.
JOBSAVE [-slot=]<n>
Saves current job to slot n.
MEMAVAIL [-cp]
Returns available memory for device or coprocessor.
MEMCONTIG [-cp]
Returns maximum memory block for device or coprocessor.
MEMFRAGS [-cp]
Returns memory fragments for device or coprocessor.
Important: MEMFRAGS is not supported by the HAWK MV-4000. It will return !ERROR.
OFFLINE
Stops all inspections.
ONLINE
Starts all inspections.
ONLINE? [-insp=n]
Queries if each inspection on the camera is online. Defaults to all inspections if no inspection
is specified. If the camera is running in a multi-inspection job, this command will return !1 if
all inspections are online and !0 otherwise.
-insp=n specifies the inspection to query if it is online.
QUERYAUTOCAL
Returns photometry settings: Gain, Exposure, and Focus.
QUERYFOCUSUNITS
Queries the units being used for autofocus, mm (0) or inches (1).
QUERYWHITEBAL
Returns white balance settings: RED gain, BLUE gain, and GREEN gain.
Serial Commands
READY? [-insp=n]
Queries if inspection is waiting for a trigger. !1 if all inspections are ready or !0 if not all
inspections are ready.
-insp=n specifies the inspection to query if it is ready.
REBOOT [-noload]
Reboots the device.
-noload = do not load BOOT job.
RESTOREWBAL
Restores preset white balance parameters: RED gain, BLUE gain, and GREEN gain.
SETFOCUSUNITS
Sets units used for autofocus, mm (0) or inches (1).
Important: The F430-F only supports mm so SETFOCUSUNITS will only accept 0
and anything else will respond with !ERROR.
TARGET {0|1|off|on}
Turns targeting LEDs On or Off.
target 1 = Turn Target On
target 0 = Turn Target Off
TRIGGER
Triggers an inspection.
VERSION
Returns Visionscape software version.
vt [n]
Triggers an inspection by pulsing a Virtual I/O point.
For example: vt 1
will return pulse VIO1. The inspection will run if it is configured to use VIO 1 as a trigger.
If specified, the VIO index must be in the allowed range for Virtual I/O points within Visionscape.
The virtual I/O line will be set high then low.
If VIO Index is not specified, VIO1 is assumed.
Fail Return: Return !ERROR followed by the reason for the failure.
For example: !ERROR No such trigger when the index specified ‘n’ is out of range of
virtual triggers.
WHITEBAL
Performs automatic calibration of white balance settings: RED gain, BLUE gain, and
GREEN gain.
Important: This command only functions when the camera is OFFLINE.
WinPcap License
APPENDIX B WinPcap License
WinPcap License
following acknowledgement: "This product includes software developed by the
University of California, Berkeley and its contributors."
4. Neither the name of the University nor the names of its contributors may be used to
endorse or promote products derived from this software without specific prior written
permission.
THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS “AS-IS”
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS
BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Portions Copyright (c) 1983 Regents of the University of California. All rights reserved.
Redistribution and use in source and binary forms are permitted provided that the above
copyright notice and this paragraph are duplicated in all such forms and that any
documentation, advertising materials, and other materials related to such distribution and
use acknowledge that the software was developed by the University of California, Berkeley.
The name of the University may not be used to endorse or promote products derived from
this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED “AS-IS” AND WITHOUT ANY EXPRESS OR IMPLIED
WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
Portions Copyright (c) 1995, 1996, 1997 Kungliga Tekniska Högskolan (Royal Institute of
Technology, Stockholm, Sweden). All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are
permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of
conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of
conditions and the following disclaimer in the documentation and/or other materials
provided with the distribution.
3. All advertising materials mentioning features or use of this software must display the
following acknowledgement: “This product includes software developed by the
Kungliga Tekniska Högskolan and its contributors.”
4. Neither the name of the University nor the names of its contributors may be used to
endorse or promote products derived from this software without specific prior written
permission.
WinPcap License
THE SOFTWARE IS PROVIDED “AS-IS” AND DIGITAL EQUIPMENT CORP. DISCLAIMS
ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL
EQUIPMENT CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR
CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
Portions Copyright (C) 1995, 1996, 1997, 1998, and 1999 WIDE Project. All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are
permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of
conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of
conditions and the following disclaimer in the documentation and/or other materials
provided with the distribution.
3. Neither the name of the project nor the names of its contributors may be used to
endorse or promote products derived from this software without specific prior written
permission.
THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS “AS-IS”
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS
BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Portions Copyright (c) 1996 Juniper Networks, Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are
permitted provided that: (1) source code distributions retain the above copyright notice
and this paragraph in its entirety, (2) distributions including binary code include the above
copyright notice and this paragraph in its entirety in the documentation or other materials
provided with the distribution. The name of Juniper Networks may not be used to endorse
or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED “AS-IS” AND WITHOUT ANY EXPRESS OR IMPLIED
WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.