08-22-2013 08:38 AM
moderator 1983
i tried that enqueue element at opposite end also but as dkfire explained may be because of that i am not able to execute any other event after that because it is not going back to event staructure.
dkfire and mike porter
i tried with producer/consumer also the template example that is provided in examples, but not able to run continuously,
as dkfire said
In the Producer you will have the event structure, that alway is ready to handle events.
The producer will be your current state mashine, without the event structure.
can you elaborate more because i am not able to interpret what you are trying to explain.
08-23-2013 02:27 PM
I tried the code with producer consumer also withour using event structure as dkfire said but still facing the same problem, may be i have not implemented it correctly but not able to run 2 or more cases simultaneously, any other suggestion or approach that i can use to implement the desired functionality.
Below i am attaching the vi in which i am using producer consumer.
08-23-2013 03:05 PM
changing the mechanical action of the buttons to "switch when pressed" (or replacing the switch with a pushbutton, which better conveys the expected action) will probably help.
08-23-2013 03:15 PM
Thnaks bilko fos the reply,
i tried that also but that is working only for one button that i am pressing first if i will press rise time first than it is updating continuously but other case structure in this case fall time is not executing, similarly if i press fall time first than it will uodate continously but again no output for rise time.
aand there is one bug in the program that producer consumer that i am not passing initialize state in the producer loop in rise and fall time case structure,
below i am attaching the program again after correcting the error.
08-23-2013 03:22 PM
why don't you just have one button that executes a rise times and fall times until "unpressed?" (i was under the impression that you wanted one to happen or the other; not both at once)
08-23-2013 03:42 PM
i cannot have one button because it is not always compulsory that user will press both the buttons , it depends on user weather he want to see both simultaneously or one by one. i want to know as in all architecture weather it is producer/consumer, master/slave or state machine, we are using case structure to execute diferent cases so is there any method that we can run 2 or more case structure simultaneously or i need to change the coding style or need to apply some logic to run 2 or more cases simultaneously.
08-23-2013 04:00 PM
Only one case of a case structure will execute each time the structure is called.
If you want to measure Rise Time, Fall Time, Rise Time, Fall Time... you need to enqueue both cases.
Lynn