8.8. Using EEPROM for Device Identification

Important

This approach uses EEPROM only for identification purposes (connection detection and positioner naming). It does not provide access to motion-related settings

8.8.1. How to detect whether a positioner is connected and identify it using EEPROM?

EEPROM, located inside the positioner cable, can be used as a simple mechanism to:

  • detect whether a positioner is connected
  • identify which specific positioner is connected

This approach is based on checking EEPROM availability and reading user-defined data stored in it.

8.8.2. Detecting a connected positioner

A connected positioner can be detected by checking whether EEPROM is available. This can be done in two ways:

  • Using XILab. An EEPROM status indicator is shown at the bottom of the main XILab window:
    • green - EEPROM is detected
    • gray - EEPROM is not present
  • Using libximc. Check the following flag:
    • #define  STATE_EEPROM_CONNECTED   0x0000010
      (for more information, see libximc API)

If EEPROM is available, this indicates that a positioner is connected.

8.8.3. Identifying a specific positioner

EEPROM stores parameters programmed by the manufacturer and allows storing a user-defined positioner name. The positioner name can be set in two ways:

  • Using XILab open Settings -> Stage tab -> edit the Positioner name field
  • Using libximc call the function: result_t XIMC_API set_stage_name (device_t id, const stage_name_t *stage_name)
    (for more information, see libximc API)

Once assigned, the positioner name can be read back and used for identification.

This method is useful in the following cases:

  • working with multiple positioners
  • automatic device detection in scripts
  • verifying that the correct device is connected