Quantcast
Channel: Counter/Timer topics
Viewing all articles
Browse latest Browse all 1250

How to count internal clock edges?

$
0
0

Hello,

 

I am working on an application using a NI USB-6218 BNC device that is going to drive a pair of digital IO lines high or low depending on the number of edges counted on one of the counters. I would like to use the counter0 (ctr0) and the internal device clock as the counter's source. However, I am having trouble getting this to work when I create a count edges channel as follows...

 

_myTask.CIChannels.CreateCountEdgesChannel("Dev1/ctr0", "ctr0", CICountEdgesActiveEdge.Rising, 0, CICountEdgesCountDirection.Up);

 

I suspect that the line of code above creates a channel and sets the source to my devices default ctr0 source terminal (P0.0). If I want to count internal edges, do I have to explicitly tell the created channel to use the internal clock as its source?


Viewing all articles
Browse latest Browse all 1250

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>