Warning
You are reading an old version of this documentation. If you want up-to-date information, please have a look at 5.0 .Commands principles
All the commands in the EtherNet/IP Module follow the same principle. They can be identified by their name that ends with
Trigger
. To send a command, please use the following approach:
Set the necessary parameters before setting the trigger to True.
Set the command trigger to True.
Wait for the flag
<command> Done
to become True.Reset the command trigger to False.
Wait for the flag
<command> Done
to reset back to False.Check for errors in the
Is Error
register, in case there is one, handle it based on your requirements.If there is no error, you can use the corresponding output(s).
This is illustrated in the following Figure:
Note
There cannot be two command triggers set to True at the same time. EYE+ will return an error in such case. See Additional error codes.
Basic Functionalities
Basic Inputs
- Stop States [UDINT]
Stop all the states as defined in stop <state>. States are encoded as a bitset, where each state has the following value:
Production
0b0000_0001
Recipe Edition
0b0000_0010
Camera Configuration
0b0000_0100
Hand-Eye Calibration
0b0000_1000
Recipe Qualification
0b0001_0000
Purge
0b0010_0000
In addition, the following states are also available in the
System State
register:Error
0b0100_0000
Ready
0b1000_0000
System Upgrade
0b0001_0000_0000
Settings Migration
0b0100_0000_0000
Recipe Migration
0b1000_0000_0000
System Backup
0b0001_0000_0000_0000
System Restore
0b0010_0000_0000_0000
Initialization
0b0100_0000_0000_0000
Migration Error
0b1000_0000_0000_0000
EYE+ recognizes this command when the value
Stop States
changes (e.g. when value goes from 0 to 1). The PDO entryStop State Done
goes to True when the system has finished processing the command, as shown in the following figure. Error is handled using the special registerIs Error
andError ID
, see Error Handling.The Done BOOL is cleared when the value goes back to 0.
Note
Stopping all the states to go in the state Ready can be achieved by setting this value to 0xFF
- Clear Error Trigger
EYE+ could return any error code defined in Error codes. The Clear Error Trigger allows clearing out any error that would show up in the
Error ID
register. In addition to the standard error codes, specific errors for EtherNet/IP can be seen, these are defined in Additional error codes.Clearing an active error is straightforward, as presented below:
Basic Outputs
- System State
Gives the current state of EYE+, see Stop State(s) for a complete list of the states.
- Clear Error Done
True when EYE+ has finished processing command Clear Error Trigger. Reset to False when trigger Clear Error Trigger is set to 0.
- Is Error
True when output Error ID contains an error, False otherwise. Clearing the error resets this register to False.
- Error ID
Contains the current Error ID, see Clear Error Trigger. Clearing the error resets this register to the value 0.
- Stop State Done
True when EYE+ has finished processing command Stop State(s). Reset to False when trigger Stop State(s) is set to 0.
Production Functionalities
Production Inputs
- Start Production Trigger
Start a recipe in production, the unique recipe identifier must be set in register
Recipe ID
. Once production has started, the registerStart Production Done
, as well as theSystem State
, will reflect this. Error is handled using the special registerIs Error
andError ID
, see Error Handling.Below is an example where the recipe
42
is started for production:
- Get Part Trigger
Request one or more parts. The number of parts returned can be changed by modifying the value of any of the parameters
Part Quantity
,Multi Part Quantity A
,Multi Part Quantity B
, orModel N Quantity
(N = 1, 2, 3, 4, 5 or 6). By default, the parameter``Part Quantity`` is set to 1. Please refer to get_part and get_part for a full description of the commands.The figure below shows an example of requesting a single part (default parameter).
Note
A simple scenario is described in Get part.
- Prepare Part Trigger
Prepare one or more parts from EYE+, prepared parts can be retrieved later using the register Get Part Trigger. This command has the same behavior as Get Part Trigger except that it does not send part coordinates and it does not take the timeout parameter into account, see Command Timeout. The number of parts to prepare can be changed by modifying any of the parameters
Part Quantity
,Multi Part Quantity A
orMulti Part Quantity B
. By default, the parameterPart Quantity
is set to 1. Please refer to prepare_part for a full description of the command.When the requested part(s) are ready, the flag
Is Prepared
is set to 1.The figure below shows an example of preparing a part.
Note
A simple scenario is described in Prepare part.
- Force Take Image Trigger
The register
Force Take Image Trigger
forces EYE+ to acquire an image as soon as possible.Especially used in conjunction with Prepare Part Trigger and Get Part Trigger.
Each time the
Force Take Image Trigger
changes from 0 to 1, EYE+ will acquire a new set of images, and perform the analysis. Please refer to force_take_image for a full description of the command.The figure below shows an example of setting this flag.
Note
A simple scenario is described in Force take image.
- Clear Poses
The register
Clear Poses
allows clearing the Poses outputs (Pose <n>
), resulting in an empty list of poses. This is useful between two consecutive Get Part Triggers.
Production Parameters
While producing, depending on your requirements, certain parameters can be tuned. The following list shows what parameters are available.
- Save Parameters Trigger
Parameters listed in Production Parameters shall be saved explicitly using this specific command. EYE+ reports completion of the command using the register
Save Parameters Done
. The command saves all the parameters listed in Production Parameters, it is important to initialize all of them to a sensible value! Error is handled using the special registerIs Error
andError ID
, see Error Handling.Below is an example showing the behavior of one of the parameters as the command is sent.
Important
This command saves all the parameters, it is important that you initialize all of them to a sensible value.
- Can Take Image
Image acquisition is enabled by default. If necessary, this parameter can be set to False to disable image acquisition. See Can take image to get more information about when this command is useful.
- Image After Send
It forces the acquisition of an image after a part is picked. Each time you call the Get Part Trigger or Prepare Part Trigger commands, the system will automatically take an image just before. It is used to correct the coordinates of the good candidates already found (stored in memory) if you suspect the parts may have moved in the meantime due to some external disturbance.
See Image after send for more information.
- Command Timeout
It is the timeout (in seconds) when calling the Get Part Trigger command. If no parts were found within this time limit, an error is returned.
Note
Setting this parameter to 0 disables the timeout: the command will be performed until the requested number of parts is found.
- Part Quantity
This parameter is used to ask EYE+ to look for several parts at the same time. Every time EYE+ takes a picture, it will look for at least <n> parts on the image. If it does not find those parts, no coordinates will be sent and it will start vibrating and taking a new image until it gets those <n> parts.
- Multi Part Quantity A, B
With a dualfeeding recipe only, it is the number of parts of a specific type requested by Prepare Part Trigger and Get Part Trigger each time it takes an image. If this number of parts is not found during image acquisition, then the Get Part Trigger or Prepare Part Trigger will start again (vibration + image acquisition) until this number of parts is found.
For more information about how part quantities work, please read the following section describing a common scenario for Dual Feeding production.
- Model N Quantity, where N = 1, 2, 3, 4, 5 or 6
With a multi-model recipe only, it is the number of parts of a specific model requested by Prepare Part Trigger and Get Part Trigger each time it takes an image. If this number of parts is not found during image acquisition, then the Get Part Trigger or Prepare Part Trigger will start again (vibration + image acquisition) until this number of parts is found.
For more information about how part quantities work, please read the following section describing a common scenario for Multi-model production.
Production Outputs
- Start Production Done
True when EYE+ has finished processing command Start Production Trigger. Reset to False when trigger Start Production Trigger is set to 0.
- Active Recipe
Contains the current recipe loaded for either production or purging.
- Get Part Done
True when EYE+ has finished processing command Get Part Trigger. Reset to False when trigger Get Part Trigger is set to 0.
- Prepare Part Done
True when EYE+ has finished processing command Prepare Part Trigger. Reset to False when trigger Prepare Part Trigger is set to 0.
- Is Prepared
True when EYE+ has finished processing image and it is ready to give position using Get Part Trigger.
- Is Analysis Running
True when EYE+ is still processing images, see is_analysis_running.
- Force Take Image Done
True when EYE+ has finished processing command Force Take Image Trigger. Reset to False when trigger Force Take Image Trigger is set to 0.
- Parts Prepared
Number of general parts ready to get using a Get Part Trigger.
- Multi Parts Prepared A, Multi Parts Prepared B
Number of specific parts ready to get using a Get Part Trigger.
- Model N Prepared, where N = 1, 2, 3, 4, 5 or 6
Number of specific parts of selected model ready to be returned using a Get Part Trigger.
- Poses
EYE+ can output up to 10 poses at a time. Each pose is made of 4 different parameters:
Pose <n> X: the X coordinate for this part
Pose <n> Y: the Y coordinate for this part
Pose <n> RZ: the RZ angle for this part
Pose <n> Type: the part type (used in dualfeeding recipe)
In addition, the number of valid entries is always set in the register
Number of Valid Entries
- Save Parameters Done
True when EYE+ has finished processing command Save Parameters Trigger. Reset to False when trigger Save Parameters Trigger is set to 0.
- Can Take Image
Read-back value of parameter Can Take Image.
- Image After Send
Read-back value of parameter Image After Send.
- Command Timeout
Read-back value of the parameter Command Timeout.
- Part Quantity
Read-back value of the parameter Part Quantity.
- Multi Part Quantity A, Multi Part Quantity B
Read-back value of the parameters Part A/B Quantity.
- Model N Quantity Read-back, where N = 1, 2, 3, 4, 5 or 6:
Read-back value of the parameter Model Quantity.
Purge Functionalities
Purge Inputs
In addition to the production functionalities, the EtherNet/IP interface provides access to all of the commands to fully control the optional Asyril purging system for easier production changeovers. See Purge plate and Purge full to get more information on how to fully take advantage of this optional accessory.
There are few commands specific to the purging system:
- Start Purge Trigger
Start a recipe for purging the platform, the unique recipe identifier must be set in register
Recipe ID
. Once purging has started, the registerStart Purge Done
, as well as the System State, will reflect this. Error is handled using the special registerIs Error
andError ID
, see Error Handling.Below is an example where the recipe 42 is started for purging the platform:
- Purge Plate Trigger
Perform a purge sequence of the plate only. That sequence consists in opening the purge flap, running a platform vibration in the corresponding direction and finally closing the purge flap. Duration of the vibration can be optionally set in register
Purge Duration
.The register
Purge Plate Done
is set to 1 once EYE+ has finished running the purge.The system must be in purge mode to use this command, see Start Purge Trigger.
- Purge Full Trigger
Perform a purge sequence of both the plate and the hopper. That sequence consists in opening the purge flap, running a platform vibration in the corresponding direction as well as triggering the hopper and finally closing the purge flap. Duration of the vibration must be set in register
Purge Duration
.The register
Purge Full Done
is set to 1 once EYE+ has finished running the purge.The system must be in purge mode to use this command, see Start Purge Trigger.
- Purge Duration
Amount of time to vibrate plate and hopper for in ms. When used in combination with the
Purge Plate Trigger
command, if this value is set to value 0 the corresponding value from the recipe will be used instead. It must be between 1 and 30000 ms.
Purge Outputs
- Start Purge Done
True when EYE+ has finished processing command Start Purge Trigger. Reset to False when trigger Start Purge Trigger is set to 0.
- Purge Plate Done
True when EYE+ has finished processing command Purge Plate Trigger. Reset to False when trigger Purge Plate Trigger is set to 0.
- Purge Full Done
True when EYE+ has finished processing command Purge Full Trigger. Reset to False when trigger Purge Full Trigger is set to 0.
Hand-eye Functionalities
The command flow to perform a hand-eye calibration, using 4 calibration points is described in this scenario.
Hand-eye Inputs
- Start Hand-eye Calibration Trigger
Start a hand-eye calibration using one of your recipes and its associated part. The unique recipe identifier must be set in register
Recipe ID
. Once the hand-eye calibration process has started, the registerStart Hand-eye Calibration Done
, as well as the System State, will reflect this. Error is handled using the special registerIs Error
andError ID
, see Error Handling.Below is an example where the recipe 42 is used for starting a hand-eye calibration:
- Set Calibration Point Trigger
Record a new robot position for the current hand-eye calibration at
Calibration Point Index
. In total 4 calibration points (index 0 to 3) must be recorded before performing theCalibrate Trigger
command. TheX Coordinate
andY Coordinate
of the robot can be expressed in your own robot unit. If another point has already been registered at thisCalibration Point Index
, it will be overwritten by the newly defined point.The system must be in hand-eye calibration mode to use this command, see Start Hand-eye Calibration Trigger.
- Get Calibration Point Trigger
Returns the robot coordinates that were recorded at
Calibration Point Index
. The returned coordinates can be read in Pose 1 - X and Pose 1 - Y.The system must be in hand-eye calibration mode to use this command, see Start Hand-eye Calibration Trigger.
- Take Calibration Image Trigger
Take an image to get the current vision coordinates of the detected object. The detected coordinates are paired with the robot position recorded at
Calibration Point Index
. If more than one part is detected, the first one will be used as the match point.The system must be in hand-eye calibration mode to use this command, see Start Hand-eye Calibration Trigger.
- Calibration Point Index
Index of the calibration point. A complete calibration point consists of a robot position and a corresponding part position. In total 4 calibration points (index 0 to 3) must be recorded before performing the hand-eye
Calibrate Trigger
command.
- X Coordinate
X coordinate of the robot position to be recorded using the
Set Calibration Point Trigger
command.
- Y Coordinate
Y coordinate of the robot position to be recorded using the
Set Calibration Point Trigger
command.
- Calibrate Trigger
Calculate the hand-eye calibration matrix from the registered calibration points. You must have registered 4 complete calibration points with the
Set Calibration Point Trigger
andTake Calibration Image Trigger
commands before calling theCalibrate Trigger
command. The accuracy of the calibration is returned in the Calibration Accuracy.
- Test Calibration Trigger
This command is used to test the current calculated hand-eye calibration. It returns the number of detected parts in
Number of Valid Entries
and their robot coordinates in the Poses outputs. You can then check if the detected robot coordinates match the actual robot coordinates.
- Save Calibration Trigger
Save the current hand-eye calibration. This command should be called after
Calibrate Trigger
to save the data in the system if you consider the result to be good enough. Once the calibration is saved, it will automatically be used in production. If another calibration has been saved before, it will be overwritten by the new calibration.Note
If you forget to call this command and stop the hand-eye calibration state, you will lose all pending calibration data.
Hand-eye Outputs
- Start Hand-eye Calibration Done
True when EYE+ has finished processing command Start Hand-eye Calibration Trigger. Reset to False when trigger Start Hand-eye Calibration Trigger is set to 0.
- Set Calibration Point Done
True when EYE+ has finished processing command Set Calibration Point Trigger. Reset to False when trigger Set Calibration Point Trigger is set to 0.
- Get Calibration Point Done
True when EYE+ has finished processing command Get Calibration Point Trigger. Reset to False when trigger Get Calibration Point Trigger is set to 0.
- Take Calibration Image Done
True when EYE+ has finished processing command Take Calibration Image Trigger. Reset to False when trigger Take Calibration Image Trigger is set to 0.
- Calibrate Done
True when EYE+ has finished processing command Calibrate Trigger. Reset to False when trigger Calibrate Trigger is set to 0.
- Test Calibration Done
True when EYE+ has finished processing command Test Calibration Trigger. Reset to False when trigger Test Calibration Trigger is set to 0.
- Save Calibration Done
True when EYE+ has finished processing command Save Calibration Trigger. Reset to False when trigger Save Calibration Trigger is set to 0.
- Calibration Accuracy
Accuracy of the calibration resulting from the Calibrate Trigger command. It is expressed in the unit of measure configured in your EYE+. You can check the unit of measure in EYE+ Studio under in Robot.
Note
If you have not done the camera configuration before the hand-eye calibration, the calibration accuracy will be expressed in pixels.
Additional error codes
EYE+ shall return specific error code to EtherNet/IP if necessary. A list of these error codes and their description is shown below:
- 701
Concurrent commands are active in the assembly.