LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to send out a AO signal with a fixed phase difference with a previous detected AI signal?

I can use a vi kinda like the attached example to get a detected AI based the AO in the vi. Then, I need to send out ANOTHER AO (add a new AO) which has a fixed phase difference with the detected AI. Could anybody throw some lights on this problem for me?
Your reply will be appreciated very much!
0 Kudos
Message 1 of 7
(3,779 Views)
Taught stuff...

It depends on the hardware you're using (please post). Some devices have an analog trigger capability. You can set a delay for the trigger. Then the way would be:
Aquire signal -> Get Frequency -> Calculate delay for required phase -> configure trigger on AI with that delay -> route the trigger to AO.

Once you got it, thats the cool stuff of the DAQ world.

But be aware, that die ADCs for the Triggers are just 10 bits... But, not designing a trigger + delay in hardware, but with less than 10 Mouse-clicks, it's addicting...

Felix
0 Kudos
Message 2 of 7
(3,774 Views)
Hi, Felix:
 
I'm using PCI-6110, LabVIEW and Windows 2000. Thank you!
0 Kudos
Message 3 of 7
(3,770 Views)
Your hardware should be fine for that. Search the NI site for triggering, try to get the trigger working with aquisition (so you always see your signal in th right phase), and try to route the trigger to AO (thats mostly with property nodes, you dig deep 😉 ). Post again with code or ipg if you're stuck.
I'm sync'ing over several cards, so it works for sure, but I can't write your code 😉

Felix
0 Kudos
Message 4 of 7
(3,767 Views)
Hi, Felix:
 
In my application, I have a steel cantilever beam with two shakers contact it and a sensor at the tip of the beam. I wanna use the setup to do the following:
1. Sending out an analog output sinusoidal signal (A1, F1 and P1) to ONE shaker and measuring the vibration of the beam at the sensor location by obtaining the analog input sinusoidal signal (A1', F1' and P1');
2. Sending out another output analog sinusoidal signal (A2, F2 and P2) to ANOTHER shaker with a corresponding amplitude, the same frequency (F2=F1') and a phase with fixed phase difference with the measured one, i.e., P1'. 
 
Now, I made a vi (please find the attachment) which has two analog outputs and one analog input (I wanna try 2 AO and 1AI first). However, when I run it, I got "Error-50103 occurred at DAQmx Write (Analog Wfm 1Chan NSamp).vi     Possible reason(s): The specified resource is reserved. The operation could not be completed as specified." Could you please take a look and throw some lights for me?
 
Thank you very much!
0 Kudos
Message 5 of 7
(3,714 Views)
Without the actual hardware it's a bit difficult to debug it for me, so some suggestions I would do with the hardware:
  • Make sure both AO-Channels are different (when I open the VI both are Dev1/ao0).
  • Try to aquire once (Set to finite samples instead of Contious samples, remove the while loop (or set stop=true).
  • If this doesn't help, does it work with only 1 AO?
  • Run the VI with execution highlighting, maybe the 'real' error doesn't come from the DAQmx Write Operation.
  • Set Autostart (DAQmx Write) to false
  • Execute the DAQmx Write before the DAQmx Start Trigger.vi
Let us know if you succeed or still encounter these problems. I (or other) might try to implement that with hardware if time permits.
Good luck, sounds like a fun project.

Felix
0 Kudos
Message 6 of 7
(3,693 Views)

Thank you, Felix! I'll look into it.

Merry Christmas and all the best to you and your family!

0 Kudos
Message 7 of 7
(3,690 Views)