background image

 

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 

PISO-CAN/PEX-CAN/PCM-CAN Series User’s Manual (v2.6 Dec/2013) -------   

66

 

CAN_DriverError: Kernel driver can’t be opened.   

CAN_BoardNumberError: BoardNo is not correct or exceeds the current 

total board number. 

CAN_ActiveBoardError: This board is not activated. 

CAN_RemoveIrqFailure: 

Disable or stop IRQ failure. 

 

ГК

 

Атлант

 

Инжиниринг

 – 

официальный

 

представитель

 

в

 

РФ

 

и

 

СНГ

 

+7(495)109-02-08 [email protected] www.bbrc.ru 

Summary of Contents for PISO-CAN200

Page 1: ...he 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 for its use nor f...

Page 2: ...s 23 2 3 3 37 pin female D sub connectors 24 2 4 Installation 25 3 Software Installation 26 4 Installation DLL Driver 29 4 1 DLL Function Definition and Description 31 4 1 1 CAN_GetDllVersion 34 4 1 2...

Page 3: ...run 61 4 1 26 CAN_OutputByte 62 4 1 27 CAN_InputByte 63 4 1 28 CAN_GetSystemFreq 64 4 1 29 CAN_InstallUserIsr only for Windows 2000 XP 65 4 1 30 CAN_RemoveUserIsr only for Windows 2000 XP 66 4 1 31 CA...

Page 4: ...N PEX CAN and PCM CAN represents an economic solution within which an active CAN board can have two or four independent CAN bus communication ports with either a 5 pin screw terminal connector or a 9...

Page 5: ...4 independent CAN channels for PISO CAN200 400 PISO CAN100U 200U 400U 800U PCI v2 2 compliant 32 bit 33MHz Universal PCI card supports both 5V and 3 3V PCI bus 3KV galvanic isolation 1 2 4 8 independ...

Page 6: ...D CAN_H N A for others 9 pin male D Sub CAN_L CAN_SHLD CAN_H N A for others Baud Rate bps 10 k 20 k 50 k 125 k 250 k 500 k 800 k 1 M allow user defined baud rate Terminator Resistor Jumper for 120 ter...

Page 7: ...d terminal block Baud Rate bps 10 k 20 k 50 k 125 k 250 k 500 k 800 k 1 M allow user defined baud rate Terminator Resistor Jumper for 120 terminator resistor Power Power Consumption 100 mA 12 V 100 mA...

Page 8: ...tor 9 pin male D Sub 5 pin screwed terminal block 9 pin male D Sub 5 pin screwed terminal block Baud Rate bps 10 k 20 k 50 k 125 k 250 k 500 k 800 k 1 M allow user defined baud rate Terminator Resisto...

Page 9: ...ctor 9 pin male D Sub 5 pin screwed terminal block 9 pin male D Sub 5 pin screwed terminal block Baud Rate bps 10 k 20 k 50 k 125 k 250 k 500 k 800 k 1 M allow user defined baud rate Terminator Resist...

Page 10: ...D Sub 5 pin screwed terminal block Baud Rate bps 10 k 20 k 50 k 125 k 250 k 500 k 800 k 1 M allow user defined baud rate Terminator Resistor Jumper for 120 terminator resistor Power Power Consumption...

Page 11: ...2 Baud Rate bps 10 k 20 k 50 k 125 k 250 k 500 k 800 k 1 M allow user defined baud rate Terminator Resistor Jumper for 120 terminator resistor Power Power Consumption 800 mA 5 V Mechanism Dimensions 1...

Page 12: ...l be provided in the release note as follows Where you can find the software driver utility and demo programs How to install software utility Where is the diagnostic program FAQ s and answers Attentio...

Page 13: ...CAN and PCM CAN series CAN card This information includes the wire connection and terminal resistance configuration for the CAN network 2 1 Board Layout Figure2 1 PISO CAN200 Board LAYOUT PISO CAN PE...

Page 14: ...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 7 495 109 02 08 sales bbrc ru www bbrc ru...

Page 15: ...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 7 495 109 02 08 sales bbrc ru www bbrc ru...

Page 16: ...Figure2 6 ADP 9 Board LAYOUT For PISO CAN400 400U Only PISO CAN PEX CAN PCM CAN Series User s Manual v2 6 Dec 2013 16 Figure2 7 PISO CAN800U Board LAYOUT 7 495 109 02 08 sales bbrc ru www bbrc ru...

Page 17: ...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 PEX CAN200i 7 495 109 02 08 sales bbrc ru www bbrc ru...

Page 18: ...ecting PISO CAN400 board and ADP 9 board JP2 1 2 3 JP2 1 2 3 Pin1 CAN_L Pin2 CAN_H Pin3 Shield Enable Disable JP6 Port 1 terminator resister 120 selection 1 2 3 1 2 3 JP7 Port 2 terminator resister 12...

Page 19: ...JP7 1 2 3 JP7 1 2 3 Pin1 CAN_L Pin2 CAN_H Pin3 Shield Enable Disable JP2 Port 1 terminator resister 120 selection 3 2 1 3 2 1 JP3 Port 2 terminator resister 120 selection only for PISO CAN200U 400U 3...

Page 20: ...ort 4 terminator resister 120 selection JP4 Port 3 terminator resister 120 selection JP5 Port 5 terminator resister 120 selection JP6 Port 6 terminator resister 120 selection JP7 Port 8 terminator res...

Page 21: ...he stack Table 2 5 Rotary Switch Settings Switch Position Module Slot CLK ID Select INT 0 or 4 or 8 1 CLK0 IDSEL0 INTA 1 or 5 or 9 2 CLK1 IDSEL1 INTB 2 or 6 3 CLK2 IDSEL2 INTC 3 or 7 4 CLK3 IDSEL3 INT...

Page 22: ...D CA 9 3705 cable user can convert the female DB 37 connector to 9 pin male D sub connectors The connector s pin assignment is specified as follows 2 3 1 5 pin screw terminal connector The 5 pin screw...

Page 23: ...re given in Table 2 8 Figure2 10 9 pin male D sub connector Table 2 8 Pin assignment of the 9 pin male D sub connector D sub male connector pin assignment Reserved 1 CAN_L 2 CAN_GND 3 Reserved 4 CAN_S...

Page 24: ...2 DB 37_Pin25 13 DB 37_Pin07 14 DB 37_Pin26 15 DB 37_Pin08 16 DB 37_Pin27 17 DB 37_Pin09 18 DB 37_Pin28 19 DB 37_Pin10 20 DB 37_Pin29 21 DB 37_Pin11 22 DB 37_Pin30 23 DB 37_Pin12 24 DB 37_Pin31 25 DB...

Page 25: ...3 Plug in your PISO CAN PEX CAN or PCM CAN series CAN card into a suitable empty PCI slot 4 Replace your chassis 5 Plug your CAN bus cable s into the 5 pin screw terminal connector or the 9 pin D sub...

Page 26: ...tart 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 PCM_PISO CAN_series Driver win2k_xp_7 ex the OS is Windows 20...

Page 27: ...here 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 7 495 109 02 08...

Page 28: ...SO 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 to remove the PISO CAN driver below P...

Page 29: ...lowing figure The user application programs which have been developed by the following designated tools VB VC Delphi and Borland C Builder etc can call the PISOCAN DLL driver in user mode And then the...

Page 30: ...he users to get the highly real time system By owing to the feature of high price performance and highly real time PISO CAN series CAN cards will be applied in more wide and more variant CAN applicati...

Page 31: ...However in order to make the descriptions more simplified and clear the attributes for the both the input and output parameter functions are given as input and output respectively as shown in followi...

Page 32: ...4 1 16 int CAN_IrqStatus BYTE BoardNo BYTE bStatus 4 1 17 int CAN_Status BYTE BoardNo BYTE Port BYTE bStatus 4 1 18 int CAN_SendMsg BYTE BoardNo BYTE Port PacketStruct CanPacket 4 1 19 int CAN_SendWit...

Page 33: ...ailure Enable CAN chip receive interrupt failure 13 CAN_DisableRxIrqFailure Disable CAN chip receive interrupt failure 14 CAN_InstallIrqFailure Installing PCI board IRQ failure 15 CAN_RemoveIrqFailure...

Page 34: ...nformation For example If 101 hex is return it means driver version is 1 01 4 1 2 CAN_TotalBoard Description Obtain the amount of all CAN boards installed in the PCI bus Syntax int CAN_TotalBoard void...

Page 35: ...VID output vendor ID of this board dwDID output device ID of this board dwSVID output sub vendor ID of this board dwSDID output sub device ID of this board dwSAuxID output sub auxiliary ID of this boa...

Page 36: ...etPortNum Parameter BoardNo input PISO CAN board number 0 7 bGetPortNum output Port number of the CAN card Return CAN_NoError OK CAN_DriverError Kernel driver can not be opened CAN_BoardNumberError Bo...

Page 37: ...rd BYTE BoardNo Parameter BoardNo input PISO CAN board number 0 7 Return CAN_NoError OK PISO CAN PEX CAN PCM CAN Series User s Manual v2 6 Dec 2013 37 CAN_BoardNumberError BoardNo exceeds the current...

Page 38: ...iting the user s application program Syntax int CAN_CloseBoard BYTE BoardNo Parameter BoardNo input PISO CAN board number 0 7 Return CAN_NoError OK CAN_ActiveBoardError The board is not activated CAN_...

Page 39: ...rd 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 PISO CAN PEX CAN PCM CA...

Page 40: ...rt number 1 8 Return CAN_NoError OK CAN_DriverError Kernel driver can t be opened CAN_BoardNumberError BoardNo is not correct or exceeds the current total board number CAN_PortNumberError Port number...

Page 41: ...rror OK CAN_DriverError Kernel driver can t be opened CAN_BoardNumberError BoardNo is not correct or exceeds the current total board number CAN_PortNumberError Port number is not correct CAN_ActiveBoa...

Page 42: ...sk for CAN controller BaudRate 0 user defined must to set BT0 BT1 1 10Kbps 2 20Kbps 3 50Kbps 4 125Kbps 5 250Kbps 6 500Kbps 7 800Kbps 8 1Mbps BT0 BT1 user defined baud rate used only if BaudRate 0 For...

Page 43: ...ontroller error PISO CAN PEX CAN PCM CAN Series User s Manual v2 6 Dec 2013 43 CAN_SetAMRError Set Acceptance mask to CAN controller error CAN_SetBaudRateError Set baud rate to CAN controller error CA...

Page 44: ...ler low byte will be mapped to AMR 3 high byte will be mapped to AMR 0 BaudRate 0 user defined must to set BT0 BT1 1 10Kbps 2 20Kbps 3 50Kbps 4 125Kbps 5 250Kbps 6 500Kbps 7 800Kbps 8 1Mbps BT0 BT1 us...

Page 45: ...ateError 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...

Page 46: ...eturn CAN_NoError OK CAN_DriverError Kernel driver can t be opened CAN_BoardNumberError BoardNo is not correct or exceeds the current total board number CAN_PortNumberError Port number is not correct...

Page 47: ...Return CAN_NoError OK CAN_DriverError Kernel driver can t be opened CAN_BoardNumberError BoardNo is not correct or exceeds the current total board number CAN_PortNumberError Port number is not correc...

Page 48: ...1 8 bStatus output 0 receive interrupt disable 1 receive interrupt enable Return CAN_NoError OK CAN_DriverError Kernel driver can t be opened CAN_BoardNumberError BoardNo is not correct or exceeds the...

Page 49: ...rdNo input PISO CAN board number 0 7 Return CAN_NoError OK CAN_DriverError Kernel driver can t be opened CAN_BoardNumberError BoardNo is not correct or exceeds the current total board number CAN_Activ...

Page 50: ...rameter BoardNo input PISO CAN board number 0 7 Return CAN_NoError OK CAN_DriverError Kernel driver can t be opened CAN_BoardNumberError BoardNo is not correct or exceeds the current total board numbe...

Page 51: ...number 0 7 bStatus output 0 IRQ disable 1 IRQ enable Return CAN_NoError OK CAN_DriverError Kernel driver can t be opened CAN_BoardNumberError BoardNo is not correct or exceeds the current total board...

Page 52: ...0 ok 1 transmit bit 5 Transmit Status 0 idle 1 receive bit 4 Receive Status 0 idle 1 complete bit 3 Transmission Complete Status 0 incomplete 1 release bit 2 Transmit Buffer Status 0 locked 1 overrun...

Page 53: ...is function mode 0 11 bit identifier 1 29 bit identifier id Identifier rtr Remote transmission request len Data length data 8 data byte Return CAN_NoError OK CAN_BoardNumberError BoardNo is not correc...

Page 54: ...ISO CAN board number 0 7 Port input CAN port number 1 4 or 1 2 Mode 0 11 bit identifier 1 29 bit identifier Id Identifier Rtr Remote transmission request Dlen Data length Data data byte Return CAN_NoE...

Page 55: ...within the software buffer otherwise it is within the CAN controller s RXFIFO Syntax int CAN_RxMsgCount BYTE BoardNo BYTE Port Parameter BoardNo input PISO CAN board number 0 7 Port input CAN port num...

Page 56: ...structure for CanPacket is defined below typedef struct packet LONGLONG MsgTimeStamps BYTE mode DWORD id BYTE rtr BYTE len PISO CAN PEX CAN PCM CAN Series User s Manual v2 6 Dec 2013 56 BYTE data 8 Pa...

Page 57: ...Port number is not correct CAN_ActiveBoardError This board is not activated CAN_ConfigError Port has not been configured successfully PISO CAN PEX CAN PCM CAN Series User s Manual v2 6 Dec 2013 57 CAN...

Page 58: ...er 1 8 Mode 0 11 bit identifier 1 29 bit identifier Id Identifier Rtr Remote transmission request Dlen Data length Data data byte H_MsgTimeStamps L_MsgTimeStamps These parameters in Windows 98 Me NT4...

Page 59: ...AN_ConfigError Port has not been configured successfully CAN_ReceiveBufferEmpty CAN controller s RXFIFO is empty CAN_SoftBufferIsEmpty Software RX Buffer is empty PISO CAN PEX CAN PCM CAN Series User...

Page 60: ...t 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 total board number CAN_PortN...

Page 61: ...Port input CAN port number 1 8 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_ActiveBoa...

Page 62: ...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 PISO CAN PEX...

Page 63: ...E 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 PISO CAN PEX CAN PCM CAN Series...

Page 64: ...e time of the time stamp for reception message Syntax LONGLONG CAN_GetSystemFreq void PISO CAN PEX CAN PCM CAN Series User s Manual v2 6 Dec 2013 64 Parameter None Return In Windows 98 Me NT4 is clock...

Page 65: ...nter which points a function with format void XXX BYTE BoardNo The XXX is the function name of users ISR The parameter BoardNo indicates the number of the board which produces an interrupt signal Retu...

Page 66: ...rdNo input PISO CAN board number 0 7 Return CAN_NoError OK PISO CAN PEX CAN PCM CAN Series User s Manual v2 6 Dec 2013 66 CAN_DriverError Kernel driver can t be opened CAN_BoardNumberError BoardNo is...

Page 67: ...it SYMBOL NAME VALUE FUNCTION ECC 7 1 ERRC1 Error Code 1 ECC 6 1 ERRC0 Error Code 0 1 RX error occurred during reception ECC 5 2 DIR Direction 0 TX error occurred during transmission ECC 4 2 SEG4 Segm...

Page 68: ...gth code 0 1 0 1 0 Data field 0 1 0 0 0 CRC sequence 1 1 0 0 0 CRC delimiter 1 1 0 0 1 Acknlwledge slot 1 1 0 1 1 Acknowledge delimiter 1 1 0 1 0 End of frame 1 0 0 1 0 Intermission 1 0 0 0 1 Active e...

Page 69: ...ceiving CAN Message in polling and in interrupt mode respectively Users need to follow the operation principle of PISO CAN PEX CAN PCM CAN board for correctly and easily send and receive the CAN messa...

Page 70: ...CAN_ActiveBoard CAN_CloseBoard Start of Application End of Application CAN_RxMsgCount 0 YES NO Figure 4 2 Flow Chart of Receive CAN Massage PISO CAN PEX CAN PCM CAN Series User s Manual v2 6 Dec 2013...

Page 71: ...t CAN_Config CAN_ReceiveMsg CAN_ActiveBoard CAN_CloseBoard Start of Application End of Application CAN_RxMsgCount 0 YES NO CAN_EnableRxIrq CAN_InstallIrq CAN_RemoveIrq CAN_DisableRxIrq Figure 4 3 Flow...

Page 72: ...aration header files for different development environments are presented as follows Demo BCB3 CAN H PISOCAN LIB Delphi4 Demo program for Borland C Builder 3 Header file Linkage library for BCB for De...

Page 73: ...rt 2 If you click the Receive button in the CAN port 2 frame area the CAN message received by CAN port 2 will be presented in TEXT box This is shown in the below screenshot Note that if port 2 display...

Page 74: ...same time the CAN message will be received at port 2 by means of the interrupt mode As shown in the following figure port 2 can automatically receive the CAN message and store it within the 4K bytes...

Page 75: ...CAN Configure Dialog Please click the Board No combo box to select which CAN board plugged on the pc will be used Check the Port Enable check boxes to enable CAN ports Then select CAN port tag Accordi...

Page 76: ...d 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 3 CAN Tra...

Page 77: ...cation in the transmission list Delete Button If some CAN message in the transmission list is useless users can select it and click delete button to delete this CAN message from transmission list Send...

Page 78: ...ally to the last received CAN message If this button is pushed up the reception list will stop to scroll automatically but reception list still get the CAN messages from CAN port The default status of...

Page 79: ...PISO DNM100 U Configuration Menu Board Configuration Users can click Board Configuration to re configure the CAN board Please refer to 1 CAN Configure Dialog of this section for more detail informati...

Page 80: ...aximum 20 different ID message in the ID mask list Afterwards if the CAN port receives the message with the ID set in ID mask list the CAN message will not shown in the reception list About Show the i...

Page 81: ...e ID the CAN card will accept The Acceptance Mask Register is mainly used for deciding which bit of message ID will need to check by using the Acceptance Code Register If the bit of the Acceptance Mas...

Page 82: ...MR0 are used for the upper 8 bits of message ID The upper 4 bits of the ACR1 and AMR1 are used for the lower 3 bits of the message ID and RTR bit The lower 4 bits of the ACR1 and AMR1 are useless The...

Page 83: ...0 RTR x don t care only the upper 6 bits of ACR3 and AMR3 are used PISO CAN PEX CAN PCM CAN Series User s Manual v2 6 Dec 2013 83 In this case the lower 2 bits of AMR3 and AMR3 are useless All the ot...

Page 84: ...8 Dimensions 8 1 PISO CAN200 400 PISO CAN200 400 D T PISO CAN200 400 T PISO CAN PEX CAN PCM CAN Series User s Manual v2 6 Dec 2013 84 PISO CAN200 400 D 7 495 109 02 08 sales bbrc ru www bbrc ru...

Page 85: ...8 2 PISO CAN100U 200U 400U 800U PISO CAN100U D T PISO CAN100U T PISO CAN PEX CAN PCM CAN Series User s Manual v2 6 Dec 2013 85 PISO CAN100U D 7 495 109 02 08 sales bbrc ru www bbrc ru...

Page 86: ...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 7 495 109 02 08 sales bbrc ru www bbrc ru...

Page 87: ...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...

Page 88: ...8 3 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...

Page 89: ...8 4 PCM CAN100 200 200P PCM CAN100 200 D PISO CAN PEX CAN PCM CAN Series User s Manual v2 6 Dec 2013 89 7 495 109 02 08 sales bbrc ru www bbrc ru...

Page 90: ...PCM CAN200P D PISO CAN PEX CAN PCM CAN Series User s Manual v2 6 Dec 2013 90 7 495 109 02 08 sales bbrc ru www bbrc ru...

Reviews: