Count Match Event [CntMatch]

This is a sample that checks the operation of the counter device count match function.

When this function is used, it is possible to detect that the count value reaches the specified value (count match) with the "Status" VI, and it is also possible to output a one-shot pulse at the timing of the count match.


Front Panel

 

 


Block Diagram

 

 


Sample Explanation

In this sample, the channel number "CntChannel" of event setting, preset, and status display is "EventChannel".

Procedure for use

1. Make settings in "Channel Setting" column
  For "BoardType", select "Busmaster Type" for type with sampling function, "Common Type" for other cases

2. Set the "Count Match ・ One-shot Pulse Setting" column
    - Specify the channel number to be set with "EventChannel"
    - Specify the count number that causes a count match with "ComparisonValue"
    - Specify the width of the one-shot pulse to be output at count match with "PulseWidth"

3. In the "Start" column, specify the channel to count
    You can specify one or more any channels

4. After executing VI, press "Counter Start" to start counting

5. By pressing "Counter Stop" during counting, you can pause counting

6. Please press "Stop" button to end operation

 

About how to read "Status" column

   - "CntStatus" is the status value of the counter input and will change even if the count is not started
   - "Count" of "CountMatch" will light once when the count matches
   - "Times" of "CountMatch" indicates the number of count matches, so it becomes 1 after the count matches

For details of each item, please refer to "State VI - ⑥ Counter input" in the VI Reference.