From 11:00 PM CST Friday, Apr 11th - 1:30 PM CST Saturday, Apr 12th, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From 11:00 PM CST Friday, Apr 11th - 1:30 PM CST Saturday, Apr 12th, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
07-08-2013 04:32 PM
I am fairly new to LABView. With my vi I want to be able to change the frequency while the vi is running ,but how do I do that without stopping it and running it again? I would also like to add an LED that corresponds to the frequency. How would I do this. It seemed easy enough but I couldn;t get it to work. I've attached my file.
Thank You
07-08-2013 06:23 PM
I've modifed your VI to use Statemachine. You specify frequency when you create the counter so when you need to change the frequency, you have to shutdown the task and reconfigure. Hope this helps. I've done this in LabVIEW 2012.
07-09-2013 07:30 AM
Is there anyway of reconfiguring counter frequency without shutting down the task?
Thank You
07-09-2013 08:28 AM
I am afraid not. I tried looking for property nodes that expose frequency but since you are creating channels that generate pulses at a particular frequency, I believe you do have to shutdown and reconfigure.
Anyone else have inputs on this ?
07-09-2013 09:00 AM
Where and how would I attach a boolean LED that corresponds to the pulses generated by the counter?
Thanks
07-09-2013 09:05 AM
If you use an event structure you should be able to change the frequency at any point. Put your main code in the timeout case, and then make an event for frequency value change. Use a shift register (right click on the event structure) to store the frequency while it runs.
For the LED you would need to know something about these pulses so you can compare them. If it is a pulse at 1 then on each loop you could check that the value is equal to 1 and connect that comparison to the LED.
07-09-2013 09:14 AM
You would place the conditions for LEDs in the "Configure" Case structure selection.
07-09-2013 09:18 AM
There were couple of bugs in my code. Fixed them and re-attached.
I'd suggest using the Shipping example of statemachine that LabVIEW comes with. It has an Event structure built into it. You could use that, and copy portions of the code that I modified and you could have a nice robust customized code.
07-09-2013 09:23 AM
Sorry to trouble you again. I have version 2011 of LABView. and it keeps giving me an error when loading the file. How would I remedy this?
Thank You so much for your help thuis far
07-09-2013 09:30 AM
Here you go. I've re-saved it in 2011 🙂