ICP DAS USA I-7565M-HS User Manual Download Page 73

I-7565M-HS USB to CAN converter User Manual (version 1.0.0)   

 

 

          Page: 73

 

 

Copyright © 2018 ICP DAS Co., Ltd. All Rights Reserved. E-mail: [email protected]

 

5.7.3   CANHS_ClearCANTxBuf 

This function is used to clear all the CAN messages in the software transmitted 

buffer in the assigned CAN port of the I-7565M-HS device.

 

 

Syntax: 

C++ 

int CANHS_ClearCANTxBuf(WORD i_wDevice_id, BYTE i_byCANPort); 
 

C# 

Int32 CANHS_ClearCANTxBuf(UInt16 i_wDevice_id, Byte i_byCANPort); 

 

Parameter: 

i_wDevice_id 

[in] 

The assigned device ID of the I-7565M-HS device. 

 

i_byCANPort 

[in]   

The assigned CAN port of the I-7565M-HS device.

 

 

Return Value: 

Return 0 means success, others means failure.

 

 
 
 
 

 

 

Summary of Contents for I-7565M-HS

Page 1: ...o CAN converter User Manual version 1 0 0 Page 1 Copyright 2018 ICP DAS Co Ltd All Rights Reserved E mail service icpdas com I 7565M HS User Manual Version 1 0 0 Jun 2018 Service and usage information...

Page 2: ...t ICP 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 D...

Page 3: ...on 14 3 Network Deployment 15 3 1 Driving Capability 15 4 Software Utility 16 4 1 Install the I 7565 HS Utility 16 4 2 Setting up the I 7565M HS 19 4 3 Start to use I 7565 HS Utility tool 20 4 3 1 Con...

Page 4: ...ANWhiteListMode 52 5 5 10 CANHS_SetCANBlackListMode 53 5 5 11 CANHS_GetCANBlackListMode 54 5 5 12 CANHS_SetCANWhiteListCANID 55 5 5 13 CANHS_GetCANWhiteListCANID 56 5 5 14 CANHS_SetCANBlackListCANID 5...

Page 5: ...Ltd All Rights Reserved E mail service icpdas com 5 8 1 CANHS_GetDllVersion 74 5 8 2 CANHS_GetFwVer 75 5 8 3 CANHS_GetModuleStatus 76 5 9 Return Codes 77 6 Firmware Upgrade 78 7 Appendix 82 7 1 Revisi...

Page 6: ...unction no matter what the baud rate is When connecting I 7565M HS to PC PC will load the relevant device driver automatically hot plug play Therefore users can make data collection and processing of...

Page 7: ...ecification ISO 11898 2 CAN 2 0A and CAN 2 0B CAN Filter Configuration Selectable whitelist and blacklist CAN ID filter via Utility tool Receive Buffer 512 data frames Max Data Flow 15000 fps for Tx R...

Page 8: ...ower supply powered by USB Programmable CAN Bus baud rate from 10kbps to 1000kbps Support CAN Bus message filter configuration Timestamp of CAN message with at least 10us precision Watchdog inside Pro...

Page 9: ...018 ICP DAS Co Ltd All Rights Reserved E mail service icpdas com 2 Technical data 2 1 Block Diagram The following figure is the block diagram illustrating the functions of the I 7565M HS Figure 2 1 Bl...

Page 10: ...CAN_H CAN_High bus line of CAN1 port 5 CAN_GND CAN ground of CAN2 port 6 CAN_L CAN_Low bus line of CAN2 port 7 F G Frame Ground 8 CAN_H CAN_High bus line of CAN2 port Electronic circuits are always in...

Page 11: ...ription LED Name Color Description Power Red Power status of USB port MS Red Module status OFF no error ON hardware malfunction CAN1_ST Red CAN Bus status OFF no error ON CAN1 Bus Off Flash CAN1 Bus e...

Page 12: ...se terminal resistors are shown as following figure Figure 2 4 CAN Bus network topology Each I 7565M HS includes one build in 120 terminal resistor for CAN1 CAN2 ports users can decide if it is enable...

Page 13: ...S Co Ltd All Rights Reserved E mail service icpdas com Generally if your application is as follows we recommend you to enable the terminal resistor Figure 2 6 Application 1 If your application is like...

Page 14: ...r User Manual version 1 0 0 Page 14 Copyright 2018 ICP DAS Co Ltd All Rights Reserved E mail service icpdas com 2 6 Wire Connection The wire connection of the I 7565M HS is displayed below Figure 2 8...

Page 15: ...ommended DC parameter for CAN Bus Line Wire Cross Section mm2 Resistance km 0 25 AWG23 90 0 5 AWG20 50 0 8 AWG18 33 1 3 AWG16 20 Under the condition described above users can refer to the following ta...

Page 16: ...1 Install the I 7565 HS Utility Step 1 Get the I 7565 HS Utility The software is located at CD can converter i 7565m hs software utility ftp ftp icpdas com pub cd fieldbus_cd can converter i 7565m hs...

Page 17: ...on 1 0 0 Page 17 Copyright 2018 ICP DAS Co Ltd All Rights Reserved E mail service icpdas com 2 Select the installation path of the I 7565 HS Utility and click the Next button 3 Confirm the installatio...

Page 18: ...I 7565M HS USB to CAN converter User Manual version 1 0 0 Page 18 Copyright 2018 ICP DAS Co Ltd All Rights Reserved E mail service icpdas com 4 Installation complete Click the Close button to exit...

Page 19: ...After installing the utility tool please follow the following steps to set up the communication between the Utility and the I 7565M HS device Step 1 Connect the PC available USB port with the USB port...

Page 20: ...HS Utility tool Figure 4 2 Main frame of the I 7565 HS Utility tool A Menu tool bar File Load Save configuration of the Send frame and save received messages on Receive frame Connect Connect Disconne...

Page 21: ...rved E mail service icpdas com B Send Receive frame This field will be divided into two parts after connect with module One is used for display received CAN messages and the other is used for send CAN...

Page 22: ...le information on Module Name location of the Utility Connect frame User can re connect to re scan the newer inserted I 7565M HS module Figure 4 3 Connect to screen of the I 7565 HS Utility Before con...

Page 23: ...rameters are list below CAN Port Enable Port Enable Enable Disable the CAN1 CAN2 port Silent Mode Set the CAN port into silent mode When setting the CAN port into silent mode the CAN port will just re...

Page 24: ...he screen for CAN Bus communication function will show up like below picture Figure 4 4 Communication screen of the I 7565 HS Utility The above is the illustration for the Communication screen and it...

Page 25: ...ton It will delete all the CAN messages in CAN Message Send Area 6 Send button It will send the CAN message of the assigned green row in CAN Message Send Area If the value in the Timer field is zero i...

Page 26: ...r review the received CAN meesages on the CAN Bus via I 7565M HS devices If the connection to I 7565M HS is successful then the screen for CAN Bus communication function will show up like below pictur...

Page 27: ...ear all the CAN message data in CAN Message Receive Area and the RecvCnt value to be zero 4 Scrolling checkbox If the Scrolling checkbox is checked the received CAN message data in CAN Message Receive...

Page 28: ...ure CAN ID Filter By using the I 7565M HS Utiltiy tool user can configure the CAN ID filter of the module After clicking the Module Confiuration item user can set accepted CAN IDs on the Whitelist fra...

Page 29: ...the selected CAN1 CAN2 port s whitelist blacklist 2 Get CAN Whitelist IDs Get CAN Blacklist IDs button Get all the CAN Whitelist Blacklist IDs setting from the I 7565M HS module 3 Set CAN Whitelist ID...

Page 30: ...Manual version 1 0 0 Page 30 Copyright 2018 ICP DAS Co Ltd All Rights Reserved E mail service icpdas com Delete a selected row CAN ID from Whitelist Blacklist frame 7 Clear Table button Delete all CA...

Page 31: ...user can send other command to get the module information and reset the module From the Configuration Options block user can get the module information firmware version and module hardware status CAN...

Page 32: ...ack fail 31 1 Reserved Get CAN Status command 1 CAN Status item 0x value in hexadecimal format Please refer to appendix 7 3 for CAN Status definition 2 CAN Error Counter item 0x value in hexadecimal f...

Page 33: ...right 2018 ICP DAS Co Ltd All Rights Reserved E mail service icpdas com Get CAN Rx FPS command 1 CAN Rx FPS item CAN1 CAN2 received CAN message frame per second Reset Module command Reset the module A...

Page 34: ...tp ftp icpdas com pub cd fieldbus_cd can converter i 7565m hs software libr ary The demos are located at CD can converter i 7565m hs software demos ftp ftp icpdas com pub cd fieldbus_cd can converter...

Page 35: ...send receive CAN messages through I 7565M HS Softeware Function All the transmitted received CAN messages will be saved in software buffer provided by CAN_HS library first These related software funct...

Page 36: ...CANHS_GetCANBaudSP Get the current baud rate and sample point in the assigned CAN port 5 CANHS_GetCANBaudSPEEP Get the baud rate and sample point of EEPROM setting in the assigned CAN port 6 CANHS_Se...

Page 37: ...4 CANHS_GetCANHWSendMode Get the hardware cyclic sending CAN message mode in the assigned CAN port 5 CANHS_SetCANHWSendMsg Set the hardware cyclic sending CAN message content in the assigned CAN port...

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

Page 39: ...m 5 4 Init Functions These functions are used to scan and open close the valid and necessary I 7565M HS device 5 4 1 CANHS_ScanDevice This function is used to scan all the valid I 7565M HS devices on...

Page 40: ...list all the scanned I 7565M HS devices PID product ID and BID board ID Syntax C BYTE CANHS_ListDevice WORD o_wPID DWORD o_dwBID C Byte CANHS_ListDevice UInt16 o_wPID UInt32 o_dwBID Parameter o_wPID...

Page 41: ...unctions to send receive CAN messages via device ID Syntax C int CANHS_OpenDevice WORD o_wDevice_id WORD i_wpid DWORD i_wbid C Int32 CANHS_OpenDevice out UInt16 o_wDevice_id UInt16 i_wpid UInt32 i_wbi...

Page 42: ...ice This function is used to close the I 7565M HS device After the device closed all the resoruces the API Library used will be released Syntax C int CANHS_CloseDevice WORD i_wDevice_id C Int32 CANHS_...

Page 43: ...Syntax C int CANHS_SetCANOPMode WORD i_wDevice_id BYTE i_byCANPort WORD i_wEnable WORD i_wMode C Int32 CANHS_SetCANOPMode UInt16 i_wDevice_id Byte i_byCANPort UInt16 i_wEnable UInt16 i_wMode Parameter...

Page 44: ...E i_byCANPort WORD o_wEnable WORD o_wMode C Int32 CANHS_GetCANOPMode UInt16 i_wDevice_id Byte i_byCANPort out UInt16 o_wEnable out UInt16 o_wMode Parameter i_wDevice_id in The assigned device ID of th...

Page 45: ...Port DWORD i_dwBR DWORD i_dwSP C Int32 CANHS_SetCANBaudSP UInt16 i_wDevice_id Byte i_byCANPort UInt32 i_dwBR UInt32 i_dwSP Parameter i_wDevice_id in The assigned device ID of the I 7565M HS device i_b...

Page 46: ...WORD o_dwBR DWORD o_dwSP C Int32 CANHS_GetCANBaudSP UInt16 i_wDevice_id Byte i_byCANPort out UInt32 o_dwBR out UInt32 o_dwSP Parameter i_wDevice_id in The assigned device ID of the I 7565M HS device i...

Page 47: ...dwBR DWORD o_dwSP C Int32 CANHS_GetCANBaudSPEEP UInt16 i_wDevice_id Byte i_byCANPort out UInt32 o_dwBR out UInt32 o_dwSP Parameter i_wDevice_id in The assigned device ID of the I 7565M HS device i_byC...

Page 48: ..._dwArbitration Parameter i_wDevice_id in The assigned device ID of the I 7565M HS device i_byCANPort in The assigned CAN port of the I 7565M HS device i_byMode in Mode of CAN ID can be set to 2 0A 11...

Page 49: ...icpdas com Example 1 All CAN ID passed i_byMode 0 i_dwMask 0x000 i_dwArbitration 0x000 2 Filter all messages except ID of 0x123 i_byMode 0 i_dwMask 0x7FF i_dwArbitration 0x123 3 Filter all messages e...

Page 50: ...t Byte o_byMode UInt32 o_dwMask UInt32 o_dwArbitration Parameter i_wDevice_id in The assigned device ID of the I 7565M HS device i_byCANPort in The assigned CAN port of the I 7565M HS device o_byMode...

Page 51: ...le Syntax C int CANHS_SetCANWhiteListMode WORD i_wDevice_id BYTE i_byCANPort BYTE i_byMode C Int32 CANHS_SetCANWhiteListMode UInt16 i_wDevice_id Byte i_byCANPort Byte i_byMode Parameter i_wDevice_id i...

Page 52: ...e_id BYTE i_byCANPort BYTE o_byMode C Int32 CANHS_GetCANWhiteListMode UInt16 i_wDevice_id Byte i_byCANPort out Byte o_byMode Parameter i_wDevice_id in The assigned device ID of the I 7565M HS device i...

Page 53: ...le Syntax C int CANHS_SetCANBlackListMode WORD i_wDevice_id BYTE i_byCANPort BYTE i_byMode C Int32 CANHS_SetCANBlackListMode UInt16 i_wDevice_id Byte i_byCANPort Byte i_byMode Parameter i_wDevice_id i...

Page 54: ...e_id BYTE i_byCANPort BYTE o_byMode C Int32 CANHS_GetCANBlackListMode UInt16 i_wDevice_id Byte i_byCANPort out Byte o_byMode Parameter i_wDevice_id in The assigned device ID of the I 7565M HS device i...

Page 55: ...iteListCANID UInt16 i_wDevice_id Byte i_byCANPort UInt16 i_wCIDNum In Out UInt32 i_dwCID Parameter i_wDevice_id in The assigned device ID of the I 7565M HS device i_byCANPort in The assigned CAN port...

Page 56: ...istCANID UInt16 i_wDevice_id Byte i_byCANPort out UInt16 o_wCIDNum In Out UInt32 o_dwCID Parameter i_wDevice_id in The assigned device ID of the I 7565M HS device i_byCANPort in The assigned CAN port...

Page 57: ...lackListCANID UInt16 i_wDevice_id Byte i_byCANPort UInt16 i_wCIDNum In Out UInt32 i_dwCID Parameter i_wDevice_id in The assigned device ID of the I 7565M HS device i_byCANPort in The assigned CAN port...

Page 58: ...istCANID UInt16 i_wDevice_id Byte i_byCANPort out UInt16 o_wCIDNum In Out UInt32 o_dwCID Parameter i_wDevice_id in The assigned device ID of the I 7565M HS device i_byCANPort in The assigned CAN port...

Page 59: ...he assigned device ID of the I 7565M HS device i_byCANPort in The assigned CAN port of the I 7565M HS device o_dwCANStatus out The CAN Bus status in the assigned CAN port of the I 7565M HS device Plea...

Page 60: ...I 7565M HS USB to CAN converter User Manual version 1 0 0 Page 60 Copyright 2018 ICP DAS Co Ltd All Rights Reserved E mail service icpdas com Return Value Return 0 means success others means failure...

Page 61: ...service icpdas com 5 5 17 CANHS_ResetModule This function is used to reset the I 7565M HS device Syntax C Int CANHS_ResetModule WORD i_wDevice_id C Int32 CANHS_ResetModule UInt16 i_wDevice_id Paramete...

Page 62: ...TxMsg WORD i_wDevice_id BYTE i_byCANPort BYTE i_byMode DWORD i_dwID BYTE i_byRTR BYTE i_byDlen BYTE i_byData C Int32 CANHS_SetCANTxMsg UInt16 i_wDevice_id Byte i_byCANPort Byte i_byMode UInt32 i_dwID...

Page 63: ...Co Ltd All Rights Reserved E mail service icpdas com 0 no RTR 1 RTR i_byDlen in CAN message data length parameter Valid range 0 8 i_byData in out This point to an user defined eight bytes array buffer...

Page 64: ...d Byte i_byCANPort out Byte o_byType out Byte o_byMode out UInt32 o_dwID out Byte o_byRTR out Byte o_byDlen In Out Byte o_byData out UInt32 o_dw_TimeStamp_s out UInt32 o_dw_TimeStamp_us Parameter i_wD...

Page 65: ...000 0x1FFFFFFF Event message 0xEEEEEEE o_byRTR out CAN message RTR Remote Transmission Request parameter 0 no RTR 1 RTR o_byDlen in CAN message data length parameter Valid range 0 8 o_byData in out Th...

Page 66: ...ANHWSendMode WORD i_wDevice_id BYTE i_byCANPort BYTE i_byMode C Int32 CANHS_SetCANHWSendMode UInt16 i_wDevice_id Byte i_byCANPort Byte i_byMode Parameter i_wDevice_id in The assigned device ID of the...

Page 67: ...mer Syntax C int CANHS_GetCANHWSendMode WORD i_wDevice_id BYTE i_byCANPort BYTE o_byMode C Int32 CANHS_GetCANHWSendMode UInt16 i_wDevice_id Byte i_byCANPort out Byte o_byMode Parameter i_wDevice_id in...

Page 68: ..._byData DWORD i_dwTimer DWORD i_dwCounter C Int32 CANHS_SetCANHWSendMsg UInt16 i_wDevice_id Byte i_byCANPort Byte i_byMode UInt32 i_dwID Byte i_byRTR Byte i_byDlen In Out Byte i_byData UInt32 i_dwTime...

Page 69: ...parameter Valid range 0 8 i_byData in out This point to an user defined eight bytes array buffer for CAN message data parameter i_dwTimer in Time period of the module hardware timer to send this CAN m...

Page 70: ...S device Syntax C int CANHS_GetCANRxFramePerSec WORD i_wDevice_id BYTE i_byCANPort WORD o_wRxFPS C Int32 CANHS_GetCANRxFramePerSec UInt16 i_wDevice_id Byte i_byCANPort out UInt16 o_wRxFPS Parameter i_...

Page 71: ...o get the count of received CAN messages in the software received buffer in the assigned CAN port of the I 7565M HS device Syntax C int CANHS_GetCANRxMsgCount WORD i_wDevice_id BYTE i_byCANPort DWORD...

Page 72: ...sages in the software received buffer in the assigned CAN port of the I 7565M HS device Syntax C int CANHS_ClearCANRxBuf WORD i_wDevice_id BYTE i_byCANPort C Int32 CANHS_ClearCANRxBuf UInt16 i_wDevice...

Page 73: ...ages in the software transmitted buffer in the assigned CAN port of the I 7565M HS device Syntax C int CANHS_ClearCANTxBuf WORD i_wDevice_id BYTE i_byCANPort C Int32 CANHS_ClearCANTxBuf UInt16 i_wDevi...

Page 74: ...the VCI_CAN library information or helpful for users program 5 8 1 CANHS_GetDllVersion This function is used to get the version of CAN_HS library Syntax C DWORD CANHS_GetDllVersion void C UInt32 CANH...

Page 75: ...irmware version of the I 7565M HS device Syntax C Int CANHS_GetFwVer WORD i_wDevice_id WORD o_wFwVer C Int32 CANHS_GetFwVer UInt16 i_wDevice_id out UInt16 o_wFwVer Parameter i_wDevice_id in The assign...

Page 76: ...CANHS_GetModuleStatus WORD i_wDevice_id DWORD o_dwStatus C Int32 CANHS_GetModuleStatus UInt16 i_wDevice_id out UInt32 o_dwStatus Parameter i_wDevice_id in The assigned device ID of the I 7565M HS dev...

Page 77: ...ld of the configuration command error 0x3 DL field of the configuration command error 0x4 Fail to write data into device 0x10001 Invalid device 0x10002 Device already in used 0x10003 Device not exist...

Page 78: ...6 Firmware Upgrade Please refer to the following steps to upgrade the firmware of module Step 1 Set the Init dip switch of the I 7565M HS to ON and connect the PC available USB port with the USB port...

Page 79: ...e the firmware of the I 7565M HS module via USB and the module will become a USB Mass Storage Device and also shows a folder like following picture automatically Step 3 Get the Firmware Update Tool an...

Page 80: ...ser Manual version 1 0 0 Page 80 Copyright 2018 ICP DAS Co Ltd All Rights Reserved E mail service icpdas com Step 5 Select USB port and the necessary USB Disk of PC Step 6 Press the the Browser button...

Page 81: ...are Update button to update the firmware After successfully to upgrade the firmware the Firmware Update Success Please Reboot Module information will be display on the 3 Firmware Update frame Step 8 S...

Page 82: ...right 2018 ICP DAS Co Ltd All Rights Reserved E mail service icpdas com 7 Appendix 7 1 Revision History This chapter provides revision history information to this document The table below shows the re...

Page 83: ...I 7565M HS USB to CAN converter User Manual version 1 0 0 Page 83 Copyright 2018 ICP DAS Co Ltd All Rights Reserved E mail service icpdas com 7 2 Dimension...

Page 84: ...of a message or acknowledge bit or active error flag or overload flag the device wanted to send a LOW dominant level data or identifier bit logical value 0 but the monitored Bus value was HIGH recess...

Page 85: ...escription 7 0 TEC Transmit error counter Current value of the transmit error counter maximum value 255 14 8 REC Receive error counter Current value of the receive error counter maximum value 127 15 R...

Reviews: