HSCSetParam_TM3: Adjust Parameters of a HSC

Function Block Description

This administrative function block modifies the value of a parameter of an HSC.

Graphical Representation

IL and ST Representation

To see the general representation in IL or ST language, refer to Function and Function Block Representation.

I/O Variables Description

This table describes the input variables:

Inputs

Type

Comment

HSC_REF_TM3

HSC_REF_TM3

Reference to the HSC function block.

Must not be changed during block execution.

Execute

BOOL

On rising edge, starts the function block execution.

On falling edge, resets the outputs of the function block when its execution terminates.

Param

HSC_PARAMETER_TYPE_TM3

Parameter to set.

ParamValue

DINT

Parameter value to write.

If the requested parameter is the Timebase of an HSCMain Single, use the HSC_EVENT_TIMEBASE_TYPE_TM3 enumeration to set the value.

If the requested parameter is the Timebase of a Frequency Meter, use the HSC_FREQMETER_TIMEBASE_TYPE_TM3 enumeration to set the value.

If the requested parameter is the Resolution of a Period Meter, use the HSC_PERIODMETER_RESOLUTION_TYPE_TM3 enumeration to set the value.

This table describes the output variables:

Outputs

Type

Comment

Done

BOOL

TRUE = indicates that the parameter was successfully written.

Function block execution is finished.

Busy

BOOL

TRUE = indicates that the function block execution is in progress.

Error

BOOL

TRUE = indicates that an error was detected.

Function block execution is finished.

ErrorID

HSC_ERROR_TM3

Indicates the value of the error detected.

NOTE: For more information about Done, Busy, and Execute pins, refer to General Information on Administrative Function Block Management.

Adding the HSCSetParam_TM3 Function Block

Step

Description

1

Select the Libraries tab in the Software Catalog and click Libraries.

Select Intern > IODrivers > TM3 HSC > Administrative > HSCSetParam_TM3 in the list, drag-and-drop the item onto the POU window.

2

Set the HSC_REF_TM3 input to the instance name of the HSC.