FBusIO_GetDeviceStatus Method

Description
Returns the status of the specified Fieldbus device.

Syntax
Function FBusIO_GetDeviceStatus (BusNumber As Integer, DeviceID As Integer) As Integer

Parameters

  • BusNumber
    An integer indicating the Fieldbus system number. This number must be 16, which is the ID of the bus connected to the Fieldbus master board on the PC side of the controller.
  • DeviceID
    An integer indicating the Fieldbus ID of the device.

Return Value
0 - OK
1 - Disconnected
2 - Power off
3 - Synchronization error. Device is booting, or has incorrect baud rate.

Remarks
Note
This method will only work if the Fieldbus Master option is active.

See Also
FBusIO_GetBusStatus Method, FBusIO_SendMsg Method, IsOptionActive Method

FBusIO_GetDeviceStatus Use Example
VB Examples:

Dim val As Integer  
val = m_spel.FBusIO_GetDeviceStatus(16, 10)  

C# Example:

dev
ideStatus = m_spel.FbusIO_GetDeviceStatus(16, 10);