Warning

You are reading an old version of this documentation. If you want up-to-date information, please have a look at 4.2 .

Commands principles

All the commands in the EtherCAT 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

    • System Migration 0b0010_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 EtherCAT 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.

  • 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 when not. Clearing the error has the effect of resetting this register to False.

  • Error ID

    Contains the current Error ID, see Clear Error Trigger. Clearing the error has the effect of resetting 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 or Multi Part B Quantity. By default, the parameter Part Quantity is set to 1. Please refer to get_part for a full description of the command.

    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 part to prepare can be changed by changing any of the parameters Part Quantity, Multi Part Quantity A or Multi Part B Quantity. By default, the parameter Part Quantity is set to 1. Please refer to prepare_part for a full description on the command.

    When the part(s) requested 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 tweaked. 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 save 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 where a single parameter is saved. As mentioned previously, all the parameters are saved, it is important you initialize the parameter with sensible values!

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

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

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.

  • Poses

    EYE+ can output up to 10 poses at a time. Each pose is made of 4 different parameters:

    1. Pose <n> X: the X coordinate for this part

    2. Pose <n> Y: the Y coordinate for this part

    3. Pose <n> RZ: the RZ angle for this part

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

Purge Functionalities

In addition to the production functionalities, the EtherCAT 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

Additional error codes

EYE+ shall return specific error code to EtherCAT if necessary. A list of these error codes and their description is shown below:

701

Concurrent commands are active in the PDOs