annulla
Visualizzazione dei risultati per 
Cerca invece 
Intendevi dire: 

how can i present a clk in my front panel?

Hi,
I want to present a clock to show how much time pass since the program start, i need it to work parallel to the main block
Thx
0 Kudos
Messaggio 1 di 11
3.852Visualizzazioni
What is your main problem : customizing a control to create a clock or to measure the elapsed time ? How should this clock look like ?
There is a nice example of a clock with dial and needles in this discussion. An easy alternative is to use a simple string indicator with a time format.


0 Kudos
Messaggio 2 di 11
3.846Visualizzazioni
Here is a little example that I have just written for you. A local variable of the stop button could be used instead of the notifier. I won't make the example to difficult to understand and therefore I didn't use an event structure to handle the press of the button in the main loop.

Feel free to post back if you need further help.
Scarica tutti
0 Kudos
Messaggio 3 di 11
3.835Visualizzazioni

JB

Thx for your help, but i can't open your files becouse they save to 8.5 and i have 8.2.1

I think i didn't explain my problem as well, I need a timer to show the elapse time since the program start.

Thx

0 Kudos
Messaggio 4 di 11
3.829Visualizzazioni


yechielo a écrit:

I think i didn't explain my problem as well, I need a timer to show the elapse time since the program start.


My example does exactly that ! Run the attached LV8.2 version and post back if needed.

Scarica tutti
0 Kudos
Messaggio 5 di 11
3.820Visualizzazioni
JB
Thx a lot for your help, that exactly what i need, but now I have a new problem
I need to stop the program when the user press the stop button (that's work) or the DAQ finish to sample, and that's not work.......
how i, synchronize the DAQ and the stop button to stop the program?
i add my program
0 Kudos
Messaggio 6 di 11
3.814Visualizzazioni
Your program makes no sense. You have no data acquisition running continuously. The only thing you have running is the elapsed time. If you are using the Run Continuous button, don't do that. It is not to be used for that purpose and you should never use the stop button on the toolbar. Put your acquisition/display/file write in the main while loop.
Messaggio 7 di 11
3.802Visualizzazioni

Dennis,

you right, I reorganze my program, the main idea in my program is to collect data from DAQ for knowm time, present the elapsed time in my front panel and in the end write the data to xls file.

my program need to stop if the DAQ finish to collect the data or the user press on stop button

now, the DAQ read data, the time presents but i can't stop the program when the DAQ finish to work

i add my program, any comments accepted

Thx for your help

0 Kudos
Messaggio 8 di 11
3.765Visualizzazioni

First of all, since the DAQ cannot be stopped, the stop button is useless. All you need is wait for the DAQ to finish, then stop the timer loop. Also, your sequence structure is useless, because the sequrence of events is entirely determined by dataflow. What's up with all these hidden indicators? If you can't see them, you don't really need them. 😉

I would not bulk up the code with all this fancy stuff (notifiers, time formatters, etc). All you really need is a loop that spins once per second and then display the iteration counter as HH:MM:SS. If you want fractional seconds, run the loop a bit faster, divide the iteration counter accordingly, and display it as DBL with a format of HH:MM:SS.ss, for example.

Here's a lightweight alternative. I left a few comments on the diagram. See if it makes sense.

Sorry, I don't have DAQ installed, so I cannot run your code or look at the DAQ express VI. How long is the DAQ actually taking?

 



Message Edited by altenbach on 03-09-2008 10:02 AM
Messaggio 9 di 11
3.751Visualizzazioni
Sorry, forgot to set the time format for the time indicator.
 
Overall, the code is not very satisfactory, because the DAQ cannot be interrupted and the code is linear. Better would be a program desinged as a state machine that runs when opened and starts out in a wait state.
Messaggio 10 di 11
3.745Visualizzazioni