LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

NI Sync "Start 1588 and Wait for Quality.vi" example has infinite loop which lead to a memory leak using PXI-6683H without a valid 1588 source

In the example finder there is "Start 1588 and Wait for Quality.vi" that calls another VI "Wait for Next Sync ID.vi" which has an infinite loop in it depending on hardware conditions. In our case we had the ethernet cable to our PXI-6683H timing card unplugged with 1588 source selected as the timing source in the code and this led the "Wait for Next Sync ID.vi" to never get a new sync ID. It would stay stay stuck in the case below in the screenshot because the sync ID would always remain the same while the clock state was in "Initialize" (this will also happen if you have the timing cable plugged in but no valid 1588 source). The timer for this VI only counts down when it gets a new sync ID each iteration which doesn't happen with card state equal to "Initialize". Adding our own timer to this specific condition removed the infinite loop. Given that we were running this VI within a DQMH MHL, this caused a memory leak when it entered the infinite loop state as we had other messages being queued up to the MHL that were not ever able to be processed.

dakotasmith2_0-1763741135987.png

0 Kudos
Message 1 of 1
(113 Views)