background image

 

 FRB-200U/200/100 User Manual (Ver.1.3, Jun.2008, fmh-001-12)  ----  18 

6.    DLL Function Description 

 

The DLL driver is the collection of function calls on the FRB-

200U/200/100 card for the Windows 98/Me/NT/2000/XP system. The application 

structure is presented in the following figure. The user application program was 

developed by designated tools such as VB, Delphi, VC, Borland C

++

 Builder, 

C#.NET and VB.NET which can call on the FRB.DLL driver in the user mode.  

Following that, the DLL driver will call up FRB.sys to access the hardware 

system. 

 

 

Figure 6.1 

 

 

6.1    Table of ErrorCodes and ErrorStrings 

 

Table 6.1 ErrorCodes and ErrorStrings 

Error 

Code 

Error ID 

Error String 

FRB_NoError 

OK ( No error !) 

FRB _DriverOpenError 

Device driver cannot be opened 

FRB _DriverNoOpen 

Users have to call the DriverInit 
function first 

FRB _GetDriverVersionError 

Get driver version error  

FRB _FindBoardError 

Cannot find board 

FRB _ExceedBoardNumber 

Invalidate board number  
(Valid range: 0 to TotalBoards -1)

 

FRB_InputParameterError            

 Input parameter error. 

ГК

 

Атлант

 

Инжиниринг

 – 

официальный

 

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

 

в

 

РФ

 

и

 

СНГ

 

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

Summary of Contents for FRB-200U

Page 1: ...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 for its use not...

Page 2: ...IFY THE I O ADDRESS 12 3 2 ASSIGNMENT OF I O ADDRESSES 13 4 FRNET APPLICATION STRUCTURE 15 5 SOFTWARE INSTALLATION 17 5 1 SOFTWARE INSTALLING PROCEDURE 17 5 2 PNP DRIVER INSTALLATION 17 6 DLL FUNCTION...

Page 3: ...SA AND RA FUNCTIONS FOR FRB 200 100 26 APPENDIX A 27 A 1 THE I O ADDRESS MAP 27 A 1 1 RESET Control Register 28 A 1 2 AUX Control Register 28 A1 3 Port Select Register 29 A 1 4 I O Data Register 30 A...

Page 4: ...DO type depending on what module you use Therefore it can control up to a maximum of 128 16X8 digital output channels and 128 16X8 digital input channels with a total scan time of 2 88ms for 250kbps...

Page 5: ...one network manger defined as SA0 It plays the important role of producing the token stream in the network 3 The baud rates of the controller and the remote module need to be the same as on the FRnet...

Page 6: ...he data from the host memory and sends it to the RAn node which is on a remote module However the RAn node on the host will receive data coming from the SAn node on the remote module and then write it...

Page 7: ...cause FRnet uses the principle of delivering the data from the sender address to the receiver address This means the sender address must be unique but the receiver address can be different or the same...

Page 8: ...ications Operation temperature 0 55 Storage temperature 20 65 Humidity 0 90 Dimensions 120mm x 90mm Power consumption 5V 250mA 1 3 Ordering information FRB 200U 250Kbps 2 Ports SA 0 7 RA 8 15 FRB 200...

Page 9: ...elease notes first They contain the following important information 1 The location of the software driver and utility 2 How to install the software and utility 3 The location of the diagnostic program...

Page 10: ...mh 001 12 9 2 Hardware configuration 2 1 Board Layout Figure 2 1 FRB 100 200 Note TB1 FRnet communication connection Port 0 Port 1 JP3 Terminating resistors for Port 0 JP4 Terminating resistors for Po...

Page 11: ...3 is used for FRnet Port0 and JP4 is used for FRnet Port1 In general the FRB 200U 200 100 card is the first device on the network therefore the terminating resistors are always ON ON default OFF ON de...

Page 12: ...to RS 485 ports and the FRB 100 only has a single port The definitions of the pins on the connectors for the FRnet ports are shown in the following Table Table 2 1 TB1 5 pin header Pin Number Descrip...

Page 13: ...IDs for the FRB series cards are as follows Vendor ID 0xE159 Device ID 0x0001 The Sub IDs of the FRB 200U 200 100 series are as follows FRB 200 100 FRB 200U Sub Vendor ID 0x5F80 0x5FFF Sub Device ID...

Page 14: ...ntify which card is card_0 is to use wSlotBus wSlotDevice in the following manner 1 Remove all FRB Series boards from the PC 2 Install one FRB Series board into the PC PCI_slot1 run PIO_PISO EXE Then...

Page 15: ...card by following these next 3 steps Step1 Using the wSlotBus and wSlotDevice information in table 3 1 Step2 Input the board number into funtion GetConfigAddressSpace to get the specified card informa...

Page 16: ...ng the settings of the DSW dipswitch 2 The high speed FRB cards can only work together with high speed remote modules Similarly normal speed FRB cards can only work with normal speed remote modules 3...

Page 17: ...nual Ver 1 3 Jun 2008 fmh 001 12 16 Figure 4 2 Note 1 The MagicWire series enables PLCs to talk to each other via DIO ports 2 MA11 12 21 22 supports A and Q type PLCs for Mitsubishi 7 495 109 02 08 sa...

Page 18: ...install Toolkit for Windows 98 or NT 2K XP Then the InstallShield will start the driver installation process to copy the related material to the indicated directory and register the driver on your com...

Page 19: ...he user mode Following that the DLL driver will call up FRB sys to access the hardware system Figure 6 1 6 1 Table of ErrorCodes and ErrorStrings Table 6 1 ErrorCodes and ErrorStrings Error Code Error...

Page 20: ...table Table 6 2 The attributes for the input and output parameters Keyword Setting parameter by user before calling this function Get the data value from this parameter after calling this function In...

Page 21: ...verInit WORD wTotalBoard Parameter wTotalBoard Output Total FRB 200U 200 100 boards Return Please refer to Section 6 1 Error Code 6 3 2 FRB_ActiveBoard Description This subroutine will activate one of...

Page 22: ...ersion number information from the FRB driver Syntax WORD FRB_GetDriverVersion WORD wDriverVersion Parameter wDriverVersion Output The version number of FRB driver Return Please refer to Section 6 1 E...

Page 23: ...A0 7 SA7 wOutputData Input 16 bits data send to remote RAn from FRB 100 200 SAn Return Please refer to Section 6 1 Error Code 6 4 2 FRB_ ReceiveRA Description This subroutine will receive the 16 bits...

Page 24: ...Syntax WORD FRB_ReadRAStatus WORD wPort BYTE bRAStatus Parameter wPort Input Port number 0 Port 0 1 Port 1 bRAStatus Output Communication status of Remote SAn to FRB 100 200 200U RAn where n 8 15 bRAS...

Page 25: ...FRB 200U 200 100 User Manual Ver 1 3 Jun 2008 fmh 001 12 24 6 5 Program Architecture Figure 6 2 7 495 109 02 08 sales bbrc ru www bbrc ru...

Page 26: ...ge you have selected Win98 Me NT win2000 XP Once the driver installation is complete the related demo programs and development library and the declaration header files for the different development en...

Page 27: ...address to SA8 and the FR 2057 address to RA0 Step 3 Click the SAn Digital Output check box to send the 16 bit data from the host SA0 FRB 200U 200 100 to remote RA0 FR 2057 Step 4 On the screen of Fig...

Page 28: ...WRITE wBase 0 RESET control register Same wBase 2 Aux control register Same wBase 3 Port select register Same wBase 0xc0 RA8 Low byte Node8 15 Status SA0 Low byte wBase 0xc4 RA8 High byte SA0 High byt...

Page 29: ...any D I O command applications are initiated outportb wBase 1 RESET 1 The LED indicator is flashing Enables the DI DO operations outportb wBase 0 RESET 0 The LED indicator is off Disables the DI DO o...

Page 30: ...us outportb wBase 0xc0 LSB Send the Low byte to SA0 data inportb wBase 0xc0 Receive the Low byte from RA8 NS0 0 Enable Port0 node status NS0 1 Disable Port0 node status outportb wBase 0x03 0xfd Enable...

Page 31: ...7 8 or wBase 0xf8 and offset_MSB wBase 0xfc Note 1 data inportb wBase 0xc0 Receive the Low byte from RA8 data inportb wBase 0xc4 Receive the High byte from RA8 data inportb wBase 0xf8 Receive the Low...

Page 32: ...IO_L LIB TC large model library file TC LIB TCPIO_H LIB TC huge model library file MSC LIB PIO H MSC declaration file MSC LIB MSCPIO_L LIB MSC large model library file MSC LIB MSCPIO_H LIB MSC huge mo...

Page 33: ...wSubVendor wSubDevice wSubAux 2 PIO_GetConfigAddressSpace wBoardNo wBase wIrq wSubVendor wSubDevice wSubAux wSlotBus wSlotDevice 3 ShowPIOPISO wSubVendor wSubDevice wSubAux A 3 2 PIO_DriverInit Descri...

Page 34: ...The base address of the board wIrq Output The IRQ number that the board using wSubVendor Output Sub Vendor ID wSubDevice Output Sub Device ID wSubAux Output Sub Aux ID wSlotBus Output Slot Bus number...

Reviews: