LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I build a table with the time values of a timer from a while loop


Unfortunately I don't  have the LabVIEW Report generation toolkit for MS office . Is there another possibility?
Sorrry Steffi, I am not aware of any other method to achieve that.
 
Let's hope someone else in this forums comes up with a solution for that
 
 
I have LabVIEW 8.0 on my system and hence could not open the VI( its built on a higher version) that you have attached
So cannot precisely answer your other query eitherSmiley Sad
 
 
0 Kudos
Message 11 of 21
(1,646 Views)

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

0 Kudos
Message 12 of 21
(1,637 Views)

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

0 Kudos
Message 13 of 21
(1,630 Views)

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!

0 Kudos
Message 14 of 21
(1,629 Views)
Hi Steffi,
 
Been kinda busy recently,  I hope me and Dev have helped you out.  Feel free to ask more questions though.
Craig
 
LabVIEW 2012
0 Kudos
Message 15 of 21
(1,617 Views)

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

 

0 Kudos
Message 16 of 21
(1,610 Views)
Hi Steffi,
 
If your aim is to stop the DAQ loop with the local variable (Which you are doing) and wait for the DAQ to finish, you could use "Unbundle by Name" on the error string from the ouptup of your DAQ to get the "Status" Boolean from the error string.  Wire this to a Boolean AND with the Local Varible and make the result of these two stop the While loop.
If your application is slightly different you could use any number of Boolean operators to stop the loop when and how you you ask it too (For example wait for DAQ to finish OR Local Variable).
Regards
Craig
LabVIEW 2012
0 Kudos
Message 17 of 21
(1,606 Views)

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

 

0 Kudos
Message 18 of 21
(1,595 Views)

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!!

 

0 Kudos
Message 19 of 21
(1,569 Views)
Hi Steffi,
 

But I was wondering why you use the shift register?

I use a shift register to store the 2D array elements from previous iterations, so that I can include the values of present iteration at the end of the array and update the Table display


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

0 Kudos
Message 20 of 21
(1,561 Views)