LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Trigger for Gaussian Modulated Pulse

 Hello, 

 

I am having trouble with DAQ Assistants used for sending and receiving a Gaussian modulated sine pulse though piezoelectric actuators attached to an aluminum plate. I have two DAQ assistants, the first one generates a pulse and sends voltage to actuator 1. The second DAQ assistant measures the voltage given by vibrating actuator 2. 

 

How do I ensure synchronization (in time) among the two DAQ assistant outputs? I get time vs voltage plots for both in excel (see attached). But the time for input DAQ seems to be later than time for the output DAQ. Ideally, I would like both DAQ assistants to "start at the same wall-clock time" - "do their job" - "stop after a few hundred micro-seconds" - "write sent/received data to a file". 

 

I sought out to solve this by re-configuring my vi in the following way (See attachment below). However, now I am having trouble identifying what my trigger 'source' should be. Everything I am trying gives me an error. 

 

Please help if you can. Any input is welcomed. 

Thanks in advance

 

I have attached my VI below. 

Thanks in advanced,

Mike

0 Kudos
Message 1 of 4
(1,021 Views)

@Michael.D 
I am having trouble with DAQ Assistants

Yes.  That's what they're best known for around here.  Trouble when someone has a non-trivial DAQ need.

 

I'm not at a LV machine and don't have time to lay out a complete tutorial.  Here are a few breadcrumbs for you to give you a little bit of a starting point:

  • start learning standard DAQmx functions.  There are examples in the LabVIEW Help menu and on this site.
  • learn how to use a queue to put your file writing code in a separate loop from your DAQ code.  This is often called a "producer consumer" pattern.
  • search for terms like "AI AO sync".  I suspect there are many standard DAQmx examples here in the forums and elsewhere on the site.  I've probably posted a few myself.
  • think carefully about your timing needs.  Windows won't regulate "a few hundred microseconds" of timing with any reliability.  You'll need to count on the hardware clocks of your tasks to do the sync and you'll probably need to count on buffering rather than raw reaction speed in software.

 

 

-Kevin P

 

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

Do a search for "Learn 10 Functions in NI-DAQmx ..." (the rest of the title is something like "and solve 80% of your DAQ problems").  Read the Article.  Play with MAX.  Resolve to banish the Dreaded DAQ Assistant (and its Evil Twin, the Dynamic Data Wire) far, far away.

 

Bob Schor

Message 3 of 4
(993 Views)

Hi Michaeledavies8293,

 

Here is a good KB article that talks about how you can go about synchronizing analog outputs without using the DAQAssistant.

 

How to Synchronize Analog and Digital Output Tasks in NI-DAQmx With LabVIEW

https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z0000019PBVSA2 - This will give you example code on how to synchronize two analog output tasks using DAQmx

 

Learn 10 Functions in NI-DAQmx and Handle 80 Percent of Your Data Acquisition Applications

http://www.ni.com/product-documentation/2835/en/ - The article that Bob Schor mentioned, also an awesome resource that I always recommend to customers

Applications Engineering
National Instruments
0 Kudos
Message 4 of 4
(977 Views)