LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to generate sine wave

Hello everyone!

 

I am currently working on my Bachelor project at a company. i am stuck with a problem.

 

I have designed a labview program for vibration test system. I have used cRIO 9076 as the controller with NI 9263(as D/A) and NI 9234(as A/D).

 

The loop works as follows. the input is given from the labview program. it is then sent to the cRIO. the output of CRIO(that is output from NI 9263) is given to the amplifier. the vibration shaker vibrates based on the input from aamplifier. then the accelerometer detects the vibration and sends it to the NI 9234 and loop repeats iteratively. since i have designed a sweep sine vibration system, the output of cRIO is a square wave. it should be sine wave.

 

the probelm is i am getting a square wave as output from my NI 9263 which should be a sine wave output. I have two subVI where i use nominal to binary convertor(for NI 9234) and binary to nominal (for NI 9263) as calibration mechanism. 

 

the question is where have i went wrong? what should I do to get a sine wave? 

 

PS: on searching NI i found out some formulas (to generate sine wave) and designed a FPGA and LabVIEW program to generate a simple sine wave and got a sine wave. if that formulas is to be included where should i include that?

 

Thanks in advance.

 

Regards,

Vishal.

0 Kudos
Message 1 of 6
(2,966 Views)

Without seeing your current code, there is no way we can even uess as to why you are creating a square wave instead of a sine wave.

0 Kudos
Message 2 of 6
(2,944 Views)

Hello

I have the same error.
I can't generate the sine wave with the example: Sine Wave.lvproj

The resulted waveform is a square wave

Someone has find a solution????

Thanks a lot

 

0 Kudos
Message 3 of 6
(2,742 Views)

Where did you find this Sine Wave.lvproj example?  Post the code so we can see if it has a problem or you are just using it wrong.

 

Have you tried a simple example to generate a sine wave?: Help > Find Examples > Hardware I/O > DAQmx > Voltage - Continuous Output.vi

LabVIEW Pro Dev & Measurement Studio Pro (VS Pro) 2019 - Unfortunately now moving back to C#, .NET, Python due to forced change to subscription model by NI. 8^{
0 Kudos
Message 4 of 6
(2,721 Views)

The example is in Labview software.You need to click in Help and select Find Example.

 

example code.png

 

 

 

I've modified a little bit the example, to have an output in the module 9263.
But the signal is really not fine. I don't know where's the problem.
My Project is in  attach

Thanks for your answer

Download All
0 Kudos
Message 5 of 6
(2,689 Views)

Hmmm, I did search for it but it's not on my system.  Perhaps it's a LabVIEW 2014 example.  I'm still using 2013 so I can't open your code.  Did you try a different example or just write your own sine wave code?  Generating a sine wave is a very easy task for LabVIEW.  If that particular example is really buggy just avoid it and use something else.  You could even just use the lowly DAQ Assistant.  Smiley Surprised  I won't tell anyone.  Smiley Wink

LabVIEW Pro Dev & Measurement Studio Pro (VS Pro) 2019 - Unfortunately now moving back to C#, .NET, Python due to forced change to subscription model by NI. 8^{
0 Kudos
Message 6 of 6
(2,663 Views)