08-10-2020 10:37 PM
Dear Sir,
I have created a LabVIEW VI where I want to generate a sine and cosine wave form to create a circular waveform. In VI, I want to add a time shift to cosine wave, where it will start from 0 to maximum with a time laps of 0.25 sec with respect to sine waveform. The VI found to be working in simulation. But I am not able to get any waveform from the NI USB 6251 DAQ board while connecting it to the Digital Oscilloscope. Please help to solve this problem. I have attached the VI herewith.
Thank You
Solved! Go to Solution.
08-11-2020 03:37 AM
Hi prasad,
@prasad145 wrote:
But I am not able to get any waveform from the NI USB 6251 DAQ board while connecting it to the Digital Oscilloscope.
Some things:
You create two waveforms, then you build an array for each waveform, then you JoinSignals those arrays. Why do you do so? Why not use just one BuildArray function to create an array from your two waveforms?
The AO DAQmx task is defined with just one output channel, but yet you want to output an array of waveforms: this is a clear mismatch…
There should be a wait function in the while loop…
@prasad145 wrote:
In VI, I want to add a time shift to cosine wave, where it will start from 0 to maximum with a time laps of 0.25 sec with respect to sine waveform.
A time shift of a (co)sine wave can be translated into a phase shift. You can set the phase shift at the GenerateSineWave function…
08-11-2020 04:17 AM
Dear Sir,
Thank You for the reply, I want to make cosine function start from 0 to max, that is why I didn't used phase shift in the sine wave generator. Instead want to shift the time in the second sinusoidal waveform by 0.25 sec, so that I will get a cosine function starting at 0.5sec. I am unable to append a constant 0 V signal for 0.25sec with second sinusoidal wave form. In the DAQmx signal generator, I have selected the Physical Signals as ao0:1, so that both the analog output channels ao0 and ao1 will generate signals simultaneously. Please suggest any modification I can make in the VI to generate one channel with sinusoidal wave from 0 to max and another channel with cosine in the form of sine from 0 to max but with a time shift of 0.25 sec.
Thank You
08-11-2020 05:01 AM
I have modified the code by adding a append waveform, and removed all unnecessary arrays. But still not getting waveform from the DAQ hardware.
08-11-2020 01:52 PM
Hi, @prasad145,
I have modified the code by adding a append waveform, and removed all unnecessary arrays. But still not getting waveform from the DAQ hardware.
If I understand your issue, you're trying to create this waveform:
Is that what you're trying to do?
Or is your issue only in trying to output to the DAQ hardware?
-joeorbob
08-12-2020 10:02 AM
No, I want the sinusoidal wave to start after 0.25 sec with amplitude ranging from 0 to 3, means start at 0 at 0.25 sec and reach 3 at 0.75 sec. And another waveform to start at 0 at 0sec and reach 3 at 0.5sec.
Actually now i solved the issue in my previous VI. where there are sample mismatch in the waveform coming from sine and cosine generator . Now after this modification the DAQ is able to generate required waveform
Thank You very much for your support.
08-12-2020 01:45 PM - edited 08-12-2020 01:46 PM
Hi prasad,
@prasad145 wrote:
I want the sinusoidal wave to start after 0.25 sec with amplitude ranging from 0 to 3, means start at 0 at 0.25 sec and reach 3 at 0.75 sec. And another waveform to start at 0 at 0sec and reach 3 at 0.5sec.
Then you need to create such a waveform from two parts:
08-12-2020 11:02 PM
Thank You for the support. I got the result after sample match.