Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

How To Use - Gen Dig Pulse Train-Continuous.vi

Using Gen Dig Pulse Train-Continuous.vi it outputs the correct signal as specified but it will not change when I change the value in a control.
For example if I set up initially with Frequency=500Hz, duty cycle=0.5, Idle=LOW, on Dev1/ctr0 then hit run it outputs the signal. However if I change any of these parameters, f=100Hz, the output does not update. I have to stop the VI then run it again to update the output.

SO, how do I get the output to update whenever I change the value of a control? Is there some sort of Restart command?
If I use an event which occurs on a change of value of frequency for instance what do I need to do in that event for it to update?
......Please help!

- Thanks,Aaron
LabView 7.1
Win2000, P4

0 Kudos
Message 1 of 4
(4,484 Views)
 

Looking at the code for that example, there is no data flow to update pulse specs once the program is started.

Is this what you are looking for?

http://sine.ni.com/apps/we/niepd_web_display.display_epd4?p_guid=DE27921DB53A4D8DE034080020E74861 

~~~~~~~~~~~~~~~~~~~~~~~~~~
"It’s the questions that drive us.”
~~~~~~~~~~~~~~~~~~~~~~~~~~
0 Kudos
Message 2 of 4
(4,478 Views)
OK, but it still does not update the output when I write/change the frequency. What am I doing wrong?
Attached are my 3 simple VIs:
6601Counter_Write_Read.vi - main VI which sets the frequency(PFI_32) and then read/displays it from another source(PFI_38)
RPM_3.vi - Reads the frequency from CNTR0
GenDigPulseTrain-ChangingSpecs.vi - Generates the pulse train

Thanks for your help, Aaron
0 Kudos
Message 3 of 4
(4,477 Views)
Arron,

The reason that you are not able to update you counter output is that you have placed the "GenDigPulseTrain-ChangingSpecs" VI as a sub VI within "6601Counter_Write_Read." Values will only be passed to it when it is initially run. In fact, the way your code is written, the while loop within "6601Counter_Write_Read" will only execute its first iteration. Try opening up the block diagrams of all your VIs and enabling "Highlight Execution" (the light bulb) to see what I mean. This should give you a little more insight into dataflow programming.

In order to remedy this, you would need to run
"GenDigPulseTrain-ChangingSpecs" and "RPM_3" simultaneously (not using "6601Counter_Write_Read") and manipulate the controls on their respective front panels.

Hope this helps,
Ryan V.
National Instruments
Ryan Verret
Product Marketing Engineer
Signal Generators
National Instruments
Message 4 of 4
(4,451 Views)