Showing results for 
Search instead for 
Did you mean: 

Synchronize subvis for SMU and DAQ

Go to solution


I am trying to build a VI in which a DAQ 6368 outputs an arbitrary function, and an SMU4141 reads the current trace, each sampling at ~10kHz. I want the DAQ to read it's own voltage output at the same time. This way, I get a voltage trace from the DAQ and a current trace from the SMU, allowing me to make IV curves. I want the voltage and current traces to have the same number of data points and start/stop at the same time.


Right now I think my VI is overly complicated - I have separate subvis for the SMU and DAQ, and I am trying to use triggers to synchronize their starts.


Can anyone help me along here? Am I using the right architecture to even do this? I've attached some screenshots of my attempt at triggering, and the total VI.

Download All
0 Kudos
Message 1 of 5

Hello gimNPC,


I think you are following the right way or you are close. This help document talks about the multi-device synchronization available for the SMU. I took a look to your VIs and you are applying the start trigger concept.


For additional references, you could take a look to LabVIEW examples where I found a couple of synchronization examples (start menu>>all programs>>national instruments>>NI-DCPower>>Examples). Those examples are for multi-channel sync, but you could modify them for multi-device sync applying the concept of the signal routing thorught the chassis.


I also found an additional example in the developer zone, it is for another SMU, but you could test it. Again, you need to adapt that code to replace one SMU with the DAQ card.

DevZone example



Frank R.

0 Kudos
Message 2 of 5

Hello again,


I've revisited this vi and I'm still having trouble getting the synchronization to work, so I'm looking for some more assisstance.



This vi is going to send a variety of voltage signals into a device. It will measure voltage time traces at various parts in the device, and also record the current. I want the current and voltage measurements synchronized, which requires some thought because they are measured on difference cards (SMU 4141 and DAQ 6368).


A second wrench in the works is that I want to incorperate a PI (proportional-integral) loop, such that the input signal is continually modified based on what current is being measured.


Presently, my VI sort-of works. The synchronization only works when I have very few DAQ channels reading, and at low sample rate without the PI loop. Even then, it doesn't synchronize every time - almost as though race conditions are involved. With more channels, higher sampling rates, and PI loops, the vi will often just freeze.


I've attached my code in the hopes that someone can take a look. Main and DAQ single channel are the only ones you need to have open to run it.



0 Kudos
Message 3 of 5

attachment didn't seem to work

0 Kudos
Message 4 of 5
Accepted by topic author gimNPC

In classic fashion, I was able to solve my problems as soon as I made them public.


Basically, I have my DAQ output buffer manually set to 0 (required for the PID loops). The DAQ Ai acts as a "master", and it sends out the trigger "/XDAQ_1/ai/StartTrigger", which is read by the SMU measure trigger. Also, I realized I had to make the buffer larger for the DAQ Ai (whatever the standard NI buffer table is). Lastly, the PI loop/synchronization works better if the PI loop is 0.5s as opposed to 1s - faster data turnover and less buffering, I imagine.

0 Kudos
Message 5 of 5