Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

How should i read two counter through software of Ni 6602

Hello all,
 
i want to know that how should i read two counters same time of NI 6602  using c#.net.
 
Please  guide me.
0 Kudos
Message 1 of 5
(4,903 Views)
 

Hello,

There are some great NI examples that download with the DAQmx driver.  Please refer to the following KnowledgeBase for the location in which they download on your computer.  Since I have the 8.6.1 driver, my examples were located at C:\Documents and Settings\All Users\Documents\National Instruments\NI-DAQ\Examples\DotNET2.0\Counter

AE KB 47CCSQ5B: NI-DAQmx, NI-VISA and NI-488.2 .NET Example Locations

 

 

I used the example titled Count Digital Events, which is located under C:\Documents and Settings\All Users\Documents\National Instruments\NI-DAQ\Examples\DotNET2.0\Counter\Count Digital Events\CountDigEvents\cs, where cs refers to C#. 

Please note that there cannot be multiple counters in the same task for input operations.  Thus, to read/acquire from two counters you will need to open and run two of these examples at the same time.  For your convenience, there are also examples specific to other counter measurements in related folders.

Samantha
National Instruments
Applications Engineer
0 Kudos
Message 2 of 5
(4,882 Views)

Thanks sir,

now i am trying to fire external trigger for start  and stop of counter ,

please guid me.

 

 

0 Kudos
Message 3 of 5
(4,878 Views)

Thanks sir,

now i am trying to fire external trigger for start  and stop of counter ,

please guid me.

 

 

0 Kudos
Message 4 of 5
(4,877 Views)

Hello,

I have a couple of suggestions for you to look into and determine which is best for you application. 

-  Use a Two Edge Separation task to count ticks and not seconds (by changing the units) between a start and stop trigger.  The two trigger signals will need to come from different sources.  The KnowledgeBase (KB) linked below describes the task in further detail.  This KB explains why a reference trigger is not recommended.  Open up the C# example in the Measure 2 Edge Separation folder from the location listed in the previous post.

AE KB 2IK8FRXA: How Do I Count Digital Edges Between a Start and Stop Trigger on an NI 6602 Counter/Timer Board? 

 

 

 

-  Use an Arm Start Trigger as a start trigger with the Count Digital Event task.  It will only allow of a start trigger and not necessarily a stop trigger.  The Developer Zone link below provides a coded example. 

Developer Zone: DAQmx - Event Counting on Multiple Counters with Digital Start Trigger (TIO) - LabVIEW - ANSI C – CVI 

 

-  Use an Arm Start Trigger to synchronize multiple Count Digital Edge tasks and paired with Pause Triggers to pause acquisition based on source level. 

Developer Zone: Synchronous trigger start of multiple counters and pause independently 

 

 

 

For more information on the type of triggers mentioned, refer to the DAQmx Help.

Samantha
National Instruments
Applications Engineer
0 Kudos
Message 5 of 5
(4,772 Views)