Page 1
ГК Атлант Инжиниринг – официальный представитель в РФ и СНГ +7(495)109-02-08 sales@bbrc.ru www.bbrc.ru PISO-CAN200/400 PISO-CAN100U/200U/400U/800U PEX-CAN200i PCM-CAN100/200/200P User’s Manual Warranty All products manufactured by ICP DAS are warranted against defective materials for a period of one year from the date of delivery to the original purchaser.
ГК Атлант Инжиниринг – официальный представитель в РФ и СНГ +7(495)109-02-08 sales@bbrc.ru www.bbrc.ru General Information Introduction The CAN (Controller Area Network) is a serial communication protocol, which efficiently supports distributed real-time control with a very high level of security. It is especially suited for networking "intelligent" devices as well as sensors and actuators within a system or sub-system.
ГК Атлант Инжиниринг – официальный представитель в РФ и СНГ +7(495)109-02-08 sales@bbrc.ru www.bbrc.ru Hardware Specifications 1.3.1 PCM-CAN100/200/200P Model Name PCM-CAN100-D PCM-CAN200-D PCM-CAN200P-D Bus Interface Type PCI-104 PC-104+ CAN Interface Controller NXP SJA1000T with 16 MHz clock Transceiver NXP 82C250 Channel number 9-pin female and male D-Sub...
ГК Атлант Инжиниринг – официальный представитель в РФ и СНГ +7(495)109-02-08 sales@bbrc.ru www.bbrc.ru 1.3.2 PEX-CAN200i Model Name PEX-CAN200i-D PEX-CAN200i-T Bus Interface Type 33 MHz, 32 bit, X1 PCI Express bus CAN Interface Controller NXP SJA1000T with 16 MHz clock Transceiver NXP 82C250 Channel number 2 Connector...
ГК Атлант Инжиниринг – официальный представитель в РФ и СНГ +7(495)109-02-08 sales@bbrc.ru www.bbrc.ru 1.3.3 PISO-CAN200/200U Model Name PISO-CAN200-D PISO-CAN200-T PISO-CAN200U-D PISO-CAN200U-T Bus Interface PCI bus, 5 V, 33 MHz, 32-bit, plug Universal PCI, 3.3 V and 5 V, 33 MHz,...
ГК Атлант Инжиниринг – официальный представитель в РФ и СНГ +7(495)109-02-08 sales@bbrc.ru www.bbrc.ru 1.3.4 PISO-CAN400/400U Model Name PISO-CAN400U-D PISO-CAN400U-T PISO-CAN400U-D PISO-CAN400U-T Bus Interface PCI bus, 5 V, 33 MHz, 32-bit, plug Universal PCI, 3.3 V and 5 V, 33 MHz, Type and play 32-bit, plug and play...
ГК Атлант Инжиниринг – официальный представитель в РФ и СНГ +7(495)109-02-08 sales@bbrc.ru www.bbrc.ru 1.3.5 PISO-CAN100U Model Name PISO-CAN100U-D PISO-CAN100U-T Bus Interface Universal PCI, 3.3 V and 5 V, 33 MHz, 32-bit, plug and Type play CAN Interface Controller NXP SJA1000T with 16 MHz clock Transceiver NXP 82C250 Channel number...
ГК Атлант Инжиниринг – официальный представитель в РФ и СНГ +7(495)109-02-08 sales@bbrc.ru www.bbrc.ru 1.3.6 PISO-CAN800U Bus Interface Type Universal PCI, 3.3 V and 5 V, 33 MHz, 32-bit, plug and play CAN Interface Controller NXP SJA1000T with 16 MHz clock Transceiver NXP TJA1042 Channel number...
ГК Атлант Инжиниринг – официальный представитель в РФ и СНГ +7(495)109-02-08 sales@bbrc.ru www.bbrc.ru Product Check List Besides this manual, the package includes the following items: Hardware of PISO-CAN or PEX-CAN or PCM-CAN CAN card ADP-9 Board (for PISO-CAN400/PISO-CAN400U only) Software CD ROM It is recommended that users read the release note first.
This section will describe the hardware settings of the PISO-CAN, PEX-CAN, and PCM-CAN series CAN card. This information includes the wire connection and terminal resistance configuration for the CAN network. Board Layout Figure2.1 PISO-CAN200 Board LAYOUT PISO-CAN/PEX-CAN/PCM-CAN Series User’s Manual (v2.6 Dec/2013) ------- 13...
Page 14
ГК Атлант Инжиниринг – официальный представитель в РФ и СНГ +7(495)109-02-08 sales@bbrc.ru www.bbrc.ru Figure2.2 PISO-CAN400 Board LAYOUT Figure2.3 PISO-CAN100U Board LAYOUT PISO-CAN/PEX-CAN/PCM-CAN Series User’s Manual (v2.6 Dec/2013) ------- 14...
Page 15
ГК Атлант Инжиниринг – официальный представитель в РФ и СНГ +7(495)109-02-08 sales@bbrc.ru www.bbrc.ru Figure2.4 PISO-CAN200U Board LAYOUT Figure2.5 PISO-CAN400U Board LAYOUT PISO-CAN/PEX-CAN/PCM-CAN Series User’s Manual (v2.6 Dec/2013) ------- 15...
Page 16
ГК Атлант Инжиниринг – официальный представитель в РФ и СНГ +7(495)109-02-08 sales@bbrc.ru www.bbrc.ru Figure2.6 ADP-9 Board LAYOUT (For PISO-CAN400/400U Only) Figure2.7 PISO-CAN800U Board LAYOUT PISO-CAN/PEX-CAN/PCM-CAN Series User’s Manual (v2.6 Dec/2013) ------- 16...
Page 17
ГК Атлант Инжиниринг – официальный представитель в РФ и СНГ +7(495)109-02-08 sales@bbrc.ru www.bbrc.ru PEX-CAN200i Figure2.8 PEX-CAN200i Board LAYOUT Figure2.9 PCM-CAN200 Board LAYOUT PISO-CAN/PEX-CAN/PCM-CAN Series User’s Manual (v2.6 Dec/2013) ------- 17...
ГК Атлант Инжиниринг – официальный представитель в РФ и СНГ +7(495)109-02-08 sales@bbrc.ru www.bbrc.ru Jumper Selection PISO-CAN200400 Table 2.1 Jumper Selections Jumper Description Status CAN Port 3 Connector, 1 2 3 connecting PISO-CAN400 Pin1: CAN_L board and ADP-9 board. Pin2: CAN_H Pin3: Shield JP 2 CAN Port 4 Connector,...
Page 19
ГК Атлант Инжиниринг – официальный представитель в РФ и СНГ +7(495)109-02-08 sales@bbrc.ru www.bbrc.ru PISO-CAN100U/200U/400U Table 2.2 Jumper Selections Jumper Description Status CAN Port 3 Connector, 1 2 3 connecting PISO-CAN400U Pin1: CAN_L board and ADP-9 board. Pin2: CAN_H Pin3: Shield CAN Port 4 Connector, 1 2 3 connecting PISO-CAN400U...
Page 20
ГК Атлант Инжиниринг – официальный представитель в РФ и СНГ +7(495)109-02-08 sales@bbrc.ru www.bbrc.ru PISO-CAN800U Table 2.3 Jumper Selections Jumper Description Status Enable Disable Port 1 terminator resister(120Ω) selection Port 2 terminator resister(120Ω) selection Port 4 terminator resister(120Ω) selection Port 3 terminator resister(120Ω) selection Port 5 terminator resister(120Ω) selection...
Page 21
ГК Атлант Инжиниринг – официальный представитель в РФ и СНГ +7(495)109-02-08 sales@bbrc.ru www.bbrc.ru PEX-CAN200i-D/T Table 2.4 Jumper Selections Jumper Description Status Enable Disable Port 1 terminator resister(120Ω) selection 1 2 3 1 2 3 Port 2 terminator resister(120Ω) selection 1 2 3 1 2 3 PCM-CAN100 and PCM-CAN200 Table 2.5 shows the appropriate switch setting and signals used for each...
PISO-CAN200/400-T PISO-CAN100U/200U/400U-T, PEX-CAN200i-T are equipped with 1/2/4 sets of 5-pin screw terminal connectors, the PISO-CAN200/400-D and PISO-CAN100U/200U/400U-D, PEX-CAN200i-D and PCM-CAN100/200 are equipped with 1/2/4 sets of 9-pin male D-sub connectors for wire connection of the CAN bus. And the PISO-CAN800U is equipped with 2 sets of female DB-37 connector. Via the CA-9-3715D/CA-9-3705 cable, user can convert the female DB-37 connector to 9-pin male D-sub connectors.
ГК Атлант Инжиниринг – официальный представитель в РФ и СНГ +7(495)109-02-08 sales@bbrc.ru www.bbrc.ru 2.3.2 9-pin male D-sub connectors The 9-pin male D-sub connector of the CAN bus interface is shown in Figure 2.9 and the corresponding pin assignments are given in Table 2.8. Figure2.10 9-pin male D-sub connector Table 2.8...
ГК Атлант Инжиниринг – официальный представитель в РФ и СНГ +7(495)109-02-08 sales@bbrc.ru www.bbrc.ru Installation 1. Configure the jumper settings on your PISO-CAN/PEX-CAN/PCM-CAN in accordance with your particular requirements. 2. Shutdown your system and take off the chassis of your machine. 3.
ГК Атлант Инжиниринг – официальный представитель в РФ и СНГ +7(495)109-02-08 sales@bbrc.ru www.bbrc.ru Software Installation The driver of PISO-CAN or PCM-CAN can be used in 2K/XP/7 Windows environments. Users find driver path “\CAN\PCI\PCM_PISO-CAN_series\driver\” in the Fieldbus_CD. Execute the PISO-CAN.exe file to start install the driver. Install the PISO-CAN or PCM-CAN card driver Step 1: Insert the product CD into the CD-ROM and find the path \ CAN\PCI\...
Page 27
ГК Атлант Инжиниринг – официальный представитель в РФ и СНГ +7(495)109-02-08 sales@bbrc.ru www.bbrc.ru Step 3: Select the folder where the PISO-CAN setup would be installed and click “Next” button to continue. Step 4: Click the button “Install” to continue. PISO-CAN/PEX-CAN/PCM-CAN Series User’s Manual (v2.6 Dec/2013) ------- 27...
Page 28
ГК Атлант Инжиниринг – официальный представитель в РФ и СНГ +7(495)109-02-08 sales@bbrc.ru www.bbrc.ru Step 5: Finally, restart the computer to complete the installation. When finishing the installation. The PISO-CAN folder would be found at the Start menu shown as below. Remove the PISO-CAN driver If the PISO-CAN driver is not used any more, users can click the “Uninstall”...
ГК Атлант Инжиниринг – официальный представитель в РФ и СНГ +7(495)109-02-08 sales@bbrc.ru www.bbrc.ru Installation DLL Driver Windows DLL Driver The DLL driver is the collection of function calls on the PISO-CAN, PEX-CAN and PCM-CAN series cards used for Windows 2000/XP/7 systems. The application structure is presented in the following figure.
Page 30
ГК Атлант Инжиниринг – официальный представитель в РФ и СНГ +7(495)109-02-08 sales@bbrc.ru www.bbrc.ru RTX Driver In order to satisfy the users to apply the RTX system, ICPDAS provides the RTX driver for PISO-CAN series CAN card. If users want to combine the CAN communication interface in their time-critical system, the RTX driver of the PISO-CAN series CAN cards can help them to do this easily and quickly.
ГК Атлант Инжиниринг – официальный представитель в РФ и СНГ +7(495)109-02-08 sales@bbrc.ru www.bbrc.ru DLL Function Definition and Description All the functions provided in the PISO-CAN, PEX-CAN, or PCM-CAN (hereinafter referred to as PISO-CAN) are listed in the following table and detailed information for every function is presented in the following sub-section.
Page 32
ГК Атлант Инжиниринг – официальный представитель в РФ и СНГ +7(495)109-02-08 sales@bbrc.ru www.bbrc.ru Table 4.1 DLL function definition Function definition Section WORD CAN_GetDllVersion(); 4.1.1 int CAN_TotalBoard(); 4.1.2 int CAN_GetBoardInf(BYTE BoardNo, DWORD *dwVID, DWORD *dwDID, DWORD *dwSVID, DWORD *dwSDID, DWORD 4.1.3 *dwIrqNo);...
Page 33
ГК Атлант Инжиниринг – официальный представитель в РФ и СНГ +7(495)109-02-08 sales@bbrc.ru www.bbrc.ru Table 4.2 Interpretation of the return code Error ID Comment Return Code CAN_NoError CAN_DriverError Driver error CAN_ActiveBoardError This board can’t be activated. The board number exceeds the CAN_BoardNumberError maximum board number (7).
ГК Атлант Инжиниринг – официальный представитель в РФ и СНГ +7(495)109-02-08 sales@bbrc.ru www.bbrc.ru 4.1.1 CAN_GetDllVersion Description: Obtain the version information of PISOCAN.dll driver. Syntax: WORD CAN_GetDllVersion(viod) Parameter: None Return: DLL version information. For example: If 101(hex) is return, it means driver version is 1.01.
ГК Атлант Инжиниринг – официальный представитель в РФ и СНГ +7(495)109-02-08 sales@bbrc.ru www.bbrc.ru 4.1.3 CAN_GetBoardInf Description: Obtain the information of PISO-CAN boards, which include vender ID, device ID and interrupt number. Syntax: int CAN_GetBoardInf(BYTE BoardNo, DWORD *dwVID, DWORD *dwDID, DWORD *dwSVID,DWORD *dwSDID, DWORD *dwSAuxID, DWORD *dwIrqNo) Parameter: BoardNo:...
ГК Атлант Инжиниринг – официальный представитель в РФ и СНГ +7(495)109-02-08 sales@bbrc.ru www.bbrc.ru 4.1.4 CAN_GetCardPortNum Description: Call this function to Get CAN port number of the PISO-CAN card. Syntax: int CAN_GetCardPortNum(BYTE BoardNo, BYTE *bGetPortNum) Parameter: BoardNo: [input] PISO-CAN board number (0~7). * bGetPortNum: [output] Port number of the CAN card Return: CAN_NoError: OK...
ГК Атлант Инжиниринг – официальный представитель в РФ и СНГ +7(495)109-02-08 sales@bbrc.ru www.bbrc.ru 4.1.5 CAN_ActiveBoard Description: Activate the device. It must be called once before using other functions of PISO-CAN board. Syntax: int CAN_ActiveBoard(BYTE BoardNo) Parameter: BoardNo: [input] PISO-CAN board number (0~7). Return: CAN_NoError: OK CAN_BoardNumberError: BoardNo exceeds the current total board...
ГК Атлант Инжиниринг – официальный представитель в РФ и СНГ +7(495)109-02-08 sales@bbrc.ru www.bbrc.ru 4.1.6 CAN_CloseBoard Description: Stop and close the kernel driver and release the device resource from computer device resource. This method must be called once before exiting the user’s application program. Syntax: int CAN_CloseBoard(BYTE BoardNo) Parameter:...
ГК Атлант Инжиниринг – официальный представитель в РФ и СНГ +7(495)109-02-08 sales@bbrc.ru www.bbrc.ru 4.1.7 CAN_BoardIsActive Description: Obtain the information about the specific board is active or not. Syntax: int CAN_BoardIsActive(BYTE BoardNo) Parameter: BoardNo: [input] PISO-CAN board number (0~7). Return: 0: means the board is inactive. 1: means the board is active.
ГК Атлант Инжиниринг – официальный представитель в РФ и СНГ +7(495)109-02-08 sales@bbrc.ru www.bbrc.ru 4.1.8 CAN_Reset Description: Hardware reset CAN controller. Syntax: int CAN_Reset(BYTE BoardNo, BYTE Port) Parameter: BoardNo: [input] PISO-CAN board number (0~7). Port: [input] CAN port number (1~8) Return: CAN_NoError: OK CAN_DriverError: Kernel driver can’t be opened.
ГК Атлант Инжиниринг – официальный представитель в РФ и СНГ +7(495)109-02-08 sales@bbrc.ru www.bbrc.ru 4.1.9 CAN_Init Description: Initiate CAN controller. Syntax: int CAN_Init(BYTE BoardNo, BYTE Port) Parameter: BoardNo: [input] PISO-CAN board number (0~7). Port: [input] CAN port number (1~8) Return: CAN_NoError: OK CAN_DriverError: Kernel driver can’t be opened.
ГК Атлант Инжиниринг – официальный представитель в РФ и СНГ +7(495)109-02-08 sales@bbrc.ru www.bbrc.ru 4.1.10 CAN_Config Description: Configure CAN controller. After calling this function, the CAN controller will enter operating mode. Syntax: int CAN_Config(BYTE BoardNo, BYTE Port,ConfigStruct *CanConfig); Parameter: BoardNo: [input] PISO-CAN board number (0~7). Port: [input] CAN port number (1~8) *ConfigStruct: [input] The point of structure for ConfigStruct is defined as following,...
Page 43
ГК Атлант Инжиниринг – официальный представитель в РФ и СНГ +7(495)109-02-08 sales@bbrc.ru www.bbrc.ru CAN_SoftResetError: CAN controller software reset error. CAN_SetACRError: Set Acceptance code to CAN controller error CAN_SetAMRError: Set Acceptance mask to CAN controller error CAN_SetBaudRateError: Set baud rate to CAN controller error CAN_ConfigError: CAN controller enter operating mode failure.
ГК Атлант Инжиниринг – официальный представитель в РФ и СНГ +7(495)109-02-08 sales@bbrc.ru www.bbrc.ru 4.1.11 CAN_ConfigWithoutStructure Description: This function is the same as CAN_Config. But this function doesn’t use ConfigStruct structure type. To provide this function is for that the structure address of some application development is allocated different from the PISOCAN.lib.
Page 45
ГК Атлант Инжиниринг – официальный представитель в РФ и СНГ +7(495)109-02-08 sales@bbrc.ru www.bbrc.ru CAN_SetBaudRateError: Set baud rate to CAN controller error CAN_ConfigError: CAN controller enter operating mode failure. PISO-CAN/PEX-CAN/PCM-CAN Series User’s Manual (v2.6 Dec/2013) ------- 45...
ГК Атлант Инжиниринг – официальный представитель в РФ и СНГ +7(495)109-02-08 sales@bbrc.ru www.bbrc.ru 4.1.12 CAN_EnableRxIrq Description: Enable receive interrupt for CAN controller. Syntax: int CAN_EnableRxIrq(BYTE BoardNo, BYTE Port) Parameter: BoardNo: [input] PISO-CAN board number (0~7). Port: [input] CAN port number (1~8) Return: CAN_NoError: OK CAN_DriverError: Kernel driver can’t be opened.
ГК Атлант Инжиниринг – официальный представитель в РФ и СНГ +7(495)109-02-08 sales@bbrc.ru www.bbrc.ru 4.1.13 CAN_DisableRxIrq Description: Disable receive interrupt of the CAN controller. Syntax: Int CAN_DisableRxIrq(BYTE BoardNo, BYTE Port) Parameter: BoardNo: [input] PISO-CAN board number (0~7) Port: [input] CAN port number (1~8) Return: CAN_NoError: OK CAN_DriverError: Kernel driver can’t be opened.
ГК Атлант Инжиниринг – официальный представитель в РФ и СНГ +7(495)109-02-08 sales@bbrc.ru www.bbrc.ru 4.1.14 CAN_RxIrqStatus Description: Obtain receive interrupt status of the CAN controller. Syntax: int CAN_RxIrqStatus(BYTE BoardNo, BYTE Port, BYTE *bStatus) Parameter: BoardNo: [input] PISO-CAN board number (0~7) Port: [input] CAN port number (1~8) *bStatus:[output] 0→receive interrupt disable;...
ГК Атлант Инжиниринг – официальный представитель в РФ и СНГ +7(495)109-02-08 sales@bbrc.ru www.bbrc.ru 4.1.15 CAN_InstallIrq Description: Enable or start IRQ for PISO-CAN board. Before calling this function, CAN_EnableRxIrq must to be called first. Syntax: int CAN_InstallIrq(BYTE BoardNo) Parameter: BoardNo: [input] PISO-CAN board number (0~7). Return: CAN_NoError: OK CAN_DriverError: Kernel driver can’t be opened.
ГК Атлант Инжиниринг – официальный представитель в РФ и СНГ +7(495)109-02-08 sales@bbrc.ru www.bbrc.ru 4.1.16 CAN_RemoveIrq Description: Disable or stop IRQ for PISO-CAN board. After calling this function, the interrupts for all CAN controllers on board will be disabled. Syntax: int CAN_RemoveIrq(BYTE BoardNo) Parameter: BoardNo: [input] PISO-CAN board number (0~7).
ГК Атлант Инжиниринг – официальный представитель в РФ и СНГ +7(495)109-02-08 sales@bbrc.ru www.bbrc.ru 4.1.17 CAN_IrqStatus Description: Obtain IRQ status of the PISO-CAN board. Syntax: int CAN_IrqStatus(BYTE BoardNo, BYTE *bStatus) Parameter: BoardNo: [input] PISO-CAN board number (0~7). *bStatus:[output] 0→IRQ disable; 1→ IRQ enable. Return: CAN_NoError: OK CAN_DriverError: Kernel driver can’t be opened.
ГК Атлант Инжиниринг – официальный представитель в РФ и СНГ +7(495)109-02-08 sales@bbrc.ru www.bbrc.ru 4.1.18 CAN_Status Description: Obtain the status of CAN controller for PISO-CAN board. Syntax: int CAN_Status(BYTE BoardNo, BYTE Port,BYTE *bStatus) Parameter: BoardNo: [input] PISO-CAN board number (0~7). Port: [input] CAN port number (1~8) *bStatus:[output] Status value of CAN controller.
ГК Атлант Инжиниринг – официальный представитель в РФ и СНГ +7(495)109-02-08 sales@bbrc.ru www.bbrc.ru 4.1.19 CAN_SendMsg Description: Send a CAN message immediately. Syntax: int CAN_SendMsg(BYTE BoardNo, BYTE Port, PacketStruct *CanPacket) Parameter: BoardNo: [input] PISO-CAN board number (0~7) Port: [input] CAN port number (1~8) *CanPacket: [input] The point of structure for CanPacket is defined as following, typedef struct packet...
ГК Атлант Инжиниринг – официальный представитель в РФ и СНГ +7(495)109-02-08 sales@bbrc.ru www.bbrc.ru 4.1.20 CAN_SendWithoutStruct Description: This function is the same as CAN_SendMsg. But this function doesn’t use PacketStruct structure type. If users use CAN_SendMsg and can’t send CAN message correctly with some application development like dot Net 2003, the CAN_SendWithoutStruct function can instead.
ГК Атлант Инжиниринг – официальный представитель в РФ и СНГ +7(495)109-02-08 sales@bbrc.ru www.bbrc.ru 4.1.21 CAN_RxMsgCount Description: Obtain the amount of CAN messages available within the CAN controller’s RXFIFO or the software buffer (4KBytes). After calling the functions CAN_EnableRxIrq and CAN_InstallIrq, the amount of CAN messages is within the software buffer;...
ГК Атлант Инжиниринг – официальный представитель в РФ и СНГ +7(495)109-02-08 sales@bbrc.ru www.bbrc.ru 4.1.22 CAN_ReceiveMsg Description: Obtain receive message from CAN controller’s RXFIFO or software buffer. After calling functions CAN_EnableRxIrq CAN_InstallIrq, the messages is within the software buffer, otherwise it is within the CAN controller’s RXFIFO.
Page 57
ГК Атлант Инжиниринг – официальный представитель в РФ и СНГ +7(495)109-02-08 sales@bbrc.ru www.bbrc.ru rtr: Remote transmission request len: Data length data[8]: data byte Return: CAN_NoError: OK CAN_BoardNumberError: BoardNo is not correct or exceeds the current total board number. CAN_PortNumberError: Port number is not correct. CAN_ActiveBoardError: This board is not activated.
ГК Атлант Инжиниринг – официальный представитель в РФ и СНГ +7(495)109-02-08 sales@bbrc.ru www.bbrc.ru 4.1.23 CAN_ReceiveWithoutStruct Description: This function is the same as CAN_ReceiveMsg. But this function doesn’t use PacketStruct structure type. To provide this function is for that the structure address of some application development is allocated different from the PISOCAN.lib like dot Net 2003.
Page 59
ГК Атлант Инжиниринг – официальный представитель в РФ и СНГ +7(495)109-02-08 sales@bbrc.ru www.bbrc.ru total board number. CAN_PortNumberError: Port number is not correct. CAN_ActiveBoardError: This board is not activated. CAN_ConfigError: Port has not been configured successfully. CAN_ReceiveBufferEmpty: CAN controller’s RXFIFO is empty. CAN_SoftBufferIsEmpty: Software RX Buffer is empty.
ГК Атлант Инжиниринг – официальный представитель в РФ и СНГ +7(495)109-02-08 sales@bbrc.ru www.bbrc.ru 4.1.24 CAN_ClearSoftBuffer Description: Clear the software buffer of the PISOCAN.DLL driver. Syntax: int CAN_ClearSoftBuffer(BYTE BoardNo, BYTE Port) Parameter: BoardNo: [input] PISO-CAN board number (0~7) Port: [input] CAN port number (1~8) Return: CAN_NoError: OK CAN_BoardNumberError: BoardNo is not correct or exceeds the current...
ГК Атлант Инжиниринг – официальный представитель в РФ и СНГ +7(495)109-02-08 sales@bbrc.ru www.bbrc.ru 4.1.25 CAN_ClearDataOverrun Description: Clear the data overrun status bit for the CAN controller. Syntax: int CAN_ClearDataOverrun(BYTE BoardNo, BYTE Port) Parameter: BoardNo: [input] PISO-CAN board number (0~7) Port: [input] CAN port number (1~8) Return: CAN_NoError: OK CAN_BoardNumberError: BoardNo is not correct or exceeds the current...
ГК Атлант Инжиниринг – официальный представитель в РФ и СНГ +7(495)109-02-08 sales@bbrc.ru www.bbrc.ru 4.1.26 CAN_OutputByte Description: Write data to CAN chip (SJA1000). Syntax: void CAN_OutputByte(BYTE BoardNo, BYTE Port, WORD wOffset, BYTE bValue) Parameter: BoardNo: [input] PISO-CAN board number (0~7) Port: [input] CAN port number (1~8) wOffset: [input] Address offset from base address bValue: [input] Data byte Return:...
ГК Атлант Инжиниринг – официальный представитель в РФ и СНГ +7(495)109-02-08 sales@bbrc.ru www.bbrc.ru 4.1.27 CAN_InputByte Description: Read data from CAN chip (SJA1000). Syntax: BYTE CAN_InputByte(BYTE BoardNo, BYTE Port, WORD wOffset) Parameter: BoardNo: [input] PISO-CAN board number (0~7) Port: [input] CAN port number (1~8) wOffset: [input] Address offset from base address Return: Data Byte of CAN chip.
ГК Атлант Инжиниринг – официальный представитель в РФ и СНГ +7(495)109-02-08 sales@bbrc.ru www.bbrc.ru 4.1.28 CAN_GetSystemFreq Description: Get the clock frequency. It is useful for calculate the time of the time stamp for reception message. Syntax: LONGLONG CAN_GetSystemFreq(void) Parameter: None Return: In Windows 98/Me/NT4 is clock frequency, in Windows 2000/XP is always 10000000.
ГК Атлант Инжиниринг – официальный представитель в РФ и СНГ +7(495)109-02-08 sales@bbrc.ru www.bbrc.ru 4.1.29 CAN_InstallUserIsr (only for Windows 2000/XP) Description: Using this function can allow users to apply ISR (interrupt service routine). When users put their ISR into this function, the interrupt of receiving CAN message will trigger the users’...
ГК Атлант Инжиниринг – официальный представитель в РФ и СНГ +7(495)109-02-08 sales@bbrc.ru www.bbrc.ru 4.1.30 CAN_RemoveUserIsr (only for Windows 2000/XP) Description: When users don’t need the ISR function, call this function to remove users ISR. Syntax: Int CAN_RemoveUserIsr(BYTE BoadNo) Parameter: BoardNo: [input] PISO-CAN board number (0~7) Return: CAN_NoError: OK CAN_DriverError: Kernel driver can’t be opened.
ГК Атлант Инжиниринг – официальный представитель в РФ и СНГ +7(495)109-02-08 sales@bbrc.ru www.bbrc.ru 4.1.31 CAN_BusErrorCode Description: This function is used to get the error code capture (ECC) register of CAN controller. This register obtains information about the type and location of errors on the bus. Syntax: int CAN_BusErrorCode(BYTE BoardNo, BYTE Port, BYTE *bErrorCode)
Page 68
ГК Атлант Инжиниринг – официальный представитель в РФ и СНГ +7(495)109-02-08 sales@bbrc.ru www.bbrc.ru Table 4.6 Bit interpretation of bits ECC.4 to ECC.0 BIT ECC.4 BIT ECC.3 BIT ECC.2 BIT ECC.1 BIT ECC.0 FUNCTION Start of frame ID.28 to ID.21 ID.20 to ID.18 Bit SRTR Bit IDE ID.17 to ID.13...
ГК Атлант Инжиниринг – официальный представитель в РФ и СНГ +7(495)109-02-08 sales@bbrc.ru www.bbrc.ru Flow Diagram for Application In this section, we will show the operation procedure of PISO-CAN/PEX-CAN /PCM-CAN board for sending and receiving CAN message. Figure 4.1 presents the “Send CAN Message” procedure. Figure 4.2 and 4.3 stand for the “receiving CAN Message”...
Page 70
ГК Атлант Инжиниринг – официальный представитель в РФ и СНГ +7(495)109-02-08 sales@bbrc.ru www.bbrc.ru Start of Application CAN_ActiveBoard CAN_Reset CAN_Init CAN_Config CAN_RxMsgCount>0? CAN_ReceiveMsg CAN_CloseBoard End of Application Figure 4.2 Flow Chart of “Receive CAN Massage” PISO-CAN/PEX-CAN/PCM-CAN Series User’s Manual (v2.6 Dec/2013) ------- 70...
Page 71
ГК Атлант Инжиниринг – официальный представитель в РФ и СНГ +7(495)109-02-08 sales@bbrc.ru www.bbrc.ru Start of Application CAN_ActiveBoard CAN_Reset CAN_Init CAN_Config CAN_EnableRxIrq CAN_InstallIrq CAN_RxMsgCount>0? CAN_ReceiveMsg CAN_DisableRxIrq CAN_RemoveIrq CAN_CloseBoard End of Application Figure 4.3 Flow Chart of “Receive CAN Massage with IRQ” PISO-CAN/PEX-CAN/PCM-CAN Series User’s Manual (v2.6 Dec/2013) ------- 71...
ГК Атлант Инжиниринг – официальный представитель в РФ и СНГ +7(495)109-02-08 sales@bbrc.ru www.bbrc.ru Demo Programs for Windows All of demo programs will not work normally if DLL driver would not be installed correctly. During the installation process of DLL driver, the install-shields will register the correct kernel driver to the operation system and copy the DLL driver and demo programs to the correct position based on the driver software package you have selected (windows 2K/XP/7).
Page 73
ГК Атлант Инжиниринг – официальный представитель в РФ и СНГ +7(495)109-02-08 sales@bbrc.ru www.bbrc.ru A brief introduction of the demo programs TxRxCAN_NoIRQ: Demo1 is the example used for starting the PISO-CAN/PEX-CAN /PCM-CAN board. This demo program is designed to send out the CAN message through Port 1 and receive the CAN message immediately at port 2 in the same PISO-CAN/PEX-CAN/PCM-CAN board.
Page 74
ГК Атлант Инжиниринг – официальный представитель в РФ и СНГ +7(495)109-02-08 sales@bbrc.ru www.bbrc.ru TxRxCAN_IRQ: In demo 2, we provide a demonstration on how to send out a CAN message through port 1 and receive the CAN message in port 2 by means of the interrupt mode.
ГК Атлант Инжиниринг – официальный представитель в РФ и СНГ +7(495)109-02-08 sales@bbrc.ru www.bbrc.ru CANUtility Program for Windows For PISO-CAN, PEX-CAN, or PCM-CAN, we provide a friendly CAN bus utility tool to allow users to send/receive the CAN messages to/from CAN network easily.
Page 76
(PCM-CAN100), two-port card (PISO-CAN200/200U, PEX-CAN200i, and PCM-CAN200), four-port card (PISO-CAN400/400U) and eight-port card (PISO-CAN800U) respectively. In the bottom of the main dialog, the status bar shows five parameters, board number, port status, baud rate, acceptance code, and acceptance mask for the selected port.
Page 77
ГК Атлант Инжиниринг – официальный представитель в РФ и СНГ +7(495)109-02-08 sales@bbrc.ru www.bbrc.ru Add Button: User can key in the CAN message into the text boxes above the transmission list. Then click add button to insert this CAN message into transmission list.
Page 78
ГК Атлант Инжиниринг – официальный представитель в РФ и СНГ +7(495)109-02-08 sales@bbrc.ru www.bbrc.ru (4) CAN Reception Function The following figure shows the receive part of a selected CAN port. There are four functions for reception list. Rx Pause: Click this button to stop the CAN message reception from specific CAN port.
Page 79
ГК Атлант Инжиниринг – официальный представитель в РФ и СНГ +7(495)109-02-08 sales@bbrc.ru www.bbrc.ru port to a .txt file. Save Reception List: Save Receive List, is used for saving the CAN messages that is received on the reception list. The data in the reception list of each different CAN port will be saved into different .txt file except that the reception list has no message.
Page 80
ГК Атлант Инжиниринг – официальный представитель в РФ и СНГ +7(495)109-02-08 sales@bbrc.ru www.bbrc.ru Software ID Mask: If users don't want to show some message with specific ID on the reception list, the ID mask function is useful for that. As following figure, users can set maximum 20 different ID message in the ID mask list.
ГК Атлант Инжиниринг – официальный представитель в РФ и СНГ +7(495)109-02-08 sales@bbrc.ru www.bbrc.ru Appendix Acceptance Filtering Four 8-bits Acceptance Code registers (AC0, AC1, AC2 and AC3) and Acceptance Mask registers (AM0, AM1, AM2 and AM3) are available for a various filtering of messages. These registers can be used for controlling a 4-byte filter, which can check the specific bits of a CAN message and decide if this message will be passed to the CAN card or not.
Page 82
ГК Атлант Инжиниринг – официальный представитель в РФ и СНГ +7(495)109-02-08 sales@bbrc.ru www.bbrc.ru Example 1: Assume that a message with a Standard Frame is considered. The Acceptance Code Registers (ACRn) and Acceptance Mask Registers (AMRn) is set as follows. (upper 4 bits ACRn 01xx x010 xxxx...
Page 83
ГК Атлант Инжиниринг – официальный представитель в РФ и СНГ +7(495)109-02-08 sales@bbrc.ru www.bbrc.ru Example 2: Assume that a message with an Extended Frame is considered. The Acceptance Code Registers (ACRn) and Acceptance Mask Registers (AMRn) is set as follows. (upper 6 bits ACRn 1011 0100 1011 000x 1100 xxxx...
ГК Атлант Инжиниринг – официальный представитель в РФ и СНГ +7(495)109-02-08 sales@bbrc.ru www.bbrc.ru Dimensions PISO-CAN200/400 PISO-CAN200/400-D/T PISO-CAN200/400-T PISO-CAN200/400-D PISO-CAN/PEX-CAN/PCM-CAN Series User’s Manual (v2.6 Dec/2013) ------- 84...
ГК Атлант Инжиниринг – официальный представитель в РФ и СНГ +7(495)109-02-08 sales@bbrc.ru www.bbrc.ru PISO-CAN100U/200U/400U/800U PISO-CAN100U-D/T PISO-CAN100U-T PISO-CAN100U-D PISO-CAN/PEX-CAN/PCM-CAN Series User’s Manual (v2.6 Dec/2013) ------- 85...
Page 86
ГК Атлант Инжиниринг – официальный представитель в РФ и СНГ +7(495)109-02-08 sales@bbrc.ru www.bbrc.ru PISO-CAN200U/400U-D/T PISO-CAN200U/400U-T PISO-CAN200U/400U-D PISO-CAN/PEX-CAN/PCM-CAN Series User’s Manual (v2.6 Dec/2013) ------- 86...
Page 87
ГК Атлант Инжиниринг – официальный представитель в РФ и СНГ +7(495)109-02-08 sales@bbrc.ru www.bbrc.ru PISO-CAN800U PISO-CAN/PEX-CAN/PCM-CAN Series User’s Manual (v2.6 Dec/2013) ------- 87...
ГК Атлант Инжиниринг – официальный представитель в РФ и СНГ +7(495)109-02-08 sales@bbrc.ru www.bbrc.ru PEX-CAN200i PEX-CAN200i-D/T PISO-CAN/PEX-CAN/PCM-CAN Series User’s Manual (v2.6 Dec/2013) ------- 88...
ГК Атлант Инжиниринг – официальный представитель в РФ и СНГ +7(495)109-02-08 sales@bbrc.ru www.bbrc.ru PCM-CAN100/200/200P PCM-CAN100/200-D PISO-CAN/PEX-CAN/PCM-CAN Series User’s Manual (v2.6 Dec/2013) ------- 89...
Page 90
ГК Атлант Инжиниринг – официальный представитель в РФ и СНГ +7(495)109-02-08 sales@bbrc.ru www.bbrc.ru PCM-CAN200P-D PISO-CAN/PEX-CAN/PCM-CAN Series User’s Manual (v2.6 Dec/2013) ------- 90...