Topic: DMD0491

Help File Version: 2.9.4.37

HSCNT - High Speed Counting


The High Speed Counting (HSCNT) instruction is a helper for the HSIO High Speed Counting function. This helper instruction does not setup the high speed counting; that setup is still performed in the System Configuration. It does show the current status of the configured discrete input and the Device's associated structure fields, and it makes sure the discrete I/O points used in the high speed counting function shows up in the project's cross reference.

 

Note: the rung containing this instruction can not have any input ladder logic.

 

 


Parameters:

Note: Use the F9 key to open the Default Element Selection Tool (the Element Picker or the Element Browser) or use the Down-Arrow key (Auto-Complete) on any parameter field to see a complete list of the memory locations that are valid for that parameter of the instruction.

 

High Speed Input Device selects which of the High-Speed Counters this instruction will manage. This can be any of the currently configured High-Speed Counters, or click the button with the gear symbol to open the Setup High-Speed I/O dialog where a new High-Speed counter can be created, or the configuration for an existing one can be changed.

High Speed Input Structure is the associated structure for the selected High Speed Input Device. Useful High Speed Input Structure Members contains a list of the structure fields that you will likely need to use in the ladder logic in concert with this instruction.


If the selected High-Speed Input Device uses a single count input (Up Counter, Down Counter), Count Input 0 shows the discrete input this device is configured to use, and whether the discrete input is a High-Speed input (Hs), or a standard speed input (Std).

 

If the selected High-Speed Input Device uses two count inputs (Quad Counter, Bidirectional. Up / Down Counter), Count Input 1 shows the discrete input this device is configured to use for the second count input, and whether the discrete input is a High-Speed input (Hs), or a standard speed input (Std).

 


If Enable Reset Input or Enable Capture Input or Enable Inhibit Input have been configured, the discrete input used to perform those functions, the state of those inputs that will trigger the functions (rising-edge-triggered, falling edge-triggered, high-level triggered, or low-level triggered), and whether the discrete input is a High-Speed input (Hs), or a standard speed input (Std) will be shown here.

 


If enabled in the counter's configuration, the Rate Scaling Filter (seconds) is a filtering algorithm that is applied during the calculation that defines how much 'weight' the current-value is given versus the latest-calculated-value. Filtering acts as a data smoothing function, balancing stability versus the responsiveness of the calculated value as it responds to changes in the input pulse rate. A large filter value gives more weight to the latest-calculated-value (and hence less weight to the current-value), producing a more stable value that responds more slowly to changes in the input pulse rate. A small filter value gives less weight to the latest-calculated-value (and hence more weight to the current-value), producing a less stable value but it responds more quickly to changes in the input pulse rate.

Select Do Not Change to use the Filter value in the Device configuration in the System Configuration.

 

Select Change Filter Time to use the value in this instruction. This can be any constant floating point value between 0.0 and 0.999999, or any numeric memory location containing a value in that range. A value of 0.0 will disable the Filter.

 

Clicking Configure Scale Settings... will open the Device Configuration dialog of the System Configuration where this value can be set.


Status Display:

The status display shows the current state of the .EnableCapture, .CountCaptured, .CapturedValue, and ScaledValue (if enabled) structure members, and the current state of the discrete inputs used by this function.

 

 


See Also:

HSCNT - High Speed Counting

 

HSEDGE - Precise Edge to Edge Timing

 

HSPULSEC - Catch Pulse Input

 


Related Topics:

Configuring the HSIO High Speed Counting function.

 

Configuring the HSIO Edge Timing function.

 

Configuring the HSIO Pulse Catch function.