ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Gaussian curve

Hi,

 

I want to simulate a Gaussian curve in LV like there is option to simulate sine wave. Similarly, I want to generate a shape of Gaussian curve. I have tried with different techniques but still struggling.

 

Please help

 

Thanks in advance

0 Kudos
Message 1 of 12
(4,663 Views)

Would this help?

0 Kudos
Message 2 of 12
(4,652 Views)

Thanks for your reply, but how can I have only one curve since they appear to be many ?

0 Kudos
Message 3 of 12
(4,642 Views)

Well, remove all the code for the other curves. How hard could it be? 😄

 

(If you have problems with this, you should do a few LabVIEW tutorials first.)

0 Kudos
Message 4 of 12
(4,631 Views)

Hi, 

I was able to implement the attached program and it does outputs a gaussian curve on the graph but i am trying to get something when I press run in LV so I could actually see the gaussian curve developing on the graph. Like there is option to genertae sine/cosine and you can see the output generation of the waveform. please help if possible.

 

thanks a lot

 

0 Kudos
Message 5 of 12
(4,578 Views)

Place a FOR loop around the chart terminal (autoindexing on the array) and also place a small wait (e.g. 100ms) inside the for loop.

0 Kudos
Message 6 of 12
(4,569 Views)

Thanks a lot. That works perfectly fine but I have one more question. Now I want the output of gaussian to be connected to Arduino's PWM pin so I can light up the lights and their intensity will increase with the waveform of the gaussian curve. when I made the connection they happen to be two different types. If you could have a look at the attached updated version of the same VI and suggest what can be done?

Thanks once again

0 Kudos
Message 7 of 12
(4,555 Views)

If you want to send it point-by-point to the arduino, that also belongs inside (not after) the second FOR loop. Sorry, I don't have your toolkit, so I don't know what datatype it expects. can you tell us?

0 Kudos
Message 8 of 12
(4,548 Views)

that arduino pin expects 8bit unsigned integer data. I have attached a screenshot for you.thanks

0 Kudos
Message 9 of 12
(4,541 Views)

Two mistakes. You are feeding ot DBL data instead of U8 and you are feeding it an array instead of a scalar.

 

You simply need to scale the gaussian to the range 0..255, convert it to U8, and place the arduino tool inside the FOR loop.

0 Kudos
Message 10 of 12
(4,535 Views)