BOA Spot Communication Guide v1.1
BOA Spot Communication Guide v1.1
Communication
Guide
All copyrights in this manual, and the hardware and software described in it, are the
exclusive property of Teledyne DALSA Incorporated and its licensors.
Claim of copyright does not imply waiver of Teledyne DALSA Incorporated or its licensors
other rights in the work. See the following Notice of Proprietary Rights.
This manual and the related hardware and software are confidential trade secrets and the
property of Teledyne DALSA Incorporated and its licensors. Use, examination,
reproduction, copying, transfer and/or disclosure to others of all or any part of this manual
and the related documentation are prohibited except with the express written consent of
Teledyne DALSA Incorporated.
The information in this document is subject to change without notice. Teledyne DALSA
Incorporated makes no representations or warranties with respect to the contents of this
manual and specifically disclaims any implied warranties of merchantability or fitness for a
particular purpose. Teledyne DALSA Incorporated assumes no responsibility for errors or
omissions in this document.
In This Manual
Blue text such as Tip or Note indicates useful information.
Blue text in a code example is a comment to the code, such as // send results data.
Red text such as Note indicates important or critical information.
Overview
This manual describes configuring the BOA Spot for communication with serial and TCP
ports, and with several different types of PLCs. In some cases, instructions are also
given for adding the BOA Spot into the PLC program environment.
This manual does not cover programming the PLC. Advanced knowledge of the
language specific to your PLC is required to program the factory floor environment.
Please refer to the PLC Manufacturer or Distributor for training or tutorials.
Note: Most PLCs have a separate read space and write space. They do not use the
same registers for both inputs and outputs. This means you cannot write a value to a
register, and read it back again. The PLC must be programmed to copy the value to a
register you can read, or write expected values into registers you can read.
Tip: Start small, by writing a single string or number to your destination or PLC. You can
add more instructions and controls after you have successfully established
communication between devices.
Tip: In most cases, it is useful to start with the BOA Spot using the Internal Timer.
• Internal Timer is useful for focusing the camera on a still object.
• External Trigger is used with moving parts and a part-in-place sensor.
• Software Trigger is used with a trigger signal from a PLC, or a command from
another device.
Some examples show a “heartbeat” variable. This is to let the PLC program know the
camera is “alive” and functioning. Some PLC programs require a heartbeat from all
connected devices, and some do not. Some programmers prefer to always include the
heartbeat, while others question its usefulness.
Some examples have a “inspBusy” variable, to signal the PLC the inspection program
is executing. This variable is not fully implemented in the example. You could optionally
send the busy status to the PLC if it is useful to your programming.
IMPORTANT: Editing Scripts and measurement Tools changes the "run mode", and
disables solution switching. In some cases, editing scripts can interrupt normal
communication with PLCs and peripherals. Save your Solution and then reload it
(same solution) if you encounter problems. Loading a solution resets the run mode;
unless you select the "Load for Edit/Disable switching" option.
EIP stands for Ethernet IP, also referred to as TCP or TCP/IP. These are general (not
precise) terms used for communication over an Ethernet network.
Protocol refers to a language or a communication standard. It can refer to software or
hardware methods of communication.
PLC stands for Programmable Logic Controller. Usually PLCs control a distributed
system of sensors, relays, switches and controls on an industrial production line.
AB or Allen Bradley systems may use either the Ethernet IP or Control Logix
protocols on Ethernet. The Allen Bradley brand is owned by Rockwell.
FANUC Corp. makes systems which use SNP on Serial, and SRTP/FINS on Ethernet.
Siemens makes the Simatec systems, which use the Profinet UDP protocol on
Ethernet.
Mistubishi systems use the MELSEC protocol, available on both Serial and Ethernet.
Several manufacturers produce systems which use the Modbus protocol on Serial or
EIP. Modbus is an open source, royalty free protocol used by several companies. The
rights to development and maintenance were transferred to The Modbus Organization.
OMRON systems use multiple protocols: the Ethernet IP protocol, the OMRON C
protocol on Serial, or OMRON C UDP on Ethernet.
Rockwell produces Compact Logic and RSLogix systems, which may use either the
Ethernet IP or Control Logix protocols on Ethernet.
Yaskawa Electric Corp. and Yaskawa Motoman produces Robotic and automated
systems which use the Motoman protocol, available on Serial.
Note: The Windows Firewall should be turned off (or customized) on systems that
communicate over the network (TCP or EIP). This does not apply to devices using
Serial communication.
The Serial port or “RS232 Stream” is used for general communication such as
messaging or data.
Configure the BOA Spot
1. Load or create a simple Solution with one
or two measurements.
2. In the Navigation bar, click on Setup
Connections.
3. In the drop-list, select RS232 Stream
Settings. The center of the Setup panel
changes, to configure BOA Spot for Serial
communication. The standard serial port
parameters are available for Baud Rate
(bits per second), Data bits, Stop Bits,
Parity and Flow Control.
4. Configure BOA Spot to match the settings
used by your devices. Settings must match
for correct operation.
5. Click the “Apply” button.
Note: Not all serial devices support all the available settings. BOA Spot does not
support Baud Rates 110, 300, 1200 and 14400. Flow Control “software and “none” are
supported, “hardware” is not supported.
To test your setup:
Requires a PC running HyperTerminal, Telnet or TeraTerm.
1.Create or load a simple Solution, and configure the BOA Spot Serial port.
2.Click on the “Edit Scripts” button in the Navigation bar.
3.Click on the “Post Processing Function” and open the Edit window. Enter only one of
the following two statements:
COM3 = “Hello”
or
PutPortString(“\r\nHello”) \\ carriage return and new line
4. Click OK, and Run the Solution.
5. Open HyperTerminal, Telnet or TeraTerm on a PC, and configure the Serial Port
settings to match the BOA Spot settings.
6. When you connect to the BOA Spot, you should see the message “Hello” repeating
on your monitor.
You can create more complex strings using the Free Edit window and the String
Formatting window. You can use the following functions in script statements, to read
and write to the Serial port:
PutPortString GetPortChar GetPortString WriteFormatString
Note: The function PutPortString sends the exact string, without evaluating variables.
The function WriteFormatString does evaluate variables.
Please refer to “Keyboard / Serial IO Functions” in the BOA Spot Scripting User Manual
or the BOA Spot on-line Help for full syntax, explanations, and some examples.
You can create more complex strings using the Free Edit window and the String
Formatting window. You can use the following functions in script statements, to read
and write to the Serial port:
PutPortString GetPortChar GetPortString WriteFormatString
Note: The function PutPortString sends the exact string, without evaluating variables.
The function WriteFormatString does evaluate variables.
Please refer to “Keyboard / Serial IO Functions” in the BOA Spot Scripting User Manual
or the BOA Spot on-line Help for full syntax, explanations, and some examples.
You can create more complex strings using the Free Edit window and the String
Formatting window. Use the following functions to read or write to the TCP/IP network:
ReadByte, ReadString, WriteBytes, WriteString, WriteFormatString
Other useful TCP/IP functions available:
Disconnect, IsConnected, SendEmail, SetEmailInfo
Refer to “Comm / TCP/IP Functions” in the BOA Spot Scripting User Manual or in the
BOA Spot on-line Help for full syntax, explanations, and some examples.
TCP/IP Example
In this example, Port 5024 is used for communication. The BOA Spot-EL uses a Match
Tool to find a part, and sends the image pixel X,Y coordinates [EL only] and Angle to a
PC or a robot. Note: The Robot arm setup should have routines for calibrating the arm
positions to the image window corners.
In the Post Process function:
//
WriteFormatString( TcpP5024 , "\n\rX=[PX%3.2f], Y=[PY%3.2f], Theta=[MR%3.1f],
Result = [Result.0%d]\n\r" ) // X, Y, Angle & Result Note: EL only
The BOA Spot receives commands to trigger and change Solutions. The first character
in the string is Trigger. The second character is a Solution number. The current Solution
is 0. The string “T2” changes to Solution 2, and triggers the camera. The Solution test
statement is different in each Solution. This test is: “not solution 0” (the current solution)
and “a number less than 9” (valid solution numbers 0 through 8).
In the Periodic: 200 ms function:
Note: The solution change test should be modified for each different Solution file. You
want to change the Solution when ProgramNumber is not equal to the current solution
ID number. In the script example shown above, the current solution is 0, and the
change request is only valid when ProgramNumber is larger than zero. For example, in
Solution02, you can use: if(ProgramNumber != 2) the “!=“ means “not equal to”.
You can restrict the test to valid Solution numbers, but that is not recommended
because each time you add a new solution, every solution file would have to be edited.
Note: The Windows Firewall should be turned off (or customized) on systems that
communicate over the network.
Troubleshooting TCP/IP Problems
Problem: No communication. Messages from BOA Spot do not appear in
HyperTerminal or Telnet.
Reason: TCP/IP problems are most often caused by incompatible settings between
BOA and the connecting equipment.
Solution 1: Check the settings on your BOA Spot and on your other TCP/IP devices.
The Client device needs the IP Address and Port number of the Server device.
Check that the devices are on the same network, and are accessible (no address
conflicts, and no security conflicts). On the PC, open a Command Prompt window and
type “ping” and the IP Address of the BOA Spot, for example: ping 192.168.0.100
The Command Prompt window should show a number of bytes sent and received from
BOA Spot. If data is not received, verify the BOA Spot is booted and the Ethernet cable
is attached at both ends.
Solution 2: Save and reload your solution file. See “Important” on page 4.
Problem: Cannot find HyperTerminal, Telnet or TeraTerm on my Windows 7 PC.
Reason: Telnet is not enabled by default. HyperTerminal is not included on W7.
TeraTerm is a third party program not included in Windows.
Solution 1: To enable Telnet on W7:
1. Click the Start button and select “Control Panel”.
2. Select “Programs and Features”.
3. Select “Turn Windows features on or off”.
4. Scroll down to find “Telnet” and check the box beside it.
5. Click “OK”. Use the “Run” field or “Command Prompt” window to start Telnet.
Solution 2: Download HyperTerminal or TeraTerm.
Note: BOA Spot software works with Rockwell Control Logix products using versions
R18 through R27.
4. In the New Module menu click the “General” tab if there are tabs. Give the camera a
name like “BOA_SPOT” or “TeledyneDALSA”. Leave the “Comm Format” setting at
Data-DINT. Enter the Input, Output
and Configuration data for the
“Assembly Instance” and “Size” as
shown:
Input: 2, 32
Output: 1, 31
Configuration: 1, 0
If you need more than 30 registers for
your application, use the following
settings:
Input: 2, 125
Output: 1, 124
Configuration: 1, 0
9. Click “OK”.
10. Create Controller Tags as needed for your application. These can be standard
format or User Defined Tags. It is helpful to name the tags such that they are easy to
recognize when they are imported to the BOA Spot.
In the example below, all tags start with “Cam2”.
11. Download the program to the PLC, and run it. It should automatically compile before
downloading.
Note: The Windows Firewall should be turned off (or customized) on systems that
communicate over the network.
In a factory floor program there would me many more variables listed for all equipment
the PLC communicates with.
Tip: Start with writing one number to the PLC. You can add more instructions and
controls after you have successfully established communication with the PLC.
In most applications, you want the BOA Spot to change solutions and trigger on signals
from the PLC.
3. Add statements that will change the solution file, trigger the BOA Spot, clear and then
rearm the trigger. (example shown on the next page)
Note: The “heartbeat” is not used by the BOA Spot, but we have seen many customers
prefer to include it in their PLC programs. Some PLCs may require it.
The “inspBusy” variable is not fully implemented in this example. You could send it to
the PLC to tell it the Solution is running.
Note: The solution change test should be modified for each different Solution file. You
want to change the Solution when “solReq” is not equal to the current solution ID
number. In the script example shown above, the current solution is 0, and the change
request is only valid when solReq is larger than zero. For example, in Solution02, you
can use: if(solReq != 2) The “!=“ means “not equal to”.
You can test to restrict solReq to valid Solution numbers, but that is not recommended
because each time you add a new solution, every solution file would have to be edited.
With the Solution running on the BOA Spot, you can monitor communication between
the PLC and BOA Spot in the RSLogix5000 program window.
Tip: Each tag read takes time. If a Control Logix Tag data is needed repeatedly in a
script, it is advisable to read the tag once rather than several times in a script.
The script on the left contains 5 tag reads vs. 1 tag read in the script on the right. (Less
communications traffic!)
// WRONG METHOD // CORRECT METHOD
// Fail inspection based on enabled tests // Fail inspection based on enabled tests
// in PLC configuration. // in PLC configuration.
// //
if(Clx115.Cam1_Test1Enabled = 1) test1Enab = Clx115.Cam1_Test1Enabled
if(Test1.Result != 1) FAIL = 1 if(test1Enab = 1)
endif if(Test1.Result != 1) FAIL = 1
if(Clx115.Cam1_Test1Enabled = 1) endif
if(Test2.Result != 1) FAIL = 1 if(test1Enab = 1)
endif if(Test2.Result != 1) FAIL = 1
if(Clx115.Cam1_Test1Enabled = 1) endif
if(Test3.Result != 1) FAIL = 1 if(test1Enab = 1)
endif if(Test3.Result != 1) FAIL = 1
if(Clx115.Cam1_Test1Enabled = 1) endif
if(Test4.Result != 1) FAIL = 1 if(test1Enab = 1)
endif if(Test4.Result != 1) FAIL = 1
if(Clx115.Cam1_Test1Enabled = 1) endif
if(Test5.Result != 1) FAIL = 1 if(test1Enab = 1)
endif if(Test5.Result != 1) FAIL = 1
endif
The point of this example is to illustrate the method of reading the tag once rather than
several times in a script. (The script could certainly be optimized further!).
We have observed that the Control Logix PLC takes 15 ms for each tag read during
operation. Functions that read more than one tag must allow sufficient time for each
tag to be read. For example, if a periodic function reads 5 tags, you must allow a
minimum of 75 ms to read all 5 tags.
BOA Spot is compatible with PLCs that use Ethernet-IP communication. For example,
Rockwell and Allen Bradley PLCs use Ethernet-IP for Implicit communication (no Tags).
Configure the BOA Spot
1. Load or create a simple Solution with one
or two measurements.
2. In the Navigation bar, click on Setup
Connections.
3. Use the drop list to select “Ethernet-IP
PLC”. The center of the Setup panel
changes to configure BOA Spot for
Ethernet-IP communication.
4. Select a Register type (selected “dint” for
this example), and enter the base address
of the registers assigned to the BOA Spot,
in the PLC address space.
There are several different register types.
Each performs a specific task, and has a
specific data type it will accept.
5. You can change the variable name, or use
the default.
6. Click the “Add Ethernet-IP destination”
button. Your definition appears in the “PLC
Destination” list box.
Notice the Read/Write example just below the “Add” button. The examples are given
for the default variable name “EIPdint”. These are the type of statements you would use
in the Script Editor to read values from or write values to the PLC. The default name
also indicates the register type. “dint” is for a signed 32-bit integer (double length
integer).
EIPdint[20] = L1 + 5
Write the sum of L1 plus 5 to the PLC Input register at offset 20.
X1=EIPdint[32] + 64.0
Read the value in the PLC Output register at offset 32, add 64.0 to the value, and store
it in variable X1.
Note: The Input Registers and Output Registers are at separate spaces in this method.
Tip: Start with writing one number to the PLC. You can add more instructions and
controls after you have successfully established communication with the PLC.
In most applications, you want the BOA Spot to switch Solution and trigger on a signal
from the PLC.
7. In the Edit Scripts setup panel click on “Periodic: 200 ms”.
8. In the bottom panel below the image area, click the “Edit”
button.
9. Add statements that tell the PLC which solution is running, and read a solution
change request from the PLC output registers. (example on the next page)
10. Add statements that trigger the BOA Spot, clear and then rearm the trigger.
(example on the next page)
Note: The “heartbeat” is not used by the BOA Spot, but we have seen many customers
prefer to include it in their PLC programs. Some PLCs may require it.
The “inspBusy” variable is not fully implemented in this example. You could send it to
the PLC to tell it the Solution is running.
Note: If you need to read and write more than 30 register values, you could use the
following settings: Input: 2, 125 Output: 2, 124, Configuration 1, 0
Note: Windows Firewall should be turned off (or customized).
The program will compile before downloading to the PLC. You can also manually
compile before downloading.
If the BOA Spot is running, you should now be able to see values being updated, by
monitoring the PLC Input registers.
Note: The BOA Spot write to EIP[0] maps to the PLC location I:DATA[1] (I for Input).
This does not happen on a read. EIP[0] maps to PLC location O:DATA[0]. This is
important to your PLC programming.
I:Data[1] = EIP[0] = IntenAvg, I:Data[2] = L, I:Data[3] = Result.0, I:DATA[4] =
SOLUTION, I:Data[5] = Global.FrameCount, I:Data[6] = hb, I:Data [7] through [32] are
not used in this example.
Note: This screen
shows only the
Input registers. The
Output registers
are at a different
location. The
Solution Change
and Trigger request
do not appear in
the Input registers.
BOA Spot is compatible with Omron PLC using a few different modes, depending on
the Omron model and software capabilities: Omron C Serial, Omron C using UDC/IP
FINS, and Ethernet-IP. For the Ethernet-IP setup (not an “Omron C”) see page 27.
Configure the BOA Spot
1. In the Navigation bar, click on Setup
Connections.
2. Use the drop list to select “Omron PLC”.
The center of the Setup panel changes to
configure the BOA Spot for Omron
communication.
3. You can select a UDP/IP connection and
enter the PLC’s IP Address. Or select a Serial
connection and change the Serial port
settings to match your PLC Host Link
Interface. This example uses Serial.
4. Enter the Station or Node number and Target
number (use 0 if you are not sure).
5. Select a Register type, Register address
(index) Device (if applicable) and Variable
Name.
There are several different register types. Each
performs a specific task, and has a specific data
type it will accept.
6. Click “Add Omron PLC destination”. Your
definition appears in the “PLC Destination”
list box. Repeat for different register types.
Notice the Read/Write example just below the
“Add” button. The examples are given for the
default variable name “OMRS0u16”.
Reading and writing to an index of this variable causes a read or write to the same
index location in the Omron C’s “D” memory area.
OMRS0u16[20] = L1 + 5
Write the sum of L1 plus 5 to the OMRON C D memory at offset 20.
X1= OMRS0u16[32] + 64.0
Read the value in the OMRON C D memory at offset 32, add 64.0 to the value, and
store it in variable X1.
Tip: Start with writing one number to the PLC. You can add more instructions and
controls after you have successfully established communication with the PLC.
In most applications, you want the BOA Spot to switch Solution and trigger on a signal
from the PLC (if this capability is available).
7. In the Edit Scripts setup panel click on “Periodic: 200 ms”.
8. In the bottom panel below the image area, click the “Edit”
button.
9. Add statements that tell the PLC which solution is running, and read a solution
change request from the PLC output registers. (example on the next page)
10. Add statements that trigger the BOA Spot, clear and then rearm the trigger.
(example on the next page)
Note: The Input Registers and Output Registers are at the same space in this method.
Some OMRON PLCs use Ethernet-IP communication. This example uses the NJ301.
Tip: Start with writing one number to the PLC. You can add more instructions and
controls after you have successfully established communication with the PLC.
In most applications, you want the BOA Spot to switch Solution and trigger on a signal
from the PLC.
7. In the Edit Scripts setup panel click on “Periodic: 200 ms”.
8. In the bottom panel below the image area, click the “Edit”
button.
9. Add statements that tell the PLC which solution is running, and read a solution
change request from the PLC output registers. (example on the next page)
10. Add statements that trigger the BOA Spot, clear and then rearm the trigger
(example on the next page).
1. Open the OMRON Network Configurator. This example uses the Sysmac Studio.
2. Connect the PLC, and verify it is Online. This example used the NJ301.
3. If you already have a Network Configuration (nvf) upload it (Ctrl+U).
4. Add the “DalsaVisionV3_0814_01.eds” file to you system.
5. Insert the “BOA” into the network. You can drag and drop from “Teledyne DALSA”.
6. Drag the BOA icon onto the NJ Icon in the Network Configurator. The following
screen should appear. The BOA Spot has the address 192.168.250.10.
7. Beside “Input Tag Set” click the “Edit Tag Sets” button.
8. Create the tag name “From_BOA” and make sure the input byte size is 36 bytes.
This matches the value in the EDS file.
9. Beside “Output Tag Set” click the “Edit Tag Sets” button.
10. Create the tab name “To_BOA” and make sure the output byte size is 32 bytes, to
match the value in the EDS file.
11. Insert the “BOA” into the network. You can drag and drop from “Teledyne DALSA”.
12. Change the “Packet Interval (RPI)” to 150.
13. Register and close.
15. Create Global Variable in Sysmac Studio, that match the Tag names you just
created in the Network Configurator, in this example “To_BOA” and “From_BOA”.
Note: The BOA Spot write to EIPint[0] or to EIP_Write[0] maps to the PLC location
“From_BOA[2]”. This is important to your PLC programming.
Note: The Windows Firewall should be turned off (or customized).
BOA Spot is compatible with PLCs using Melsec communication over Serial or EIP. This
example uses the Mitsubishi Series Q PLC - model QJ1E71 with EIP.
Configure the BOA Spot
1. In the Navigation bar, click on Setup
Connections.
2. Use the drop list to select “Melsec PLC”.
The center of the Setup panel changes to
configure BOA Spot for Melsec communication.
3. Select a TCP/IP connection, enter the PLC’s
IP Address, (192.168.0.154) and select 1E or
3E.
4. Enter the Station, Network, PC and Block
numbers for your PLC.
5. Select a Register type, and Register address
(index).
There are several different register types. Each
performs a specific task, and has a specific data
type it will accept.
6. Enter the Request information if you are
using 4C/3E communication.
7. You can enter a variable name, or use the
defaults. The default variable names reflect
the register type and data type.
8. Click “Add Melsec PLC destination”. Your
definition appears in the “PLC Destination”
list box.
Repeat steps 5, 7, and 8 to add other register types.
Notice the Read/Write example just below the “Add” button. The examples are given
for the default variable name “ML154S01CAF1u16”. “u16 “for unsigned 16-bit data.
ML154S01CAF1u16[20] = L1 + 5
Write the sum of L1 plus 5 to the PLC D memory at offset 20.
X1= ML154S01CAF1u16[32] + 64.0
Read the value in the D memory at offset 32, add 64.0, and store it in variable X1.
Note: The Input Registers and Output Registers are at the same space in this method.
Tip: Start with writing one number to the PLC. You can add more instructions and
controls after you have successfully established communication with the PLC.
In most applications, you want the BOA Spot to switch Solution and trigger on a signal
from the PLC.
7. In the Edit Scripts setup panel click on “Periodic: 200 ms”.
8. In the bottom panel below the image area, click the “Edit”
button.
9. Add statements that tell the PLC which solution is running, and read a solution
change request from the PLC output registers. (example on the next page)
10. Add statements that trigger the BOA Spot, clear and then rearm the trigger.
(example on the next page)
Note: The “inspBusy” variable is not fully implemented in this example. You could send
it to the PLC to tell it the Solution is running.
Note: The Windows Firewall should be turned off (or customized) on systems that
communicate over the network.
10. Click “End” to accept changes, and close the Module Configuration.
11. In the Menu bar, select Online => Write to PLC to write your Configuration to the
PLC.
12. Check Write and check Parameters
13. Click on “Execute”.
14. Cycle power to the PLC to reset it.
Use the Batch Monitor (In GX Works 2) to view the D Memory area, which BOA Spot
reads or writes to:
15. In the Menu bar, select Online->Monitor->Device Buffer Memory Batch
16. In “Device Name” enter D0 to monitor the first D memory locations.
The script in BOA Spot writes a measured value to offset 0. This corresponds to D0.
The pass count, total frame counts and solution number are written to offsets 1, 2,
and 3. These correspond to locations D1, D2, and D3. The script reads from offsets
4 and 5, which correspond to D4 and D5.
Our register definition (in BOA Spot) was limited to unsigned 16-bit values. You can add
other register types. Make sure the display format settings in the Batch Monitor
match the register types you send.
BOA Spot is compatible with PLCs that use Profinet UDP/IP communication. You must
configure the BOA Spot first, and run the Solution, to open a Profinet communication.
NOTE: The BOA Spot device name must be changed to “boavision”. This name is hard-
coded in the GSD XML file.
NOTE: Start by configuring the BOA Spot, and run the Solution at least once. to request
and initialize Profinet communication. If the BOA Spot Solution has not run, the BOA
Spot will not appear in your Profinet programming environment.
Configure the BOA Spot
1. In the Navigation bar, click on Setup
Connections.
2. Use the drop list to select “Profinet RT IO”.
The center of the Setup panel changes to
configure BOA Spot for Profinet
communication.
3. Select the Register type, and enter the base
address of the registers assigned to the BOA
Spot, in the PLC address space.
There are several different register types. Each
performs a specific task, and has a specific
data type it will accept.
4. You can change the Variable name, or use
the default.
5. Click the “Add Profinet PLC destination”
button. Your definition appears in the “PLC
Destination” list box.
6. Repeat steps 3, 4, 5 for each different register type.
Notice the Read/Write example just below the “Add” button. The examples are given
for the default variable name “PROFIdint”. These are the type of statements you would
use in the Script Editor to read values from or write values to the PLC. The default
name also indicates the register type. “dint” is for a signed 32-bit integer (double int).
PROFIint[20] = L1 + 5
Write the sum of L1 plus 5 to the PLC’s Holding register at index location 20.
X1=PROFIint[32] + 64.0
Read the value in Holding register index location 32, add 64.0 to the value, and store it
in variable X1.
Note: When BOA Spot writes to the attached variable PROFIdint, it is updating the
input module on the Profinet controller (I address range 256..509 ). PROFIdint is a 32
bit signed value; so BOA side references are indexing a dint sized array.
PROFIdint[0] = x, writes the value which appears at location %ID256 on the controller,
PROFIdint[1] = x, writes the value which appears at location %ID260 on the controller,
which is the next double size index.
In most applications, you want the BOA Spot to switch Solution and trigger on a signal
from the PLC.
7. In the Edit Scripts setup panel click on “Periodic: 200 ms”.
8. In the bottom panel below the image area, click the “Edit”
button.
9. Add statements that tell the PLC which solution is running, and read a solution
change request from the PLC output registers. (example on the next page)
10. Add statements that trigger the BOA Spot, clear and then rearm the trigger.
(example on the next page)
NOTE: When BOA Spot read the attached variable PROFIdint, it is reading the output
module on the Profinet controller (Q address range 256..509 ).
profiCmd= PROFIdint[0], is reading from location %QD256 on the controller,
profiCmd= PROFIdint[1], is reading from location %QD260 on the controller,
…….
profiCmd= PROFIdint[62], is reading from location %QD504 on the controller,
1. Open the Profinet program development software. This example is using Siemens
"Totally Integrated Automation Panel" TIAP-V11.
2. In the Options menu, select “Install general station description file”.
3. Navigate to the BOA Spot file.
Note: The Windows Firewall should be turned off (or customized) on systems that
communicate over the network.
9. Add controller logic to perform IO with the BOA Spot. Configure the tag names and
data types to match what your PLC and BOA Spot programs will read and write. The
image below has not been configured for the BOA Spot variables in our script
example.
12. Compile and download your program to the PLC. The PLC will be halted to
accept the new program.
13. You can open the “Watch Table” to monitor your tags being written to by the BOA
Spot. The image below has not been configured for the BOA Spot variables
shown in the Scripting example.
If you need to add more than one BOA Spot, the device names should be changed to
“boavision_1”, boavision_2”, and boavision_3”. The GSD file defines 256 bytes for
each BOA Spot. This means that a maximum of four BOA Spot cameras can be
used. Three are shown in the image below.
Note: The Windows Firewall should be turned off (or customized) on systems that
communicate over the network.
BOA Spot is compatible with PLCs and many other devices that use the Modbus
protocol, over Ethernet or Serial port connections.
Configure the BOA Spot
1. In the Navigation bar, click on Setup
Connections.
2. Use the drop list to select “Modbus PLC”.
The center of the Setup panel changes to
configure BOA Spot for Modbus
communication.
3. Select the TCP/IP connection. Select the
BOA Spot to be a Modbus Slave.
4. When you configure the PLC, you will need
the BOA Spot IP Address (not shown) and
the Modbus Port number shown in this
panel (502).
5. We will use the default setting for this
example: Holding Registers, signed 16,
Address 0, Device 1.
There are several different register types. Each
has a specific data types it will accept.
7. Click “Add Modbus Destination”. Your
definition appears in the “PLC Destination”
list box.
Notice the Read/Write example just below the “Add” button. The examples are given
for the default variable name “MBSlaves16”. These are the type of statements you
would use in the Script Editor to read values from or write values to the PLC. “HR” is for
the Holding register. “s16” is for the “signed 16” 16-bit value.
MBSlaveHRs16[20] = L1 + 5
Write the sum of L1 plus 5 to the PLC’s Holding register at BOA Spot index 20.
X1=MBSlaveHRs16[32] + 64.0
Read the value in Holding register BOA Spot index 32, add 64.0 to the value, and store
it in variable X1.
BOA Spot Communication 47 Version 1.1; 2016-07-14
Modbus
Note: The BOA Spot attached variable MBSlaveHRs16[0] maps to the Holding
Registers which start at location 400001 in the Modbus memory. This is important to
your Modbus device programming. You can read and write to the same location.
Tip: Start with writing one number to the PLC. You can add more instructions and
controls after you have successfully established communication with the PLC.
In most applications, you want the BOA Spot to switch Solution and trigger on a signal
from the PLC.
7. In the Edit Scripts setup panel click on “Periodic: 200 ms”.
8. In the bottom panel below the image area, click the “Edit”
button.
9. Add statements that tell the PLC which solution is running, and read a solution
change request from the PLC output registers. (example on the next page)
10. Add statements that trigger the BOA Spot, clear and then rearm the trigger.
(example on the next page)
Note: The “inspBusy” variable is not fully implemented in this example. You could send
it to the PLC to tell it the Solution is running.
Note: The BOA Spot attached variable MBSlaveHRs16[0] maps to the Holding
Registers which start at location 400001 in the Modbus memory. This is important to
your Modbus device programming.
MBSlaveHRs16[0] maps to 400001, MBSlaveHRs16[1] maps to 400002,
MBSlaveHRs16[2] maps to 400003, MBSlaveHRs16[3] maps to 400004, etc..
In the Modbus register table specification:
Coil Status starts at location 000001, (you may see 0:00000 in the spec.,
Input Status starts at location 100001, 00001 is the first usable location)
Input Registers start at location 300001,
Holding Registers start at location 400001.
Note: You can read and write to the same locations in the table.
BOA Spot is compatible with PLCs that use the GE Fanuc SNP protocol, over a serial
port connection.
Configure the BOA Spot
1. In the Navigation bar, click on Setup
Connections.
2. Use the drop list to select “GE Fanuc SNP
PLC”.
The center of the Setup panel changes to
configure BOA Spot for SNP communication.
3. Select a Register type, and change the Serial
Port settings, or verify that they match the
PLC exactly.
There are several different register types. Each
performs a specific task, and has a specific data
type it will accept.
4. You can change the variable name, or use
the defaults. This default name also signifies
the type of register: The “AI” is for the Analog
input register.
5. Click “Add SNP destination”. Your definition
appears in the “PLC Destination” list box.
Notice the Read/Write example just below the
“Add” button. The examples are given for the
default variable name “SNPAI”. These are the
type of statements you would use in the Script
Editor to read values from or write values to the
PLC.
The default name also signifies the type of register: The “AI” for Analog input register.
SNPAI0[20] = L1 + 5
Write the sum of L1 plus 5 to the PLC’s Analog input register at index location 20.
X1=SNPAI0[32] + 64.0
Read the value in Analog Input register index location 32, add 64.0 to the value, and
store it in variable X1.
Tip: Start with writing one number to the PLC. You can add more instructions and
controls after you have successfully established communication with the PLC.
Tip: Start with writing one number to the PLC. You can add more instructions and
controls after you have successfully established communication with the PLC.
In most applications, you want the BOA Spot to switch Solution and trigger on a signal
from the PLC.
7. In the Edit Scripts setup panel click on “Periodic: 200 ms”.
8. In the bottom panel below the image area, click the “Edit”
button.
9. Add statements that tell the PLC which solution is running, and read a solution
change request from the PLC output registers. (example on the next page)
10. Add statements that trigger the BOA Spot, clear and then rearm the trigger.
(example on the next page)
Note: The “heartbeat” is not used by the BOA Spot, but we have seen many customers
prefer to include it in their PLC programs. Some PLCs may require it.
The “inspBusy” variable is not fully implemented in this example. You could send it to
the PLC to tell it the Solution is running.
Note: It is not known if you can read and write to the same locations in this PLC.
BOA Spot is compatible with PLCs that use the GE Fanuc SRTP protocol, over an
Ethernet connection.
Configure the BOA Spot
1. In the Navigation bar, click on Setup
Connections.
2. Use the drop list to select G”E Fanuc SRTP
Ethernet PLC”.
The center of the Setup panel changes to
configure BOA Spot for SRTP
communication.
3. Select the Register type, and enter the IP
Address of the PLC.
There are several different register types. Each
performs a specific task, and has a specific
data type it will accept.
4. You can change the variable name, or use
the defaults.
5. Click the “Add SRTP destination” button.
Your definition appears in the “PLC
Destination” list box.
Notice the Read/Write example just below the “Add” button. The examples are given
for the default variable name “SRTPAI0”. These are the type of statements you would
use in the Script Editor to read values from or write values to the SRTP PLC.
The default name also signifies the type of register: The “AI” for Analog input register.
SRTPAI0[20] = L1 + 5
Write the sum of L1 plus 5 to the PLC’s Analog input register at index location 20.
X1=SRTPAI0[32] + 64.0
Read the value in Analog Input register index location 32, add 64.0 to the value, and
store it in variable X1.
Depending on the design of the PLC, the read and write locations may be the same, or
they may be different.
Tip: Start with writing one number to the PLC. You can add more instructions and
controls after you have successfully established communication with the PLC.
Tip: Start with writing one number to the PLC. You can add more instructions and
controls after you have successfully established communication with the PLC.
In most applications, you want the BOA Spot to switch Solution and trigger on a signal
from the PLC.
7. In the Edit Scripts setup panel click on “Periodic: 200 ms”.
8. In the bottom panel below the image area, click the “Edit”
button.
9. Add statements that tell the PLC which solution is running, and read a solution
change request from the PLC output registers. (example on the next page)
10. Add statements that trigger the BOA Spot, clear and then rearm the trigger.
(example on the next page)
Note: The “heartbeat” is not used by the BOA Spot, but we have seen many customers
prefer to include it in their PLC programs. Some PLCs may require it.
The “inspBusy” variable is not fully implemented in this example. You could send it to
the PLC to tell it the Solution is running.
Note: It is not known if you can read and write to the same locations in this PLC.
4. Compile and download your program to the PLC.
5. Monitor the PLC memory or registers in your programming software, if supported on
your system. Observe the BOA Spot writing to the PLC.
6. Add the logic necessary to process the BOA Spot data, and to trigger and switch
solutions as appropriate.
Note: The Windows Firewall should be turned off (or customized) on systems that
communicate over the network.
BOA Spot is compatible with devices that support the Motoman protocol, over a serial
port connection.
MOTO[20] = L1 + 5
Write the sum of the L1 measurement plus 5, to the Motoman write location 20.
Usually devices have a bank of register locations or addresses. There may be specific
functions assigned to specific locations. This would be outlined in the documentation for
your Motoman device or system.
X1=MOTO[32] + 64.0
Read the value at Motoman read location 32, add 64.0 to the value, and store it in
variable X1.
Tip: Start with writing one number to the PLC. You can add more instructions and
controls after you have successfully established communication with the PLC.
Tip: Start with writing one number to the PLC. You can add more instructions and
controls after you have successfully established communication with the PLC.
In most applications, you want the BOA Spot to switch Solution and trigger on a signal
from the PLC.
7. In the Edit Scripts setup panel click on “Periodic: 200 ms”.
8. In the bottom panel below the image area, click the “Edit”
button.
9. Add statements that tell the PLC which solution is running, and read a solution
change request from the PLC output registers. (example on the next page)
10. Add statements that trigger the BOA Spot, clear and then rearm the trigger.
(example on the next page)
Note: The “heartbeat” is not used by the BOA Spot, but we have seen many customers
prefer to include it in their PLC programs. Some PLCs may require it.
The “inspBusy” variable is not fully implemented in this example. You could send it to
the PLC to tell it the Solution is running.