From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
01-18-2010 07:19 AM
HI everyone,
I trying to simply make a LED blink with a simulated square wave. It's been 3 hours I'm searching why the dynamic data convertion does'nt update every iteration (it seems to be the problems).
I tried with every option of the "convert from" object but i did not succeed (I'm desperated)
in the .vi enclosed, I choose "most recent value"
could have a look at my .vi ?
Thank you very much,
Guillaume.
Solved! Go to Solution.
01-18-2010 07:30 AM
Hi,
you are using the simulate signal VI to create a waveform array. If you want to make your LED blink you would need to index through the array at some specified rate.
01-18-2010 07:56 AM
thank you for your reply.
I chose most recent value so I don't understand why do I need to index ?
If I choose "single scalar" for example; it does'nt work either !
in my dynamic data should be 1 channel am I right ?
encolsed I attached the .vi with indexing.
01-18-2010 08:01 AM
Your second example has the sample problem - the waveform in the tunnel is a contant so you are always reading the same point. You need to index THROUGH the array. It might be easier to toggle a single boolean every xms - do you have any more detail of your application?
01-18-2010 08:10 AM
01-18-2010 08:26 AM - edited 01-18-2010 08:27 AM
ok,
I've noticed the waveform is a constant throught the tunnel but I still don't understand why !
My actual application is to represent a camshaft position with a gauge.
I'm simulating the crankshaft angle sensor :
so I have one signal for the speed (a tooth every degree).
and I have the top dead center signal, outputing one tooth when the camshaft is a the top.
I measure the elapsed time since i did not see the TDC tooth (in sec) and multiply this by the speed (in °/sec) so I end up with the number of degree travelled and then and send this info to the gauge.
I tried to add comment in the .vi to make it clearer.
Sorry if it is not well programmed, I am a newbie in Labview.
and sorry for my english, I'm french 🙂
and thank you for your help !
Guillaume.
01-18-2010 09:10 AM
I have updated your second VI to get you started.
I have reduced the number of points in your waveform. Also, i have converted to a DBL array is this is the type your simulate signal VI is creating.
The for loop in the while loop is to give you an idea of what to do although you should be able to come up with a better solution. I have used auto indexing
Hope this helps
01-18-2010 09:35 AM
01-18-2010 09:41 AM
01-18-2010 09:59 AM
Thank you for your quick answers,
I have a question, in problem2.vi, the LED "blink speed" is not related to the frequency of the simulated signal. (it seems to be not)
I mean the LED should blink twice a second if the input frequency is 2 hz, and that's not the case.
thxs,
Guillaume.