Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

Trying to Generate Digital Pulse on Demand using DAQmx M - series and I cant why?

Dear all;

I am using Windows Xp, LabView 7.0

I am using the following example

Can I do this whithout using the While loop. I know its a stupid question and I am sure you can.

To clarify I want to generate a pulse evrytime I get a pulse on the source of the Start trigger

anybody

thanks in advance

Message Edited by anatd on 12-05-2005 02:56 PM

0 Kudos
Message 1 of 4
(3,591 Views)
anatd,

It is certainly possible to use the following example without a while loop, but then you would need something to halt the "Clear Task" until you are done generating pulses. Additionally, the loop checks for errors as the task executes. If all you want to do is some processing in parallel with error checking, it is possible to merge the two into the same while loop.

Hope this helps,
Ryan Verret
Product Marketing Engineer
Signal Generators
National Instruments
0 Kudos
Message 2 of 4
(3,574 Views)
Ryan;

Thanks very much for your help.

However I think I didnt explain myself correctly. I want to do the following.

I want to produce a pulse everytime I get a pulse. Once the application starts running I get a pulse every 50ms so again Evertime I get a pulse I want to produce a pulse and then maybe if I do not get a pulse for say 100s then the application should terminate. The problem with the while loop is that its not a background task.

any ideas

thanks

anatd
0 Kudos
Message 3 of 4
(3,573 Views)
Anatd,

Using LabVIEW 7.0, I can think of no solution to accomplish what your application requires. In 7.1 and later, you could use change detection on your M Series to signal changes to software. If no change is detected for an extended period, you could terminate the pulse generation. It would also be possible to accomplish something similar with an additional counter, but you are already using both of yours.

If instead you use the Gen Dig Pulse-Retriggerable.vi example, this only uses a single counter. You could then use your other counter to count edges (on the trigger signal). If the count does not increase for 100 seconds, you could have your application terminate.

Finally, you could just have a stop button that the user can press to terminate the application. It is important to note that LabVIEW releases the CPU whenever the "Wait until next millisecond multiple" VI is called. You should not worry about CPU usage in the while loop in your application.

Hope this helps,
Ryan Verret
Product Marketing Engineer
Signal Generators
National Instruments
0 Kudos
Message 4 of 4
(3,564 Views)