Considerations When Using Master-Slave Acquisition

When two or more FIFOs are associated in a synchronous (master-slave) relationship, calling triggerEnable() on any related FIFO uniformly enables or disables triggers on all associated FIFOs.

When the certain functions are used in synchronous configurations, observe the following guidelines:

  • ccAcqFifo::flush()
    Disable triggers on the master FIFO before flushing. See Flushing FIFOs for more information.
  • ccAcqFifo::triggerModel(), ccTriggerProp::triggerMaster(), and ccAcqFifo::~ccAcqFifo()
    FIFOs used in a synchronous configuration should be constructed together, used together, and then destroyed together. If it is necessary to acquire from a single camera of a synchronous group, it is easier to create another FIFO that shares the camera with the master-slave group.
    While the CVL API allows dynamically rearranging synchronous relationships, this is not a common procedure and Cognex recommends against doing so.
    When setting up a synchronous configuration, the following sequence is the most efficient. Other sequences may work, but may result in extra internal function calls that needlessly arm and disarm the video hardware:
  1. Create each FIFO individually, and immediately disable triggers on each one.
  2. On each slave FIFO set the trigger model to cfSlaveTrigger() and then assign triggerMaster() to the master FIFO.
  3. Enable triggers on the master FIFO.

When destroying FIFOs, the order of destruction is unimportant. However, once one FIFO of a group has been destroyed, the other FIFOs should no longer be used.