07-05-2005 03:36 AM
07-05-2005 03:52 AM
Hi,
You need to have your "P detection code" separated from your sequence structure and running in paralel.
Use a diferente while loop for each other with no dependencies.
Look at attach example.
Paulo
07-05-2005 04:10 AM
Hi,
Forgot to mention I have V. 6.1 Developer.
07-05-2005 04:11 AM
07-05-2005 04:18 AM
07-06-2005 05:26 AM
James,
Indiana is correct, my take on this is similiar.
If you have a 3 element sequence structure for example which runs if 'P' is returned from your COMs thread, you will need to query a variable in each element of the sequence in order to suspend execution of the next/remaining elements in the sequence if this event occurs. You can do this by reading the variable that your COMs thread sets using a case structure in each element of your sequence. In order to re-run your sequence if 'P' is returned during the execution you can simply set the suspend variable and ensure the code is in a while loop to recall the code.
See the attached example code/screen shot:
This is however not an elegant solution and the best way would probably be using the events structure and a user event to queue the P events. This is available in 6.1 but I believe its the professional package. See also my implementation using this method, again attached below:
Hope this helps,
Kind Regards
Steven Bird
Applications Engineer
National Instruments
07-06-2005 05:27 AM