ModbusTCPSlaveUnit_Diag (FB) ¶ FUNCTION_BLOCK ModbusTCPSlaveUnit_Diag EXTENDS ModbusTCPSlaveUnit IMPLEMENTS DED.IDevice InOut: Scope Name Type Initial Comment Inherited from Input xConfirmError BOOL FALSE continue processing at rising edge ModbusTCPSlaveUnit xDoInit BOOL TRUE If true then xConfirmError also sends all reset init commands, false (old behaviour) ModbusTCPSlaveUnit Output xInitDone BOOL FALSE All init commands have been processed ModbusTCPSlaveUnit xBusy BOOL FALSE Is TRUE as long as a request is in progress ModbusTCPSlaveUnit xDone BOOL FALSE Is TRUE if a request finished successfully ModbusTCPSlaveUnit xError BOOL FALSE Is TRUE if any error occurred. Communication to this Slave is suspended. ModbusTCPSlaveUnit byModbusError MB_ErrorCodes MB_ErrorCodes.UNDEFINED Specifies the current error as defined in the “MB_ErrorCodes” enumeration ModbusTCPSlaveUnit iChannelIndex INT -1 ModbusTCPSlaveUnit usiUnitID USINT ModbusTCPSlaveUnit Properties: ChildNodeCount Enable FirstChildNode IsRootNode NextSiblingNode ParentNode SiblingNodeCount Methods: GetDeviceDiagnosisInfo GetDeviceErrorAsync GetDeviceInfo GetDeviceState GetSpecificDeviceErrorAsync GetSpecificDeviceState SetCommunicationState Structure: IDevice GetDeviceDiagnosisInfo (Method) GetDeviceErrorAsync (Method) GetDeviceInfo (Method) GetDeviceState (Method) GetSpecificDeviceErrorAsync (Method) GetSpecificDeviceState (Method) SetCommunicationState (Method) INode ChildNodeCount (Property) Enable (Property) FirstChildNode (Property) IsRootNode (Property) NextSiblingNode (Property) ParentNode (Property) SiblingNodeCount (Property)
IDevice ¶ GetDeviceDiagnosisInfo (Method) GetDeviceErrorAsync (Method) GetDeviceInfo (Method) GetDeviceState (Method) GetSpecificDeviceErrorAsync (Method) GetSpecificDeviceState (Method) SetCommunicationState (Method)
ModbusTCPSlaveUnit_Diag.GetDeviceDiagnosisInfo (METH) ¶ METHOD GetDeviceDiagnosisInfo : DED.ERROR Returns a DiagnosisInfo if xDiagnosisInfoAvailable of GetDeviceState was true. InOut: Scope Name Type Comment Return GetDeviceDiagnosisInfo DED.ERROR Input pData CAA.PVOID Pointer to memory szSize CAA.SIZE Size of memory in bytes where pData is pointing to Output szCount CAA.SIZE Number of Bytes written to pData
ModbusTCPSlaveUnit_Diag.GetDeviceErrorAsync (METH) ¶ METHOD GetDeviceErrorAsync : DED.PROC_STATE Returns the device error of the current node; you can also use functionblock GetDeviceError. InOut: Scope Name Type Comment Return GetDeviceErrorAsync DED.PROC_STATE Input eCmd DED.PROC_CMD eCommand Inout eriDeviceError DED.ERROR_INFO error struct Output eError DED.ERROR error code if method fails
ModbusTCPSlaveUnit_Diag.GetDeviceInfo (METH) ¶ METHOD GetDeviceInfo : DED.ERROR Returns the device information of the current node InOut: Scope Name Type Comment Return GetDeviceInfo DED.ERROR Inout deiInfo DED.DEVICE_INFO Device information struct
ModbusTCPSlaveUnit_Diag.GetDeviceState (METH) ¶ METHOD GetDeviceState : DED.DEVICE_STATE Returns the state of the device; if device state is ERROR further information can be read by GetDeviceError InOut: Scope Name Type Comment Return GetDeviceState DED.DEVICE_STATE Output xDiagnosisInfoAvailable BOOL if true, diagnosis info can be read by calling GetDeviceDiagnosisInfo eError DED.ERROR
ModbusTCPSlave_Diag.IsRootNode (PROP) ¶ PROPERTY IsRootNode : BOOL
ModbusTCPSlave_Diag.NextSiblingNode (PROP) ¶ PROPERTY NextSiblingNode : DED.INode
ModbusTCPSlave_Diag.ParentNode (PROP) ¶ PROPERTY ParentNode : DED.INode
ModbusTCPSlave_Diag.SiblingNodeCount (PROP) ¶ PROPERTY SiblingNodeCount : CAA.Count