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:

  1. Set the necessary parameters before setting the trigger to True.

  2. Set the command trigger to True.

  3. Wait for the flag <command> Done to become True.

  4. Reset the command trigger to False.

  5. Wait for the flag <command> Done to reset back to False.

  6. Check for errors in the Is Error register, in case there is one, handle it based on your requirements.

  7. If there is no error, you can use the corresponding output(s).

This is illustrated in the following Figure:

../../../_images/ecs_start_production.svg

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 entry Stop 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 register Is Error and Error ID, see Error Handling.

    ../../../_images/ecs_stop_states.svg

    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:

    ../../../_images/ecs_clear_error.svg

Basic Outputs

  • System State

    Gives the current state of EYE+, see Stop State(s) for a complete list of the states.

  • 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 register Start Production Done, as well as the System State, will reflect this. Error is handled using the special register Is Error and Error ID, see Error Handling.

    Below is an example where the recipe 42 is started for production:

    ../../../_images/ecs_start_production.svg
  • 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, Multi Part Quantity C, Multi Part Quantity D or Model 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(multi-feeding) and get_part(multi-model) for a full description of the commands.

    The figure below shows an example of requesting a single part (default parameter).

    ../../../_images/ecs_get_part.svg

    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 or Multi Part Quantity B, Multi Part Quantity C, Multi Part Quantity D. By default, the parameter Part 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.

    ../../../_images/ecs_prepare_part.svg

    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.

    ../../../_images/ecs_force_take_image.svg

    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.

    ../../../_images/ecs_clear_part.svg

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 register Is Error and Error ID, see Error Handling.

    Below is an example showing the behavior of one of the parameters as the command is sent.

    ../../../_images/ecs_save_param.svg

    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, C, D

    With a multi-feeding 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 Multi-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

  • Active Recipe

    Contains the current recipe loaded for either production or purging.

  • Is Prepared

    True when EYE+ has finished processing image and it is ready to give position using Get Part Trigger.

  • Multi Parts Prepared A, B, C, D

    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 3 mandatory parameters defining the position of the part and 2 optional parameters in case you are producing a Multi-feeding or Multi-model recipe:

    • 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 Multi-feeding recipe)

    • Pose <n> Model: the part model (used in Multi-model recipe)

    In addition, the number of valid entries is always set in the register Number of Valid Entries

    Note

    Pose <n> Model is located in a separate group in the producing assembly. See Producing Assembly.

  • 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 register Start Purge Done, as well as the System State, will reflect this. Error is handled using the special register Is Error and Error ID, see Error Handling.

    Below is an example where the recipe 42 is started for purging the platform:

    ../../../_images/ecs_start_purge.svg
  • 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.

    ../../../_images/ecs_purge_plate.svg
  • 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.

    ../../../_images/ecs_purge_full.svg
  • 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

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 register Start Hand-eye Calibration Done, as well as the System State, will reflect this. Error is handled using the special register Is Error and Error ID, see Error Handling.

    Below is an example where the recipe 42 is used for starting a hand-eye calibration:

    ../../../_images/handeye_start.svg
  • 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 the Calibrate Trigger command. The X Coordinate and Y Coordinate of the robot can be expressed in your own robot unit. If another point has already been registered at this Calibration 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.

    ../../../_images/handeye_set_robot_point.svg
  • 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.

    ../../../_images/handeye_get_robot_point.svg
  • 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.

    ../../../_images/handeye_take_image.svg
  • 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 and Take Calibration Image Trigger commands before calling the Calibrate Trigger command. The accuracy of the calibration is returned in the Calibration Accuracy.

    ../../../_images/handeye_calibrate.svg
  • 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

  • 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 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.

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.