DeviceDiagnosisInfo ¶ Helper funtctions and text lists used by the code generated by the device diagnosis generator. BUS_STATE_TO_STRING (Function) BUS_TYPE_TO_STRING (Function) BYTE_TO_HEXSTRING (Function) DEVICE_STATE_TO_STRING (Function) DEVICE_TYPE_TO_STRING (Function) DeviceDiagnosisInfo (FunctionBlock) BusState (Property) BusType (Property) CheckForCommands (Method) DeviceState (Property) DeviceType (Property) Initialize (Method) OnAfterOnlineChange (Method) ResetDevice (Method) StartDevice (Method) StopDevice (Method) LOWBYTE_TO_HEXSTRING (Function) TL_BUSSTATE (TextList) TL_BUSTYPE (TextList) TL_DEVICESTATE (TextList) TL_DEVICETYPE (TextList)
BUS_TYPE_TO_STRING (FUN) ¶ FUNCTION BUS_TYPE_TO_STRING : STRING Converts a DED.BUS_TYPE enumeration into a speaking string InOut: Scope Name Type Comment Return BUS_TYPE_TO_STRING STRING Input sState DED.BUS_TYPE The bus type to convert into a speaking string
BYTE_TO_HEXSTRING (FUN) ¶ FUNCTION BYTE_TO_HEXSTRING : STRING Converts a byte into the corresponding hexadecimal string InOut: Scope Name Type Comment Return BYTE_TO_HEXSTRING STRING Input byInp BYTE The byte to convert into a hexadecimal string
DEVICE_STATE_TO_STRING (FUN) ¶ FUNCTION DEVICE_STATE_TO_STRING : STRING Returns a DED.DEVICE_STATE enumeration as a speaking string InOut: Scope Name Type Comment Return DEVICE_STATE_TO_STRING STRING Input sState DED.DEVICE_STATE The device state to return as a speaking string
DEVICE_TYPE_TO_STRING (FUN) ¶ FUNCTION DEVICE_TYPE_TO_STRING : STRING Return a DED.DEVICE_TYPE enumeration as a speaking string InOut: Scope Name Type Comment Return DEVICE_TYPE_TO_STRING STRING Input sState DED.DEVICE_TYPE The device type to return as a speaking string
DeviceDiagnosisInfo (FB) ¶ FUNCTION_BLOCK DeviceDiagnosisInfo This function block is used by the application composer to create the device diagnosis visualization. Each instances of this function block get initialized by code the composer creates, which connects it to an existing device PLC. Each instance then offers functionalities to get the state, type, etc. of an existing device, or to start, stop, etc. it. Note : Usually this function block does not need to be used by any IEC programmer. InOut: Scope Name Type Initial Comment Output uiName UINT The index of the name of the device diagnosed by this function block as entry of a text list. pName POINTER TO STRING A pointer to a string containing the name of the device diagnosed by this function block dwDeviceErrorCode DWORD The current device error code if available stDeviceDiagnosis STRING ‘’ The current device diagnosis text if available stDeviceSpecificState STRING ‘’ The current device diagnosis state if available stDeviceSpecificError STRING ‘’ The current device diagnosis error if available dwBusErrorCode DWORD The current bus error of a bus-device if available stBusDiagnosis STRING ‘’ The current bus diagnosis text of a bus-device if available dwErrorCode DWORD The common error code of this function block if available Properties: BusState BusType DeviceState DeviceType Methods: CheckForCommands Initialize OnAfterOnlineChange ResetDevice StartDevice StopDevice Structure: BusState (Property) BusType (Property) CheckForCommands (Method) DeviceState (Property) DeviceType (Property) Initialize (Method) OnAfterOnlineChange (Method) ResetDevice (Method) StartDevice (Method) StopDevice (Method)
DeviceDiagnosisInfo.BusState (PROP) ¶ PROPERTY BusState : STRING Returns the state of the device, if it is a bus, as a string
DeviceDiagnosisInfo.BusType (PROP) ¶ PROPERTY BusType : STRING Returns the type of the device, if it is a bus, as a string
DeviceDiagnosisInfo.CheckForCommands (METH) ¶ METHOD CheckForCommands Checks if there are any commands issued for this function block and eventually executes them.
DeviceDiagnosisInfo.DeviceState (PROP) ¶ PROPERTY DeviceState : STRING Returns the state of the device