Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

How to drive a digital output high when counter reaches a value?

Hello,

 

I have found a few examples addressing this problem but they are VIs and I am implementing this solution in C# so they are not entirely applicable. I would like to drive a digital output terminal high when my counter reaches an arbitrary value. How can I do this?

0 Kudos
Message 1 of 4
(2,666 Views)

Hello b!tmaster,

I have found a few examples in C# using counters and digital events which you may be able to adapt to your application.

 

"NI-DAQmx: Counter Measurements - Count Digital Events - Buffered Finite with External Clock in .NET"

http://www.ni.com/example/30831/en/

"DAQmx - Count Digital Events with Pause Trigger - C#.NET and Visual Basic"

http://www.ni.com/example/29916/en/

 

Another observation is that, if you can open the LabVIEW examples, you can adapt the architecture of the examples to your application. This is because the DAQmx calls are similar between LabVIEW and other languages. 

0 Kudos
Message 2 of 4
(2,621 Views)

Jordans,

 

I will check that stuff out thanks.

0 Kudos
Message 3 of 4
(2,614 Views)

This isn't exactly a solution but I ended up using the default ctr0 output terminal (P1.0) for the device I am using (NI USB-6218 BNC) instead of triggering a digital output.

0 Kudos
Message 4 of 4
(2,594 Views)