IoDrvSercos3.FirstSlave (PROP)

PROPERTY FirstSlave : POINTER TO Sercos3Slave

Pointer to the first slave of that master

Example:

Declaration:
VAR
pSlave : POINTER TO Sercos3Slave;
END_VAR
Program:
pSlave := sercos_Master.FirstSlave;
WHILE pSlave <> 0 DO
pSlave^();
IF pSlave^.xError THEN
;
END_IF
pSlave := pSlave^.NextInstance;
END_WHILE

Initially, the first slave is fetched TO the master via sercos_Master.FirstSlave.

In the WHILE loop the respective instance is called and xError is thus determined. The status can then be checked. The pointer to the next slave is fetched with pSlave^.NextInstance. If the list is finished, the pointer is ZERO and the loop ends.