LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Usage of timer in Labview

I had posted this question in the counter/timer board but did not get a single answer. I am trying here again.
 
Please explain how do I use a timer function in LabView 8.0 so that I can write a digital value to my PCI-6602 DAQ card every few minutes.
 
For example, it should write the first value at 00:01:00, the second value at 00:15:00 and so on. This is according to a test sequence file which is attached.
 
Moreover, should the software timer function of labview be used or is there any such hardware timer function on the PCI-6602 card which would be preferable?
thanks.
0 Kudos
Message 1 of 6
(3,319 Views)

Hi Techtalker,

one solution is to use a loop with a wait block. Build array´s with your data and connect them to the loop.

Mike

0 Kudos
Message 2 of 6
(3,312 Views)
The answer will depend somewhat on what accuracy you're looking for. For instance, does the event have to happen at exactly 1 minute into the test sequence? What about 1 minute, 10 seconds? Or 1 minute, 20 seconds? If your accuracy is pretty slack then you can use a software timer. If not, then you will need to use some sort of hardware timer.

A brief overview can be found here: Timing Deterministic Applications.
0 Kudos
Message 3 of 6
(3,306 Views)
Thank you both of you.I will look into it and get back to you in a few days.
0 Kudos
Message 4 of 6
(3,272 Views)

smercurio:

The accuracy can be a bit slack. If it is off by 10 or 15 seconds, it is ok so I guess I am going for a software timer. However, could you give an idea of how to use the hardware timer when I am using the PCI-6602 card.

thanks.

0 Kudos
Message 5 of 6
(3,193 Views)
Basically this involves using the DAQmx Create Timing Source VI to create a timing source for the timed-loop. You can set the timing source to be of a set frequency and then in the loop you just need to check if you're at the required multiple of your timing frequency. There's a couple of examples of how to do this within the examples that ship with LabVIEW. Open the Example Finder (Help->Find Examples), and do a search for "timed-loop". One example is called "Digital Input Output-Frequency Source".
0 Kudos
Message 6 of 6
(3,179 Views)