Configuration of the Comparison on a Main Type

Configuration Procedure

Follow this procedure to configure the comparison function on a Main type:

Step

Action

1

In the Devices tree, double-click MyController > Counters.

2

Set the value of the Counting function parameter to HSC Main Single Phase or HSC Main Dual Phase.

3

In the Number of thresholds parameter, select the number of thresholds to use.

4

Set the value of each threshold.

NOTE: Follow this rule to configure the threshold values: TH0 < TH1 < TH2 < TH3

5

Optionally, define event conditions for the thresholds:

  1. Configure external events associated with tasks.

  2. In Events > Threshold x, set a trigger type (Upward Cross, Downward Cross, Both Cross)

  3. In HSC Main Id, select the group of external events (HSC0...HSC3) containing the external event.

Result: External events in the selected group (HSCx_TH0, HSCx_TH1, HSCx_TH2, HSCx_TH3, HSCx_STOP) appear below Threshold x External Event.