05-16-2007 02:07 AM
05-16-2007 03:39 AM
Hi Craig:
Do you have an idea how I can stop the two while loops interdependent? When there's a specific case in the first while loop, the second should stop automatically (concurrently with the first one). If I wire the true or false value of the stop button of the first while loop to the second stop button the loops don't run concurrently anymore: (
Thanks a lot,
Steffi
05-16-2007 03:53 AM
Steffi,
Use a local variable of the switch of first loop to stop the second loop
Look at the attached VI
Hope this Helps
Regards
Dev
05-16-2007 04:07 AM
Hi Dev:
I work with LabVIEW 8.2 and I can't save it for LabVIEW 8.0: ( But thank you anyways!!!
No worries: )
Thanks!
05-16-2007 08:39 AM
05-16-2007 09:18 AM
Hi,
you helped me out a lot! Thank you very much! But I still have some issues. In the second while loop I have two DAQ Assistants. When running this while loop on its own (without the second loop), I wired the desired time to the time out of the DAQ Assistant and the error out to the stop button of the while loop. The loop ran the desired time and there was no error message. But now I need the stop button for the local variable, so I didn't wire the error out of the Assistant to the stop button any more. Then it still stops after the desired time, but there is the error message 200560Wait until done and I can't use the local variable to stop the DAQ Assistant before the desired time elapsed. Do you have an idea why? How can I stop a DAQ Assistant within a while loop? Or how can I run the DAQ Assistant a desired time?
If you're too busy don't worry. You really helped a lot yet!
Thank you!
Steffi
05-16-2007 09:33 AM
05-18-2007 03:03 AM
Hi Craig,
I don't want to wait for the DAQ to finish when I stopped the loop with the local variable, I want to stop the DAQ Assistant when stopping the loop OR I want to stop the loop when the DAQ Assistant finished. I wired the error cluster of the DAQ Assistant to the unbundle by name and then to the stop button of the loop and to a local variable. This works.
I also wired the specific time I want to run the loop to the time out of the DAQ Assistant. Is that right? For example: I wired 20sec to the time out of the DAQ, then the loop is running for 20sec and after that there's no error message. That' great.
But I also wired some other local variables from the other loop (I have two while loops) to the stop button of my DAQ loop (with an OR), e.g. there is a local variable for a stop button. But when I push that button before the 20sec, nothing happens. My DAQ loop doesn't stop as the other loops does?!
Do you know how I can stop the DAQ Assistant before timed out? I tried to wire the local variables to the stop entrance of the DAQ and set the time out to never-ending, but then the loop isn't running and says that the DAQ is reserved?!
I'm sorry, I have no idea why it isn't working the way I want it to: (
Thanks!
Steffi
05-21-2007 03:00 AM
Hi Dev:
maybe you can help me again? It's concerning the table. Thanks to you marking the cells is no problem any more.
But I was wondering why you use the shift register? I tried it without it (putting the constants into the while loop), but then the values in the table are "blinking". You only see them for a short time when they were created. Is that why you use the shift register? I also tried it with the shift register, but then it writes the first values of the table at the end again. For example:
0sec 1V
0,6sec 2V
1,2sec 3V
...
0sec 1V
0,6sec 2V
Do you know why?
I also don't know why you use two "0"s as constants for the string. Can you explain this?
I have another question concerning your case structure for making the marks. How did you create the constants for the cluster of "bundle by name"? I created a constant for the cluster, then I tried to create numeric constants and put them in the cluster constant. But how can I make sure that the constants are for the raws and columns?
I'm sorry, I'm an absolute novice concerning this.
THANK YOU!!
05-21-2007 06:32 AM - edited 05-21-2007 06:32 AM
I also tried it with the shift register, but then it writes the first values of the table at the end again.
This will happen if you do not clear/empty the table or do not initialise a shift register ( by onnecting an empty array at the initialization of shift register) before each Run
If you observe my example vi, You will notice that at the beginning of the while loop, I wired an empty 2D string array to the shift register/ Property node of Table to clear the shift register and the Table
I also don't know why you use two "0"s as constants for the string. Can you explain this?
I have another question concerning your case structure for making the marks. How did you create the constants for the cluster of "bundle by name"?
Here is the simplest method to create the constant: Create a 'active cell' property node for a table, Right click on it>> in pop down menu, create>> constant and you get the required cluster ![]()
the two "0"'s have no significance.
If you observe, I am wiring 'i' value to row value in the bundle by name function( this will be the corresponding row number for each iteration 0,1,2 etc) and a constant value of '1' to access second column ( mind you: column number begins from '0'. So index of your first column is '0' , index of your second column is '1')
Now, only the rows in the second column are selected for color change in each iteration
Message Edited by devchander on 05-21-2007 06:37 AM