FbusIO_GetDeviceStatus Function

Returns the status of the specified Fieldbus device.

Syntax
FbusIO_GetDeviceStatus(busNumber, deviceID)

Parameters

busNumber
Integer expression representing the fieldbus system number. This number is always 16 and is the ID of the bus connected to the fieldbus master board on the PC side of the controller.
deviceID
Integer expression representing the device's fieldbus ID

Return Values

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

Description
FbusIO_GetDeviceStatus can be used to verify the general status of a Fieldbus device.

Note


This command will only work if the Fieldbus Master option is active.


See Also
FbusIO_GetBusStatus, FbusIO_SendMsg

FbusIO_GetDeviceStatus Function Example

Long sts
sts = FbusIO_GetDeviceStatus(16, 10)