GetFBusStatus
The PLC Controller can be connected to a fieldbus as a participating device. The status of the fieldbus can be determined with the function "GetFBusStatus".
FUNCTION GetFBusStatus : WORD
VAR_INPUT
VAR_INPUT
bDummy : BOOL
END_VAR
At least one input is required for functions.
The fieldbus status is encoded in the return parameter as follows:
Controller type | Value | Description |
---|---|---|
BC2000 | 0 | Fieldbus OK |
Bit 0 set | Fieldbus errors | |
Bit 1 - 15 | reserved | |
BC3100 | 0 | Fieldbus OK |
Bit 0 set | Fieldbus errors | |
Bit 1 - 3 | reserved | |
Bit 4 - 5 | DP-State: 0: Slave in WAIT-PRM (no connection to master) | |
Bit 6 - 7 | WD-State: 0: Baud rate is searched | |
Bit 8 - 11 | Baud rate: 0: 12 Mbaud | |
Bit 12 - 15 | reserved | |
BC9000 | Bit 0 set | Error in AMS/ADS communication |
Bit 1 set | Error MODBUS/TCP | |
Bit 2 - 14 | reserved | |
Bit 15 set | No LINK (no communication with the fieldbus) |
Requirements
Development environment | Target platform | PLC libraries to include |
---|---|---|
TwinCAT v2.7.0 and above | BCxxxx (165) | PlcSystemBC.Lb6 |