Configuration of the Main Type in One-shot Mode
Step |
Action |
---|---|
1 |
In the Devices tree, double-click Embedded Functions > HSC. |
2 |
Set the type to Main from the HSC0• > Type drop down menu. |
3 |
The instance of the Main type is created, you can rename it from the Variable field. |
4 |
If necessary, set the mode to One-shot from the HSC0• > Parameters > Mode drop down menu. |
5 |
Set the preset value from Parameters > Preset/Modulo In One-shot mode, this field represents the initial Modulo Value. |
6 |
Set the anti-bounce filtering value from the HSC0• > Clock Inputs > A Filter drop down menu. |
7 |
Optionally, enable the SYNC, EN and CAP auxiliary inputs from the HSC0• > Auxiliary Inputs drop down menu to enable the Synchronization function, Enable function and Capture function on a physical input. |
8 |
Optionally, enable the thresholds from the drop down menu, by selecting HSC0• > Thresholds > Threshold 0 > Enable/Disabled to authorize the Compare function and to configure the Reflex Outputs. Threshold 1 can also be Enabled after Threshold 0 is Enabled. NOTE: For the One-shot mode, configured values must follow this rule: 0 < Threshold 0 Value < Threshold 1 Value < (Preset - 1) |
Click the IO Summarize... button to display the input and output assignments.
Refer to the hardware guide for wiring details.
The filtering value on the Main type input determines the counter maximum frequency as shown in the table:
Input |
Filter value |
Maximum counter frequency |
---|---|---|
A |
4 µs |
50 kHz |
40 µs |
14.5 kHz |