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.
03-29-2012 06:38 AM
Hi,
I am trying to write array to the digital output line.
If I don't do any changes with the array size the result is ok,but If
I am trying to insert an array of different size during the running time I don't get the desired result.
I am new to Labview(So maybe I am working in the wrong way)
I will be glad to get some comment about this way of writing to the digital output line.
The files are attached.
Thanks Leonid,
03-30-2012 12:04 PM
Leonid,
Thank you for using NI forums! I ran your code, and I didn't run into any errors. What are you wanting to do? What is the desired result? What would you like to see different?
Katie
03-30-2012 12:29 PM
Hi Katie and thanks for the reply.
I try to use the digital output line for PWM and frequency tuning.
My idea was to build array which size is the ratio between the clock frequency and the desired output frequency.
The values(1,0) in array are arranged according the duty cycle.
When I run the program the results are accurate(I was using oscilloscope),but when I changed the value of the frequency (thus changing the size of the array) I did not get the desired result.
When I changed the duty cycle the result was very accurate.(The size of the array did not change).
Is it a problem the changing of the array size when I am writing to the digital line?
Thanks,
Leonid
04-05-2012 12:24 PM
It sounds to me like you should consider generating the PWM with a counter rather than a digital line.
You can change freq and/or duty cycle on the fly seamlessly without needing to manage big arrays
full of digital state info.
-Kevin P
04-05-2012 01:59 PM
Hi Kevin,
I need to generate 32 different signal so the 4 counter output ports are not enough.
Thanks,
Leonid
04-05-2012 01:59 PM
Hi Kevin,
I need to generate 32 different signal so the 4 counter output ports are not enough.
Thanks,
Leonid
04-05-2012 03:49 PM
Gotcha. Sorry, I'm running 2010 and can't open the example you posted.
-Kevin P
04-05-2012 04:06 PM
Thanks anyway