07-03-2008 03:57 PM
Try putting your dequeue function before the case structure???? As it is now, the case structure essentially executes first ahead of the comparison function, so it is really operating on either the timeout or the command from the previous iteration of the while loop.
How were the error wires wired up? Eliminating error wires should not help a program run better. Though if you have an error and that is fed through the loop on a shift register, then once an error occurs, it will return to the beginning of the while loop and could cause problems with the execution of the next iteration of the while loop. In those cases, ordinary tunnels would be better for handling the error wire.
03-31-2015 08:58 PM
if i have file path Control Varaiale.
I need to share my file location to many write function(Subvi)..
How to do this without local variable or Propert Node (Value).
If you Says local Variable is Not good ..
is there anyother solution LV has .
in C language (we are using Global Variable)
Here(LV) what to do?
03-31-2015 09:08 PM
03-31-2015 09:10 PM
03-31-2015 09:26 PM
03-31-2015 09:43 PM
Where are all these other subVIs? In different loops, in different states? Where is the path created? Front panel, another subI
For yor questions , i have created Vi files ..
and shows Image and also attached Teswt Code.
03-31-2015 09:54 PM
03-31-2015 09:59 PM
okay thanks ..
04-01-2015 04:29 AM - edited 04-01-2015 04:33 AM
Also do not loop on the Numeric element. This loop makes no sense at all despite hogging one core.
Remove the "Stop" local variable and replace it with a wirde sourced by the stop button in the appropriate "Stop: Value Change" event.
Remove the value property nodes from "Numeric" and replace the reading node with the Numeric terminal (the element you currently have in the top loop) and create a writing local variable for writing values back in the Numeric element.
Norbert
EDIT: Just to clear things up for LV:
- The Wire is The Variable
- A node executes when all inputs provide valid values, once a node finishes execution it passes valid values to all of its outputs
Putting both items above together, you should learn to implement DATAFLOW. The wire is the best option to pass data (performance wise) and additionally defines order of execution in your VI!
04-01-2015 06:38 AM - edited 04-01-2015 06:40 AM
The other key idea you are missing is error checking. There are very many things wrong with the code you posted, but let's take one example. In the main loop you have two blue icons one is write and one is read. You are reading back data to make sure it changed -- which is curious logic in and of itself, but we'll let that go for now.
You have a sequence structure so the two actions run in the right order. But ask yourself this: If the write generates an error, why bother with the read? You already know the write failed! If you tie the write and read together with an error cluster you get simpler code that makes more sense logically.
In fact, if you check for and use errors the entire need for the read goes away. If writing to the INI file did not return an error the data is there. No need to read it back.
Mike...