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
DeviceDiagnosisInfo.DeviceType (PROP) ¶ PROPERTY DeviceType : STRING Returns the type of the device
DeviceDiagnosisInfo.Initialize (METH) ¶ METHOD Initialize : BOOL Initializes this function block with a node corresponding to an actual device, whereas the device name is out of a textlist generated by the composer during the generation of the device diagnosis generator. InOut: Scope Name Type Comment Return Initialize BOOL Input uiNodeName UINT The index of the textlist entry of the device name node DED.INode The device node belonging to the device to diagnose
DeviceDiagnosisInfo.OnAfterOnlineChange (METH) ¶ METHOD OnAfterOnlineChange This method is called after an Online Change takes place
DeviceDiagnosisInfo.ResetDevice (METH) ¶ METHOD ResetDevice Resets the device connected to this function block