11-03-2008 05:50 PM
Hello there,
I am a freshman to Labview. Recently, I need to output two analogue sine signal with phase difference by use of the DAQ cards. And now the problem has been resolved.
Now, I want to make the amplitude of the signal increase linearly from zero to a maximum voltage and then ratrace to zero. Note that: suppose the perioed of the sine signal is T. The amplitude of the signal from 0 to increase to the maximum voltage take time of 250T. Besides, it need take time of 80T to retrace to zero from the maximum voltage. I attach the signal that we want to obtain here and the vi that could generate two analogue sine signals. Are there some suggestions?
Any comment or advice will be precious to me. Thanks.
11-04-2008 04:29 AM
Use the example Cont Gen Voltage Wfm-Int Clk-Non Regeneration.vi as a starting point.
Take the sinus (plus phase) and multiply with the envelope , maybe you only need to calculate the data once and change the sample clock to adapt to other frequencies
Take a look into the waveform generation examples vis to see what matches best, try to understand the underlying principles and start modifying
11-04-2008 11:44 AM
Hell kaiqujian,
I have taken a look at your application. I have put together a VI that may help you get some further ideas. This VI creates the shape that you require, and puts it through to a DAQmx task for output. You can use the example to apply the same principle to your second Analog Output channel, and synchronize the DAQmx tasks if required. Notes are included in VI as well. Please ensure that this VI is tested thoroughly before being used, as it may not match your specification exactly, but hopefully should give you a few initial ideas to model your own solution around.
I would like to know how this example works for you, and will be checking on this forum post as soon as I can to see if you have any further questions on this topic. This VI has been written in LabVIEW 8.6, however it should work in earlier versions.
Best Regards,
11-04-2008 02:57 PM
Hello gt3000,
I do appreciate your reply. Unfortunately, I cannot open your attached vi due to the fact that my current Labview is 8.5.1. Could you save your vi in an earlier version. or you could attach the picture of the block diagramm of the Vi
Thank you very much
11-05-2008 03:37 AM
Hello kaiqujian,
I have used the 'Save for previous version...' tool from the File menu of LabVIEW 8.6 and saved the file for LabVIEW 8.5.1. I have attached a zip file with the original I had produced and the compatible one you have requested. Again, please have a look, and reply back with how it works for you.
Regards,
11-05-2008 02:54 PM
Hello gt3000,
I have run your vi. I link the output into one oscilloscope. However, I cannot see the waveform in the oscilloscope. Maybe the signal is not successfully written into the DAQ card. I found that the DAQ written block, you choose DBL one channel one sample. However, I should output continuous waveform. so I should choose Wfm multi channel multi sample. I do not know whether this is the reason of written failure?
By the way, using the way you control the amplitude of the signal generated from the fundamental generator, I control the amplitude of the signal amplitude in my original VI, it still cannot work and say "The specified resource is researved and the operation cannot be completed as specified". I attach the vi here and maybe you chould check where the problem is. By the way, the vi is modified from "Cont Gen Voltage Wfm-Int Clk.vi" provided by labview.
11-06-2008 05:05 AM
Hello kaiqujian,
I am glad to see that you are using the posted VI's as a step in the right direction. The VI, as an example, will not produce a repeating waveform that can easily be spotted by connecting an oscilloscope to the output of the card. You will need to change the structure of the VI to suit your application. You may have more initial positive results by connecting the Analog Output channel to an Analog Input task on the same card. The flexibility of the number of samples and sample rate will ensure that you can pick up the waveform.
However, I can help with the DAQmx task. It looks as if you have copied and pasted the VI's I sent with your 'Fiber scan.vi'. This is a good start, but your DAQmx task has been set up incorrectly. The following example will help you understand the structure of the DAQmx task in relation to the while loop.
From the 'Help menu' -> 'Find Examples...'
Search 'DAQmx' and select file 'Cont Gen Voltage Wfm-Int Clock-Non Regeneration.vi'
You can then use your knowledge to complete your application.
Regards,