MC_WriteDigitalOutput_BkPlcMc (from V3.0)

MC_WriteDigitalOutput_BkPlcMc (from V3.0) 1:

The function block determines the state of a digital output of a cam controller.

MC_WriteDigitalOutput_BkPlcMc (from V3.0) 2: Inputs

VAR_INPUT
    Execute:        BOOL;
    OutputNumber:   INT;
    Value:          BOOL;
END_VAR

Name

Type

Description

Execute

BOOL

A rising edge at this input triggers an update of the state.

OutputNumber

INT

The number of the output to be determined.

Value

BOOL

The state of the digital output.

MC_WriteDigitalOutput_BkPlcMc (from V3.0) 3: Inputs/outputs

VAR_INOUT
    Output:     OUTPUT_REF_BkPlcMc;
END_VAR

Name

Type

Description

Output

OUTPUT_REF_BkPlcMc

Here, the address of a variable of type OUTPUT_REF_BkPlcMc should be transferred.

MC_WriteDigitalOutput_BkPlcMc (from V3.0) 4: Outputs

VAR_OUTPUT
    Done:       BOOL;
    Busy:       BOOL;
    Error:      BOOL;
    ErrorID:    UDINT;
END_VAR

Name

Type

Description

Done

BOOL

This indicates successful determination of the state.

Busy

BOOL

This output is TRUE while the command is being processed.

Error

BOOL

The occurrence of an error is indicated here.

ErrorID

UDINT

An encoded indication of the cause of the error is provided here.

Behavior of the function block

A rising edge at Execute causes the function block to check the transferred parameters. During this process, a problem may be detected and reported:

If these checks could be performed without problems, the state of the digital output is defined according to the value of Value, and Done is reported.

A falling edge at Execute clears all the pending output signals.