Functions ¶ CanReconfigure (Function) GetNextNode (Function) GetNodeDepth (Function) GetRoot (Function) INode_TO_IBus (Function) INode_TO_IDevice (Function) INode_TO_IDevice2 (Function) INode_TO_IStack (Function)
CanReconfigure (FUN) ¶ FUNCTION CanReconfigure : BOOL The function returns TRUE if itfNode can perform a Reconfigure-Action. Only nodes implementing IReconfigureProvider can be used as input of Reconfigure InOut: Scope Name Type Return CanReconfigure BOOL Input itfNode INode
GetNextNode (FUN) ¶ FUNCTION GetNextNode : INode The function implements a depth-first search. Nodes will be returned in top to bottom order of the device tree Example Following example code counts all nodes in the device tree. PROGRAM PLC_PRG VAR itfNode : DED.INode ; uiNodes : UINT ; END_VAR itfNode := DED.GetRoot (); REPEAT itfNode := DED.GetNextNode ( itfNode ); uiNodes := uiNodes + 1 ; UNTIL itfNode = 0 END_REPEAT InOut: Scope Name Type Comment Return GetNextNode INode Input itfCurrent INode node from which the search shall be started.
GetNodeDepth (FUN) ¶ FUNCTION GetNodeDepth : INT The function returns the depth of a node (i.e. number of parents between this node and the plc) InOut: Scope Name Type Return GetNodeDepth INT Input itfNode INode
GetRoot (FUN) ¶ FUNCTION GetRoot : INode The function returns the root device (= PLC device). InOut: Scope Name Type Comment Return GetRoot INode root node
INode_TO_IBus (FUN) ¶ FUNCTION INode_TO_IBus : IBus Converts an INode object to an IBus object. If itfNode is no IBus object function returns zero. InOut: Scope Name Type Comment Return INode_TO_IBus IBus corresponding IBus or zero if itfNode is no IBus object Input itfNode INode node to be converted
INode_TO_IDevice (FUN) ¶ FUNCTION INode_TO_IDevice : IDevice Converts an INode object to an IDevice object. If itfNode is no IDevice object function returns zero. InOut: Scope Name Type Comment Return INode_TO_IDevice IDevice corresponding IDevice or zero if itfNode is no IDevice object Input itfNode INode node to be converted
INode_TO_IDevice2 (FUN) ¶ FUNCTION INode_TO_IDevice2 : IDevice2 Converts an INode object to an IDevice2 object. If itfNode is no IDevice2 object function returns zero. InOut: Scope Name Type Comment Return INode_TO_IDevice2 IDevice2 corresponding IDevice2 or zero if itfNode is no IDevice2 object Input itfNode INode node to be converted
IDevice.GetDeviceState (METH) ¶ METHOD GetDeviceState : DEVICE_STATE Returns the state of the device; if device state is DEVICE_STATE.ERROR further information can be read by GetDeviceError . InOut: Scope Name Type Comment Return GetDeviceState DEVICE_STATE current device state Output xDiagnosisInfoAvailable BOOL if true, diagnosis info can be read by calling IDevice.GetDeviceDiagnosisInfo (if supported) eError ERROR
IDevice.SetCommunicationState (METH) ¶ METHOD SetCommunicationState : ERROR Starts, stops or resets a device Note Use IDevice2.CheckSupportedCommunicationState and IDevice2.CheckCurrentSupportedCommunicationState to check which transitions are possible! InOut: Scope Name Type Comment Return SetCommunicationState ERROR Input eRequestedState DEVICE_TRANSITION_STATE desired transition