Case statements in parallel 
Author Message
 Case statements in parallel

Hi

For an application I am developing labview, I have an outer while loop and a
number of True/False statements within.
The true/false statements are activated based on the state of the push
buttons in the front panel. At any point, as the while loop executes, only
one or else none of the case statements will be true. All the case
statements are independant.

The code within one of the case statements is time-critical. Should I be
concerned that the processing of this time-critical case statement will be
affected by the other case statements running in parallel (though these will
be false and exit immediately).
Is there a way to determine the execution sequence and timing of different
sections?

Thanks,

Ajay



Sat, 20 Mar 2004 03:21:23 GMT  
 Case statements in parallel

Quote:

> Hi

> For an application I am developing Labview, I have an outer while loop and a
> number of True/False statements within.
> The true/false statements are activated based on the state of the push
> buttons in the front panel. At any point, as the while loop executes, only
> one or else none of the case statements will be true. All the case
> statements are independant.

> The code within one of the case statements is time-critical. Should I be
> concerned that the processing of this time-critical case statement will be
> affected by the other case statements running in parallel (though these will
> be false and exit immediately).
> Is there a way to determine the execution sequence and timing of different
> sections?

> Thanks,

> Ajay

    If I understand correctly, this could well be a job for a "State Machine".
This will should ensure that your Case structures don't have to be in parallel .
Just search  www.ni.com for "State Machine" for some good info on using this
technique.

Dave.



Sat, 20 Mar 2004 06:23:42 GMT  
 Case statements in parallel
Ajay,

The first answer is very good, you may want to learn about the "state
machine" arquitecture. One other suggestion I wanted to add is to use
a sequence type flow, if you really want to have this case structure
in which you have your time critical operation been checked the first.
That is, wire a dummy variable, or if you have an error flow wire is
better, and be passing this data from case to case, in which the first
one to be wired is the critical case structure... and then pass this
data to the other cases... in this way you are going to control that
the first case is checked first, it doesn't matter if it is true or
false it will go on, so the dummy variable wire will control a flow...
try this or even better use sequence structures...

Good luck!...

Nestor Sanchez
Applications Engineer
National Instruments



Sun, 21 Mar 2004 00:03:53 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. case statement flipflop statement

2. difference if statement with case statement?

3. Something else for a change / Parallel Computer for APL - in case you didn't know

4. parallel case

5. parallel case in verilog

6. parallel case

7. [Fwd: Case statements, decision trees, and good OO design]

8. SUNOS NAWK - TOLOWER - In a print statement convert string to lower case

9. CASE STATEMENT

10. Detecting Multiple Events (was: Case Statements...)

11. Case Statements...

12. SIMPLE Case statement

 

 
Powered by phpBB® Forum Software