background image

Chapter 4        Begin to Use the NI-FBUS Software

AT-FBUS for Windows NT

4-2

© National Instruments Corporation

for the 

nifb

 driver to Automatic through the Devices window in the

Control Panel. If you are using Windows NT 4.0, you can also move the
NIFB shortcut to the StartUp folder to make it start up automatically
when your computer boots or restarts.

If you are using the NI-FBUS Configurator, refer to the NI-FBUS
Configurator User Manual
 for more information on how to use the
NI-FBUS software.

Writing and Compiling Your Application

Note:

If you are using the NI-FBUS Configurator or you are not developing an
NI-FBUS application, this section does not apply to you.

When you compile your NI-FBUS application, consider the following
items:

• 

You must include the 

nifbus.h

 header file in your program.

• 

You must specify the include directory in your project settings.

• 

You must link your program with the 

nifb.lib

 import library.

National Instruments created this library using Microsoft
Visual C/C++ version 4.0. National Instruments used Borland C 4.5
to create 

nifb_bor.lib

, a version of the library for Borland users.

• 

You can create a console application using the 

nifbtest.c

 sample

program included in your kit. Create a console application project in
your compiler and add 

nifbtest.c

 and 

nifb.lib

 to the project.

Build the project and execute the resulting application.

Using the NI-FBUS Dialog Utility

Note:

The NI-FBUS Dialog Utility is not included with the NI-FBUS
Configurator.

Use the NI-FBUS Dialog utility to interact with your devices over the
fieldbus by opening descriptors, making single NI-FBUS calls, and
viewing the results. You might want to use the NI-FBUS Dialog utility to
verify installation and device operation, or to learn the NI-FBUS API.

Summary of Contents for AT-FBUS

Page 1: ...Getting Started with Your AT FBUS and the NI FBUS Software for Windows NT February 1997 Edition Part Number 321014C 01 Copyright 1995 1997 National Instruments Corporation All Rights Reserved ...

Page 2: ...166 Austria 0662 45 79 90 0 Belgium 02 757 00 20 Canada Ontario 905 785 0085 Canada Québec 514 694 8521 Denmark 45 76 26 00 Finland 09 527 2321 France 01 48 14 24 24 Germany 089 741 31 30 Hong Kong 2645 3186 Israel 03 5734815 Italy 02 413091 Japan 03 5472 2970 Korea 02 596 7456 Mexico 5 520 2635 Netherlands 0348 433466 Norway 32 84 84 00 Singapore 2265886 Spain 91 640 0085 Sweden 08 730 49 70 Swit...

Page 3: ...ODUCTS OR INCIDENTAL OR CONSEQUENTIAL DAMAGES EVEN IF ADVISED OF THE POSSIBILITY THEREOF This limitation of the liability of National Instruments will apply regardless of the form of action whether in contract or tort including negligence Any action against National Instruments must be brought within one year after the cause of action accrues National Instruments shall not be liable for any delay ...

Page 4: ... the interference by one or more of the following measures Reorient or relocate the receiving antenna Increase the separation between the equipment and receiver Connect the equipment into an outlet on a circuit different from that to which the receiver is connected Consult the dealer or an experienced radio TV technician for help Notices to User Changes or modifications not expressly approved by N...

Page 5: ...ication xii Chapter 1 Introduction What You Need to Get Started 1 1 Hardware Description 1 1 Software Description 1 2 Optional Fieldbus Network Tools 1 3 Chapter 2 Hardware Installation and Configuration Evaluate the Hardware Settings 2 1 Install the Hardware 2 2 Configure the Hardware Optional 2 3 Locate Conflict Free Resources for Your AT FBUS 2 4 Selecting the Memory Base Address 2 5 Selecting ...

Page 6: ...BUS Configuration Utility after Installation 3 4 Test the Installation 3 5 Chapter 4 Begin to Use the NI FBUS Software Starting NI FBUS 4 1 Writing and Compiling Your Application 4 2 Using the NI FBUS Dialog Utility 4 2 Appendix A Specifications Appendix B Customer Communication Glossary Figures Figure 2 1 Installing the AT FBUS Board 2 2 Figure 2 2 Fieldbus Connector Pinout for the AT FBUS 2 3 Fi...

Page 7: ...ws NT Tables Table 2 1 Hardware Default Settings 2 1 Table 2 2 Memory Base Address Switch Settings 2 5 Table A 1 Electrical Characteristics for the AT FBUS A 1 Table A 2 Physical Characteristics for the AT FBUS A 1 Table A 3 Environmental Characteristics for the AT FBUS A 2 ...

Page 8: ...uded with either the NI FBUS Communications Manager kit or the NI FBUS Configurator kit How to Use the Manual Set Use this getting started manual to install and configure your AT FBUS board and the NI FBUS software for Windows NT Use the NI FBUS Function Reference Manual for Windows NT to look up specific information about NI FBUS functions such as input and output parameters syntax and error mess...

Page 9: ...environmental characteristics of the AT FBUS hardware and the recommended operating conditions Appendix B Customer Communication contains forms you can use to request help from National Instruments or to comment on our products and manuals The Glossary contains an alphabetical list and description of terms used in this manual including abbreviations acronyms metric prefixes mnemonics and symbols C...

Page 10: ...iterally enter from the keyboard sections of code programming examples and syntax examples This font is also used for the proper names of disk drives paths directories programs subprograms subroutines device names functions operations variables filenames and extensions and for statements and comments taken from programs NI FBUS In this manual the term NI FBUS refers to the NI FBUS Communications M...

Page 11: ...comments on our products and manuals We are interested in the applications you develop with our products and we want to help if you have problems with them To make it easy for you to contact us this manual contains comment and configuration forms for you to complete These forms are in Appendix B Customer Communication at the end of this manual ...

Page 12: ...d on your computer Hardware Description The AT FBUS is a plug in board that handles communication between network configurable devices that comply with the Fieldbus Foundation H1 specification and a PC AT compatible computer that has 16 bit ISA slots The AT FBUS uses the Intel 386EX embedded processor shared memory and an interrupt to communicate with its driver The AT FBUS supports the fieldbus t...

Page 13: ...dbus Network Tools section later in this chapter The NI FBUS software and NI FBUS Configurator software include the following components NI FBUS process executable file Binary image of the Fieldbus Foundation communication stack NI FBUS Configuration utility Windows NT kernel mode driver The NI FBUS software also includes the following components not included with the NI FBUS Configurator software...

Page 14: ...rate the schedule for the network and can configure field devices and hosts to transmit and receive alarms and trends If you have not already ordered the NI FBUS Configurator contact National Instruments for availability information BridgeVIEW helps you perform data acquisition and analysis create a man machine interface MMI or develop an advanced supervisory control application in a graphical dev...

Page 15: ...ault hardware settings for the AT FBUS board Table 2 1 Hardware Default Settings AT FBUS Board Setting Default Memory Base Address hex D0000 physical Interrupt Line IRQ 11 The AT FBUS board default settings are suitable for most PC AT compatible computer systems However if these default settings conflict with another device in your system or if you need to install more than one AT FBUS board you m...

Page 16: ... board 2 Remove the top cover or access port of the I O channel 3 Remove the expansion slot cover on the back panel of the computer 4 As shown in Figure 2 1 insert the AT FBUS board into any unused 16 bit ISA slot with the fieldbus connector sticking out of the opening on the back panel It might be a tight fit but do not force the board into place Figure 2 1 Installing the AT FBUS Board 5 Screw th...

Page 17: ...ction No Connection No Connection No Connection No Connection Data Data Figure 2 2 Fieldbus Connector Pinout for the AT FBUS Note On the AT FBUS 2 the top connector is port 1 and the lower connector is port 2 9 Power on your computer After you have installed your AT FBUS board and you are ready to install the NI FBUS software refer to Chapter 3 Software Installation and Configuration for instructi...

Page 18: ... Serial Number 4 Jumpers for IRQ 6 Assembly Number Figure 2 3 AT FBUS 2 Parts Locator Diagram Locate Conflict Free Resources for Your AT FBUS To locate conflict free resources you can use the Microsoft utility Windows NT Diagnostics This utility lists the I O port addresses interrupt levels and DMA channels that your system is currently using The resources not listed by this utility are conflict f...

Page 19: ...ll other devices cannot use the memory space you assign to the AT FBUS board 1 Choose a new memory base address You can configure the AT FBUS to use lower or upper memory Lower memory is the memory residing in the first megabyte of address space Upper memory is any memory that resides above the first megabyte Because the AT bus can only access the first 16 MB of address space and the AT FBUS must ...

Page 20: ... 0EC000 ON OFF ON ON ON OFF 0F0000 ON OFF ON ON OFF OFF 0F4000 ON OFF ON OFF ON OFF 0F8000 ON OFF ON OFF OFF OFF 0FC000 OFF ON OFF ON ON OFF 8C0000 OFF ON OFF ON OFF OFF 8C4000 OFF ON OFF OFF ON OFF 8C8000 OFF ON OFF OFF OFF OFF 8CC000 OFF ON ON ON ON OFF 8D0000 OFF ON ON ON OFF OFF 8D4000 OFF ON ON OFF ON OFF 8D8000 OFF ON ON OFF OFF OFF 8DC000 OFF OFF OFF ON ON OFF 8E0000 OFF OFF OFF ON OFF OFF ...

Page 21: ...settings on the Hardware and Software Configuration Form in Appendix B Customer Communication for future reference Selecting the Interrupt Request Line PC AT compatible computers have a series of interrupt lines available to devices Devices use interrupts to get immediate service from the CPU for asynchronous events Your AT FBUS board and the NI FBUS software use interrupts to get service from the...

Page 22: ...1 12 14 or 15 If you are installing more than one AT FBUS board each board must be configured to use a unique IRQ level The AT FBUS requires the use of interrupts to work with your NI FBUS software properly 2 Find the jumpers that set the interrupt request line Refer to Figure 2 3 AT FBUS 2 Parts Locator Diagram The jumpers are located on the lower edge of your AT FBUS board The number on the boar...

Page 23: ...ur board look at the number printed on the board under the jumper Caution If you reinstall the NI FBUS software over an existing version you lose any existing board and port configuration information Before you reinstall the NI FBUS software write down your board configuration Also if you changed any port configuration parameters from their defaults write down the new parameters Complete the follo...

Page 24: ...y Proceed to the next section Configure the NI FBUS Software Configure the NI FBUS Software When you install the NI FBUS software the installation program starts the NI FBUS Configuration utility Configure the Base Address and IRQ To add view or change your base address or IRQ settings complete the following steps 1 In the NI FBUS Config window select the icon of the board you want to change and c...

Page 25: ...ver the fieldbus choose Default Address Enter a unique tag at the Device Tag prompt You may leave this empty if you have set the address to Default Address and you want a fieldbus network configuration utility to assign a tag over the fieldbus NI FBUS assigns default values for other communication parameters Click on the Advanced button to view or change these parameters You do not have to reenter...

Page 26: ...o access the port using the logical name Device Description DD information Base directory for DDs Location of the standard text dictionary You need to change this DD information only if you use NI FBUS to communicate with devices that have manufacturer specific blocks or parameters meaning that you have device manufacturer supplied DDs Fieldbus communication parameters for each fieldbus interface ...

Page 27: ...b You can also start nifb by selecting Start Settings Control Panel Devices nifb and clicking on the Start button 3 Start the nifb process by double clicking on the NIFB icon On successful startup NI FBUS displays a message saying that the process started up successfully and the title bar of the nifb window changes to NIFB running If NI FBUS does not start up successfully the base address the IRQ ...

Page 28: ...prompt net stop nifb 2 Start nifb by entering the following command at the command prompt net start nifb You can also start nifb by selecting Start Settings Control Panel Devices nifb and clicking on the Start button 3 Start the nifb process by double clicking on the NIFB icon If NI FBUS does not start up and displays the message Unable to download stack to board X you might have a memory base add...

Page 29: ... file in your program You must specify the include directory in your project settings You must link your program with the nifb lib import library National Instruments created this library using Microsoft Visual C C version 4 0 National Instruments used Borland C 4 5 to create nifb_bor lib a version of the library for Borland users You can create a console application using the nifbtest c sample pr...

Page 30: ...FBUS descriptors you open using the utility The area below the icon remains empty until you make an NI FBUS call to open a descriptor The NI FBUS Dialog utility displays an icon for each descriptor session link physical device Virtual Field Device VFD and block you open Click the right mouse button on an icon to view a list of valid NI FBUS functions for that descriptor When you choose a function ...

Page 31: ...e AT FBUS hardware and the recommended operating conditions Table A 1 Electrical Characteristics for the AT FBUS Characteristic Specification Power Requirement AT FBUS 750 mA Typical AT FBUS 2 820 mA Typical Table A 2 Physical Characteristics for the AT FBUS Characteristic Specification Dimensions 10 7 by 19 1 cm 4 2 by 7 5 in I O Connector DB 9 DSUB 1 per fieldbus channel ...

Page 32: ...Table A 3 Environmental Characteristics for the AT FBUS Characteristic Specification Operating Environment Component Temperature Relative Humidity 0 to 70 C 10 to 90 Noncondensing Storage Environment Temperature Relative Humidity 40 to 125 C 5 to 90 Noncondensing EMI FCC Class B Verified ...

Page 33: ...ime Electronic Services Bulletin Board Support National Instruments has BBS and FTP sites dedicated for 24 hour support with a collection of files and documents to answer most common customer questions From these sites you can also download the latest instrument drivers updates and example programs For recorded instructions on how to use the bulletin board and FTP services and for BBS automated in...

Page 34: ...ational Instruments office in your country contact the source from which you purchased your software to obtain support Telephone Fax Australia 03 9879 5166 03 9879 6277 Austria 0662 45 79 90 0 0662 45 79 90 19 Belgium 02 757 00 20 02 757 03 11 Canada Ontario 905 785 0085 905 785 0086 Canada Quebec 514 694 8521 514 694 4399 Denmark 45 76 26 00 45 76 26 02 Finland 09 527 2321 09 502 2930 France 01 4...

Page 35: ...___________________ Hard disk capacity _______MB Brand Instruments used __________________________________________________________________ National Instruments hardware product model _________________ Revision __________________ Configuration_____________________________________________________________________ National Instruments software product ___________________Version Configuration__________...

Page 36: ...__ Other Products Computer Make and Model _______________________________________________________ Microprocessor ________________________________________________________________ Clock Frequency _______________________________________________________________ Type of Video Board Installed _____________________________________________________ Operating System _________________________________________...

Page 37: ..._____________________________________________________________________________ ________________________________________________________________________________ ________________________________________________________________________________ ________________________________________________________________________________ _______________________________________________________________________________...

Page 38: ...ti 10 2 k kilo 103 M mega 106 degrees A amperes API Application Programmer Interface AT compatible compatible with the 16 bit Industry Standard Architecture b bits B bytes C Celsius CPU central processing unit DD Device Description DLL Data Link Layer DMA direct memory access DRAM Dynamic Random Access Memory ...

Page 39: ...S Link Active Scheduler m meters Man machine interface a graphical user interface for you to interact with the BridgeVIEW MMI system OD Object Dictionary octet a single 8 bit value Programmable Logic a device with multiple inputs and outputs that contains a program Control PLC you can alter s seconds Virtual Communication preconfigured or negotiated connections between virtual field devices on Rel...

Reviews: