
PISO-CANFD series CAN FD card User Manual (version 1.0.0)
Page: 81
Copyright © 2021 ICP DAS Co., Ltd. All Rights Reserved.
E-mail: [email protected]
3.2.21. CANFD_GetBUSDiagnostic
Description
This function is used to retrieve the CAN bus error status (including separate error
counters for receive/transmit and for nominal/data bit rates on BUSDiag0 and track of
the kind of error that occurred since the last reading BUSDiag1) of the CAN port on a
specified PISO-CANFD series board.
Syntax
Parameters
BoardNo
[in] Specifies the number of the PISO-CANFD series board to be read. The valid
range is 0 to 15.
Port
[in] Specifies the number of the CAN port, where:
1: CAN port 1
2: CAN port 2.
3: CAN port 3
4: CAN port 4.
BUSDiag0
[out] BUSDIAG0 contains separate error counters for receive/transmit and for
nominal/data bit rates. They are simply incremented by one on every error.
Bit
Symbol
Description
7-0
NRERRCNT Nominal Bit Rate Receive Error Counter bits
15-8
NTERRCNT Nominal Bit Rate Transmit Error Counter bits
C#
Int16 CANFD_GetBUSDiagnostic (
Byte BoardNo,
Byte Port,
out UInt32 BUSDiag0,
out UInt32 BUSDiag1
);