11-25-2005 03:13 AM
11-28-2005 04:50 AM
11-28-2005 05:14 AM
11-28-2005 05:36 AM
11-28-2005 09:15 AM
11-28-2005 09:32 AM
11-28-2005 09:54 AM
11-28-2005 10:28 AM
Manuj,
You seem to have misunderstood the way in which LabVIEW processes data. The code that you have produced will run in exactly the same way without the need for the case structure.
The code does not actually run the data from the previous case. It is merely processing data from the previous loop iteration, regardless of the case. If you were to remove the case structure, leaving only one copy of the code intact, and remove the toggle switch you have produced, or used the shift register which, I assure you would have worked, then you will have exactly the same functionality.
I have attached an example that uses the shift register to toggle cases, but also iterates that the case structure is not needed by using the same feedback node (and code) without a toggle switch or case structure.
Hope this helps you optimize your code
Regards
AdamB
Applications Engineer
National Instruments UK
11-28-2005 11:08 AM
11-28-2005 11:28 AM
Manuj,
With the case structure you are taking the data first... Then you do the proccessing on the previous data,whilst also indexing the new set of data. Then you pass that indexed data to the feedback nodes to be stored till the next itteration
If you take out the case structure:
The data is aquire, at the same time the processing is occuring on the previous peice of data. Then the data that has just been aquired is indexed and stored for the next loop itteration. If you do not use a case structure you will find that the code will tend to run in a more parallel fasion.
A more reliable method would be to use a producer consumer template to cue the data for processing when the computer resources are not being used up by the aquisition.
The LabVIEW Basics I and II courses on offer, here in Newbury, may be benificail if you want to expand your knowledge of dataflow concepts and Producer Consumer loops which are paramount to coding efficiently.
Kind Regards
AdamB
NIUK