CloseKbus (FUN) ¶ FUNCTION CloseKbus : DINT Closes the device @param deviceId Id of the device. @return Returns 0 on success, -1 otherwise. InOut: Scope Name Type Return CloseKbus DINT Input deviceId DINT
ConfigureDevice (FUN) ¶ FUNCTION ConfigureDevice : DINT Configures a device. @param deviceId Id of the device. @param configData The device specific configuration. @return Returns 0 on success, -1 otherwise. InOut: Scope Name Type Return ConfigureDevice DINT Input deviceId DINT configData POINTER TO BYTE
ConfigureSubdevice (FUN) ¶ FUNCTION ConfigureSubdevice : DINT Configures a sub device. @param deviceId Id of the device. @param subdeviceId Id of the sub device. @param configData The device specific configuration. @return Returns 0 on success, -1 otherwise. InOut: Scope Name Type Return ConfigureSubdevice DINT Input deviceId DINT subdeviceId DINT configData POINTER TO BYTE
DiagnoseGetDeviceState (FUN) ¶ FUNCTION DiagnoseGetDeviceState : DINT Get the state of the device (corresponds to codesys’ bus). @param[in] deviceId Id of the device. @param[in] bufferSize Size of the supplied buffer. @param[out] diagnoseBuffer Buffer where the state is stored in. @param[out] busState The state of the bus. @return Returns 0 on success, -1 otherwise. InOut: Scope Name Type Return DiagnoseGetDeviceState DINT Input deviceId DINT bufferSize UDINT diagnoseBuffer POINTER TO BYTE busState POINTER TO tBusState
DiagnoseGetSubdeviceState (FUN) ¶ FUNCTION DiagnoseGetSubdeviceState : DINT Get the state of a subdevice (corresponds to codesys’ device). @param deviceId Id of the device. @param subdeviceId Id of the device to get the state from. @param[in] bufferSize Size of the supplied buffer. @param[out] diagnoseBuffer Buffer where the state data is stored in. @param[out] diagnoseState The state of the diagnose. @return Returns 0 on success, -1 otherwise. InOut: Scope Name Type Return DiagnoseGetSubdeviceState DINT Input deviceId DINT subdeviceId DINT bufferSize UDINT diagnoseBuffer POINTER TO BYTE diagnoseState POINTER TO tDiagnoseState
GetDeviceFlags (FUN) ¶ FUNCTION GetDeviceFlags : DINT Returns the devices flags @param deviceId @param flags Pointer to the flags @return Returns 0 on success, -1 otherwise. InOut: Scope Name Type Return GetDeviceFlags DINT Input deviceId DINT flags POINTER TO UDINT
GetIoSizes (FUN) ¶ FUNCTION GetIoSizes : DINT Gets the sizes of the devices input and output. @param deviceId Id of the device. @param inputSize Pointer to where the size of the input will be stored. @param outputSize Pointer to where the size of the output will be stored. @return Returns 0 on success, -1 otherwise. InOut: Scope Name Type Return GetIoSizes DINT Input deviceId DINT inputSize POINTER TO UDINT outputSize POINTER TO UDINT
GetLastError (FUN) ¶ FUNCTION GetLastError : DINT The GetLastError method gets the last error set by the given device. @param deviceId The device to get the error from. @return Returns the error. InOut: Scope Name Type Return GetLastError DINT Input deviceId DINT error POINTER TO UDINT
OpenKbus (FUN) ¶ FUNCTION OpenKbus : DINT Opens the device. @RETURN deviceId Id OF the device., -1 on failure. InOut: Scope Name Type Return OpenKbus DINT
ReadBit (FUN) ¶ FUNCTION ReadBit : DINT The ReadBit method reads one bit from the given offset into data. @param deviceId The device to read the bit from. @param bitOffset The bit offset to read the bit at. @param data Pointer to where the bit will be read to. @return Returns 0 on success, -1 otherwise. InOut: Scope Name Type Return ReadBit DINT Input deviceId DINT taskId UDINT bitOffset UDINT data POINTER TO BYTE