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 IsError 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+ XTD will return an error in such case.
See Additional error codes.
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
In addition, the following states are also available in the SystemState register:
Error 0b0100_0000
Ready 0b1000_0000
System Upgrade 0b0001_0000_0000
Settings Migration 0b010_0000_0000
Recipe Migration 0b100_0000_0000
System Backup 0b000_1000_0000_0000
System Restore 0b0001_0000_0000_0000
Initialization 0b0010_0000_0000_0000
Migration Error 0b0100_0000_0000_0000
Remote Migration 0b1000_0000_0000_0000
EYE+ XTD recognizes this command when the value StopStates changes (e.g. when value goes from 0 to 1). The PDO
entry StopStateDone goes to True when the system has finished processing the command, as shown in the
following figure. Error is handled using the special register IsError and ErrorID, 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+ XTD could return any error code defined in Error codes. The Clear Error Trigger allows clearing out any
error that would show up in the ErrorID 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:
Start a recipe in production, the unique recipe identifier must be set in register RecipeID. Once production
has started, the register StartProductionDone, as well as the SystemState, will reflect this. Error is
handled using the special register IsError and ErrorID, 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 PartQuantity, ModelNQuantity (N = 1, 2, 3, 4, 5 or 6). By default, the parameter
PartQuantity is set to 1. Please refer to get_part(multi-model)
for a full description of the commands.
The figure below shows an example of requesting a single part (default parameter).
Prepare one or more parts from EYE+ XTD, 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. By default, the parameter
PartQuantity 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 IsPrepared is set to 1.
The figure below shows an example of preparing a part.
Force Take Image Trigger
The register ForceTakeImageTrigger forces EYE+ XTD to acquire an image as soon as possible.
Each time the ForceTakeImageTrigger changes from 0 to 1, EYE+ XTD 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.
The register ClearPoses allows clearing the Poses outputs (Pose<n>), resulting in an
empty list of poses. This is useful between two consecutive Get Part Triggers.
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+ XTD
reports completion of the command using the register SaveParametersDone. 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 register IsError and ErrorID,
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.
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
By default, the timeout parameter is set to 0.0. Refer to timeout for details on how this
value affects the behavior of the system.
Part Quantity
This parameter is used to ask EYE+ XTD to look for several parts at the same time. Every time EYE+ XTD 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.
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 (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.
Number of specific parts of selected model ready to be returned using a
Get Part Trigger.
Poses
EYE+ XTD can output up to 10 poses at a time. Each pose is made of 3 mandatory parameters defining the position of the
part and 2 optional parameters in case you are producing a Multi-model recipe:
Start a hand-eye calibration using one of your recipes and its associated part. The unique recipe identifier
must be set in register RecipeID. Once the hand-eye calibration process has started, the register
StartHand-eyeCalibrationDone, as well as the System State, will reflect this.
Error is handled using the special register IsError and ErrorID, 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 CalibrationPointIndex.
In total 4 calibration points (index 1 to 4) must be recorded before performing the
CalibrateTrigger command.
The XCoordinate and YCoordinate of the robot can be expressed in your own robot unit.
If another point has already been registered at this CalibrationPointIndex, it will be overwritten by the
newly defined point.
Take an image to get the current vision coordinates of the detected object. The detected coordinates are
paired with the robot position recorded at CalibrationPointIndex.
If more than one part is detected, the first one will be used as the match point.
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 1 to 4) must be recorded before performing the hand-eye
CalibrateTrigger command.
X Coordinate
X coordinate of the robot position to be recorded using the SetCalibrationPointTrigger command.
Y Coordinate
Y coordinate of the robot position to be recorded using the SetCalibrationPointTrigger command.
Calibrate Trigger
Calculate the hand-eye calibration matrix from the registered calibration points.
You must have registered 4 complete calibration points with the SetCalibrationPointTrigger and
TakeCalibrationImageTrigger commands before calling the CalibrateTrigger 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 NumberofValidEntries 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 CalibrateTrigger 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.
Accuracy of the calibration resulting from the Calibrate Trigger command.
It is expressed in the unit of measure configured in your EYE+ XTD.
You can check the unit of measure in EYE+ XTD Studio under CONFIGURATION in Robot.
Note
If you have not done the camera configuration before the hand-eye calibration, the calibration
accuracy will be expressed in pixels.