PXI

cancel
Showing results for 
Search instead for 
Did you mean: 

How to trigger a case structure/while loop with PFI1?

  I have two while loops in one VI, one is a high speed (RFSA) read loop that is triggered by PFI1 via DAQmx the usual way.  Inside this first loop is a DAQmx Read that waits for the PFI1 trigger that works great.

  I would like to trigger a second timed while loop (much slower) using the same PFI1 trigger.  It contains power supplies that I want to read at a 50Hz rate simultaneous to the RFSA reading.  My problem is that the hardware drivers in this loop speak VISA.  Note-The "trigger" function of these supplies is not the right kind trigger so I need to trigger their read VI with a case structure and while loop.  I have no idea how to extract the PFI1 from the DAQmx Task to use it to to trigger the case structure.  Any hints would be appreciated.

Jim

0 Kudos
Message 1 of 2
(4,511 Views)

Based off of what you said you are communicating with these devices using NI-VISA, which creates a problem.  VISA is a serial connection it will not have a common clock for your devices to syncronize to.

 

If you are not actually using VISA for your communication and I just happened to read this wrong coud you include a code snippit so that I can get a better understanding of your code?

 

Lastly there are many options for syncronization some overviews of how they work can be found here: 

https://www.ni.com/en/support/documentation/supplemental/10/synchronization-explained.html

 

 

-Ryan

Ryan
Group Manager
FlexLogger
NI R&D
0 Kudos
Message 2 of 2
(4,470 Views)