background image

PISO-CANFD series CAN FD card User Manual (version 1.0.0)   

 

 

 

Page: 32

 

 

Copyright © 2021 ICP DAS Co., Ltd. All Rights Reserved.    

 

 

E-mail: [email protected]

 

3.2.  API Library Function Table 

All the functions provided in the pisocanfd API library are listed in the following 

table. 
 

System Information API

 

Function 

Description 

CANFD_GetDllVersion 

Used to retrieve the version number for the function library

 

file 

currently installed on the PISO-CANFD series board 

CANFD_GetBoardInf 

Used to retrieve PCI information related to a selected 

PISO-CANFD series board, including the vendor ID, device ID, 

sub-vendor ID, sub-device ID, sub-auxiliary ID, logical interrupt 

number, board ID and board switch number. 

CANFD_TotalBoard 

Used to retrieve the total board number of PISO-CANFD series 

boards installed in the Host PC 

CANFD_GetCardBoardSwitchNo 

Used to retrieve the switch (SW1) number for the selected 

PISO-CANFD series board 

CANFD_GetCardBoardID 

Used to retrieve the card ID for the selected PISO-CANFD 

series board 

CANFD_GetCardPortNum 

Used to retrieve the total CAN port number of the selected 

PISO-CANFD series board 

CANFD_GetCardFPGAFWVer 

Used to get the FPGA firmware version of the selected 

PISO-CANFD series board 

CANFD_ActiveBoard 

Used to activate the selected PISO-CANFD series board 

CANFD_CloseBoard 

Used to deactive the selected PISO-CANFD series board 

CANFD_BoardIsActive 

Used to check whether or not the selected PISO-CANFD series 

board is active 

 

CAN Bus API

 

Function 

Description 

CAN Reset, Initialize function 

CANFD_Reset 

Used to reset the CAN controller on the selected PISO-CANFD 

series board 

CANFD_Init 

Used to initialize the CAN port function on the selected PISO-CANFD 

series board 

CAN bit rate configuration functions

 

CANFD_SetBitRate 

Used to set the bit rate configuration for the CAN port on the selected 

PISO-CANFD series board 

CANFD_SetBitRateWithSP 

Used to set the bit rate and baudrate sample point configuration for 

the CAN port on the selected PISO-CANFD series board 

Summary of Contents for PISO-CAN-FD Series

Page 1: ...1 0 0 Page 1 Copyright 2021 ICP DAS Co Ltd All Rights Reserved E mail service icpdas com PISO CANFD Series User Manual Version 1 0 0 Feb 2021 Service and usage information for PISO CAN200U FD D PISO...

Page 2: ...P DAS reserves the right to change this manual at any time without notice The information furnished by ICP DAS is believed to be accurate and reliable However no responsibility is assumed by ICP DAS f...

Page 3: ...ware 13 2 2 Installing the Windows Driver 14 2 3 Wiring Connections 17 2 4 Software Utility 18 2 4 1 Connect to the board 19 2 4 2 Send CAN CAN FD messages 22 2 4 3 Receive CAN CAN FD messages 25 2 4...

Page 4: ...WithSP 55 3 2 8 CANFD_SetFilterAllPass 57 3 2 9 CANFD_SetFilterFormat 58 3 2 10 CANFD_SetFilter 59 3 2 11 CANFD_SetOPMode 61 3 2 12 CANFD_GetOPMode 63 3 2 13 CANFD_SetISOCRCEn 65 3 2 14 CANFD_GetISOCR...

Page 5: ...015 The CAN FD speeds up the data transmission and packs more data into each message PISO CANFD series board included PISO CAN200U FD and PISO CAN400U FD is a very powerful and economic solution for a...

Page 6: ...bit rates 10 1000 kbps CAN FD bit rates for data field 100 10000 kbps Isolation 3000 VDC for DC to DC 3000 Vrms for photo couple Terminal Resistor Jumper for 120 terminator resistor Power Power Consu...

Page 7: ...FD support for ISO and Non ISO Bosch standards switchable CAN FD bit rates for data field from 100 kbps to 10 Mbps CAN bit rates from 10 kbps to 1000 kbps Support CAN Bus message filter configuration...

Page 8: ...ardware settings for the PISO CANFD series board including the board layout pin assignments jumper and switch selection LED indicators and the configuration for the wiring connections 1 3 1 Board Layo...

Page 9: ...ANFD series CAN FD card User Manual version 1 0 0 Page 9 Copyright 2021 ICP DAS Co Ltd All Rights Reserved E mail service icpdas com Figure 1 3 2 PISO CAN400U FD Board Layout Figure 1 3 3 ADP 9 Board...

Page 10: ...9 pin Male D Sub connector Pin No Name Description 1 N A Not used 2 CAN_L CAN_Low signal line for the CAN port 3 CAN_GND CAN_Gnd signal line for the CAN port 4 N A Not used 5 N A Not used 6 CAN_GND C...

Page 11: ...nfigure board number of the PISO CANFD series board Switch Description Status SW1 SW1 is a DIP switch that is used to configure the board number for the PISO CANFD series card For example if the switc...

Page 12: ...or the CAN Bus terminal resistor which can be used to enable or disable the terminal resistor of PISO CANFD series board Jumper Description Status JP2 Used to enable or disable the 120 terminal resist...

Page 13: ...and using software utility and demos to test the board 2 1 Installing the Hardware Step 1 Shut down and power off the computer Step 2 Remove all the covers from the computer Step 3 Select an unused PC...

Page 14: ...AS website or the following link https www icpdas com en download show php num 3200 The following is a description of the installation procedure for the Win10 operating system The installation procedu...

Page 15: ...All Rights Reserved E mail service icpdas com Step 3 On the Update Driver Software Network Controller screen click the Browse my computer for driver software to continue Step 4 Then Click the Browser...

Page 16: ...Copyright 2021 ICP DAS Co Ltd All Rights Reserved E mail service icpdas com Step 5 Once the installation has been completed click the Close button to exit Step 6 After successfully to install the dri...

Page 17: ...inator resistor must be 120 or between 108 and132 The bus topology and the positions of these terminator resistors are shown below To minimize any voltage drop over long distances the terminal resista...

Page 18: ...he time stamp of each received CAN CAN FD messages for data analyzing conveniently Step 1 Get the PISO CANFD Utility The software is located at https www icpdas com en download show php num 3199 Step...

Page 19: ...Before active the board user can set the CAN port operation mode and CAN baudrate parameter of the board Please refer to the following steps to configure the PSIO CANFD series board Step1 Click the Co...

Page 20: ...c CAN 2 0 mode This port will not receive CAN FD frames It might send error frames if CAN FD frames are detected on the bus Listen Only Listen Only mode is a variant of Normal CAN FD Operation mode If...

Page 21: ...er is set to 1 it means that the bit in the CAN ID in the same position needs to be checked and the ID bit value needs to match the value specified for the bit of the Acceptance ID parameter in the sa...

Page 22: ...N Bus After active the board the screen for CAN Bus communication function will show up like below picture The above is the illustration for the Communication screen and it can be divided to two block...

Page 23: ...Indicates that the message is a CAN FD message with no bit rate switch 3 Indicates that the message is a CAN FD message with bit rate switch DL CAN message data length For CAN frames this field can be...

Page 24: ...te all the CAN messages in CAN CAN FD Message Send Area 6 Send button It will send the CAN message of the assigned green row in CAN CAN FD Message Send Area If the value in the Timer field is zero it...

Page 25: ...Ltd All Rights Reserved E mail service icpdas com 2 4 3 Receive CAN CAN FD messages By using the Utiltiy tool user can review the received CAN meesages on the CAN Bus on the selected port After activ...

Page 26: ...be CAN1_YYMMDD_HHMMSS txt for CAN1 port and CAN2_YYMMDD_HHMMSS txt for CAN2 port and the maximum file size will be 200 MB 2 Rx Start Rx Pause button When clicking Rx Start button it will start to rec...

Page 27: ...D value are all the same of the received CAN message data then they will be placed in the same row of CAN Message Receive Area The Num field will be the number of the same CAN message and the CycleTim...

Page 28: ...he selected port After active the board user can open the CAN Bus Status Monitor frame on the View Bus Status Monitor item Bus Status Monitor block 1 No Number of CAN bus status 2 Time Event time of t...

Page 29: ...n mode TXBO is set since the CAN module is not on the bus 15 6 reserved 4 TxEc Transmit error counter value of the CAN controller 5 RxEc Receiver error counter value of the CAN controller 6 BusDiag0 B...

Page 30: ...wrong format 20 NSTUFERR More than 5 equal bits in a sequence have occurred in a part of a received message where this is not allowed 21 NCRCERR The CRC check sum of a received message was incorrect...

Page 31: ...brary are located at https www icpdas com en download show php num 3196 3 1 API Library Overview All the functions provided by pisocanfd library can be separated into two groups System Information API...

Page 32: ...eries board CANFD_GetCardBoardID Used to retrieve the card ID for the selected PISO CANFD series board CANFD_GetCardPortNum Used to retrieve the total CAN port number of the selected PISO CANFD series...

Page 33: ...rieve the operation mode of the CAN port on the selected PISO CANFD series board CANFD_SetISOCRCEn Used to enable ISO CRC in CAN FD frames of the CAN port on the selected PISO CANFD series board CANFD...

Page 34: ...ail service icpdas com port on the selected PISO CANFD series board CAN bus status functions CANFD_GetCANStatus Used to retrieve the status of the CAN port on the selected PISO CANFD series board CANF...

Page 35: ...Page 35 Copyright 2021 ICP DAS Co Ltd All Rights Reserved E mail service icpdas com 3 3 API Library Flow Diagram The following is the basic control flow chart of user s CAN Bus program development by...

Page 36: ...DllVersion Description This function is used to retrieve the version number of the pisocanfd dll driver currently installed for the PISO CANFD series board Syntax Parameters DLLVer out The version inf...

Page 37: ...number board ID and board switch number Syntax Parameters BoardNo in Specifies the number of the PISO CANFD series board to be read The valid range is 0 to 15 wVID out Indicates the address of a vari...

Page 38: ...ut Indicates the address of a variable used to receive the logical interrupt number BoardID out Indicates the board id of the selected PISO CANFD series board Board ID Model Name 1 PISO CAN200U FD 2 P...

Page 39: ...ve the total board number of PISO CANFD series boards currently installed in the Host PC Syntax Parameters BoardNo out Indicates the address of a variable used to receive the total number of PISO CANF...

Page 40: ...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 BoardSwitchNo out Indicates the address of a variable used to...

Page 41: ...o in Specifies the number of the PISO CANFD series board to be read The valid range is 0 to 15 BoardID out Indicates the address of a variable used to retrieve the board idof the selected PISO CANFD s...

Page 42: ...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 PortNum out Indicates the address of a variable used to r...

Page 43: ...NFD 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 FPGAFWVer out Indicates the address of a variable used to retrie...

Page 44: ...vate a specified PISO CANFD series board Note that this function MUST be called before using any other API functions Syntax Parameters BoardNo in Specifies the number of the PISO CANFD series board to...

Page 45: ...series board This function MUST always be called at the end of a program in order for the system to release resources before exiting the program Syntax Parameters BoardNo in Specifies the number of th...

Page 46: ...BoardNo in Specifies the number of the PISO CANFD series board to be read The valid range is 0 to 15 IsActive out Indicates the address of a variable used to retrieve the status of the selected PISO C...

Page 47: ...n This function is used to reset the CAN chip for the CAN port on a specified PISO CANFD series board After resetting this CAN port will be in configuration mode Syntax Parameters BoardNo in Specifies...

Page 48: ...s board After initializing this CAN port will be in configuration mode 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 Sp...

Page 49: ...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 Norm...

Page 50: ...d Unit bps bit per second Valid Range 100000 10000000 100 kbps 10000 kbps Remark The bit rate configured for CAN FD data phase DataBitRate must be higher or equal to the bit rate configured for the no...

Page 51: ...ration mode 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...

Page 52: ...hase DataBitRate must be higher or equal to the bit rate configured for the notmal arbitration phase NormalBitRate NormalSP in Specifies the normal arbitration phase bit rate sample point as a percent...

Page 53: ...id 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 NormalBitRate out Indicates the address of a variable used to retrieve the bi...

Page 54: ...0 Page 54 Copyright 2021 ICP DAS Co Ltd All Rights Reserved E mail service icpdas com series card Unit bps bit per second Return Value If the function succeeds the return value will be 0 If the funct...

Page 55: ...n 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 Norma...

Page 56: ...it bps bit per second NormalSP out Indicates the address of a variable used to retrieve the normal arbitration phase bit sample point that is currently configured for the CAN Bus Unit 0 01 Value 8000...

Page 57: ...oard to accept all standard extended remote data frames 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 num...

Page 58: ...dNo 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...

Page 59: ...ance and mask parameter setting 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 wher...

Page 60: ...oller based on the value specified for the inAcceptance parameter If the bit of the inMask parameter is set to 1 it means that the bit in the CAN ID in the same position needs to be checked and the ID...

Page 61: ...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 OPMode in Specifies the CAN port to...

Page 62: ...not receive CAN FD frames It might send error frames if CAN FD frames are detected on the bus 2 Listen Only Listen Only mode is a variant of Normal CAN FD Operation mode If the Listen Only mode is act...

Page 63: ...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 OPMode out Indicates the address of a variable used to retrieve t...

Page 64: ...re detected on the bus 2 Listen Only Listen Only mode is a variant of Normal CAN FD Operation mode If the Listen Only mode is activated the CAN port on the CAN bus is passive It will receive messages...

Page 65: ...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 ISOCRCEn in Specifie...

Page 66: ...Manual version 1 0 0 Page 66 Copyright 2021 ICP DAS Co Ltd All Rights Reserved E mail service icpdas com Return Value If the function succeeds the return value will be 0 If the function fails refer to...

Page 67: ...o 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 ISOCRCEn out Indicates the address of a variable used to ret...

Page 68: ...Manual version 1 0 0 Page 68 Copyright 2021 ICP DAS Co Ltd All Rights Reserved E mail service icpdas com Return Value If the function succeeds the return value will be 0 If the function fails refer to...

Page 69: ...dNo 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...

Page 70: ...switch 3 Indicates that the message is a CAN FD message with bit rate switch Note that as this parameter will be set to 0 the Data parameter will be useless Dlc in CAN CAN FD frame data length code p...

Page 71: ...AN port 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 por...

Page 72: ...ta message 2 Indicates that the message is a CAN FD message with no bit rate switch 3 Indicates that the message is a CAN FD message with bit rate switch Note that as this parameter will be set to 0 t...

Page 73: ...d to retrieve the lower timestamp of the received CAN message in increments interval of 100 nano seconds The maximum value is 4 294 967 29 5 micro seconds NOTE The total timestamp of the received CAN...

Page 74: ...of driver and hardware buffer of CAN controller If user not install IRQ this value will be the message count in hardware buffer of CAN controller Syntax Parameters BoardNo in Specifies the number of...

Page 75: ...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 FIFOState in Spe...

Page 76: ...version 1 0 0 Page 76 Copyright 2021 ICP DAS Co Ltd All Rights Reserved E mail service icpdas com 7 2 reserved Return Value If the function succeeds the return value will be 0 If the function fails re...

Page 77: ...ardNo 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...

Page 78: ...Page 78 Copyright 2021 ICP DAS Co Ltd All Rights Reserved E mail service icpdas com 1 transmit buffer overfow 7 2 reserved Return Value If the function succeeds the return value will be 0 If the func...

Page 79: ...es 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...

Page 80: ...1 Receiver in Error Passive State REC 127 4 TXBP Transmitter in Error Passive State bit 0 Transmitter in Error Passive State TEC 127 1 Transmitter in Error Passive State TEC 127 5 TXBO Transmitter in...

Page 81: ...ified 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...

Page 82: ...ed bus value was recessive 17 NBIT1ERR During the transmission of a message with the exception of the arbitration field the device wanted to send a recessive level bit of logical value 1 but the monit...

Page 83: ...ALREADY_ACTIVE_ERROR The board has already been activated 0x006 ERR_BOARD_UNACTIVE_ERROR The board is not activated 0x007 ERR_BOARD_NUMBER_ERROR The board value exceeds the valid range 0x008 ERR_PORT_...

Page 84: ...0x035 ERR_INVALID_NORMAL_SAMPLEPOINT CAN normal baudrate sample point setting is not support 0x036 ERR_INVALID_DATA_SAMPLEPOINT CAN data baudrate sample point setting is not support 0x101 ERR_SYS_BOA...

Page 85: ...e icpdas com transmiting a CAN message 0x121 ERR_SYS_SOFTBUFF_IS_EMPTY CAN receive buffer of driver is empty 0x122 ERR_SYS_SOFTBUFF_IS_FULL CAN receive buffer of driver is full 0x123 ERR_SYS_HARDWAREB...

Page 86: ...ght 2021 ICP DAS Co Ltd All Rights Reserved E mail service icpdas com 4 Appendix 4 1 Revision History This chapter provides revision history information to this document The table below shows the revi...

Page 87: ...PISO CANFD series CAN FD card User Manual version 1 0 0 Page 87 Copyright 2021 ICP DAS Co Ltd All Rights Reserved E mail service icpdas com 4 2 Dimensions 4 2 1 PISO CAN200U FD D PISO CAN400U FD D...

Page 88: ...PISO CANFD series CAN FD card User Manual version 1 0 0 Page 88 Copyright 2021 ICP DAS Co Ltd All Rights Reserved E mail service icpdas com 4 2 2 PISO CAN200U FD T PISO CAN400U FD T...

Reviews: