IoDrvSercos3 (FB)

FUNCTION_BLOCK IoDrvSercos3 EXTENDS IoDrvBase IMPLEMENTS ICmpIoDrvParameter

The program organization unit IoDrvSercos3.

For each Sercos master an instance of POU IoDrvSercos3 is created. The properties may be accessed respecting the syntax “<Instance name>.<Property name”.

Examples of using the instance:
Restart of master:
SercosIII_Master.xRestart := xRestart
SercosIII_Master();
Call of master to retrieve information about the success of downloading the configuration parameters:
xFinish := SercosIII_Master.xConfigFinished;
InOut:

Scope

Name

Type

Comment

Input

xRestart

BOOL

A rising edge at this input will restart the master. All configuration data will be reloaded.

wRequiredTopology

SERCOS_TOPOLOGY

The required topology (Ring, L1, L2 etc)

xRecoverRingTopology

BOOL

If a ring topology is required and a ring break was detected then it is possible to recover the ring topology with this input.

Output

xConfigFinished

BOOL

If the output is TRUE, the transmission of all configuration data has been executed properly. The communication on the bus is in process.

wState

WORD

The parameter wState has a value between 0 and 100 telling about the state of the initialization phase; the greater the value, the more the initialization process is advanced.

wTopology

SERCOS_TOPOLOGY

The current topology of the Sercos III bus.

xTopologyError

BOOL

IF wRequiredTopologiy is not equal to wTopology there is an error.

xBusError

BOOL

If the bus is not working then this output is set to true