PISO-CANFD series CAN FD card User Manual (version 1.0.0)
Page: 79
Copyright © 2021 ICP DAS Co., Ltd. All Rights Reserved.
E-mail: [email protected]
3.2.20. CANFD_GetCANStatus
Description
This function is used to retrieve the CAN bus error status and transmit/receive error
counter 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.
CANStatus
[out] Indicates the address of a variable used to retrieve the status register
value for the CAN controller.
Bit
Symbol
Value
Description
0
EWARN
Transmitter or Receiver is in Error Warning State bit
0
Transmitter or Receiver is not in Error Warning State
C#
Int16 CANFD_CANGetStatus (
Byte BoardNo,
Byte Port,
out UInt16 CANStatus,
out Byte TxErrorCount
out Byte RxErrorCount
);