Counter Storage Modes - 1794-VHSC

The store count feature allows the module to store the current count value of the associated counter. Store count is triggered by the state of the gate/reset terminal on the module. The stored count of each counter is placed in the Ch0StoredCount and Ch1StoredCount members of the input module-defined data type. The stored count value remains until a new trigger pulse is received at the Gate/Reset terminal. When a new trigger pulse is received, the old count value is overwritten by the new value.
There are four counter storage modes for manipulating your counters. In addition, you can disable the feature entirely. Choose from:
  • Store Count Disabled
In this mode, the counter storage mode is disabled and the feature is not used.
  • Store/Continue
In this mode, the leading edge of a pulse input on input Z (gate/reset) terminal causes the current value in the counter to be read and stored. The counter will continue counting. The stored count is placed in the Ch0StoredCount and Ch1StoredCount members of the input module-defined data type. The stored count information remains until it is overwritten by new data.
1756hscmode1 (2)
  • Store/Wait/Resume
In this mode, a rising edge of a pulse input on the Z Gate/Reset terminal reads and stores the current counter value in the Ch0CurrentCount and Ch1CurrentCount members of the input module-defined data type, and inhibits counting while the gate/reset terminal is high. Counting resumes on the falling edge of the pulse at the Z Gate/Reset terminal. Mode 2 does not reset the counter, although it does store the count value. The stored count is available in the Ch0StoredCount and Ch1StoredCount members of the input module-defined data type. The stored count remains until it is overwritten with new data.
1756hscmode2
  • Store-Reset/Wait/Start
In this mode, the rising edge of a pulse on the input Z (gate/reset) terminal causes the counter to stop counting, read, and store the current count value in the Ch0StoredCount and Ch1StoredCount members of the input module-defined data type, and reset the count to zero. The counter does not count while the Z input on the gate/reset terminal remains high. Counting resumes from zero on the falling edge of the pulse at the Z input (gate/reset) terminal. The stored count is available in Ch0StoredCount and Ch1StoredCount members of the input module-defined data type. The stored count remains until it is overwritten with new data.
1756hscmode3 (2)
  • Store-Reset/Start
In this mode, on the rising edge of a pulse at the Z input (gate/reset) terminal causes the counter to store the accumulated count value in the Ch0StoredCount and Ch1StoredCount members of the input module-defined data type, and reset the counter to zero. The counter continues counting while the Z gate/reset input is high. The stored count is available in the Ch0StoredCount and Ch1StoredCount members of the input module-defined data type. The stored count remains until it is overwritten with new data.
1756hscmode4
The figures above show the store count feature operating on the rising edge of the gate/reset pulse. You can select these same features using the falling edge of the gate/reset pulse through the gate invert data type function. Gate/reset invert (Counter0Zinvert and Counter1Zinvert members of the configuration module-defined data type) is active in the store count, continuous/rate, and period/rate modes.
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.