National Instruments NI-VXI User Manual

Manual is about: NI-VXI User Manual

Summary of NI-VXI

  • Page 1

    Ni-vxi ™ user manual july 1996 edition part number 3 71702a-01 © copyright 1996 national instruments corporation. All rights reserved..

  • Page 2

    Internet support gpib: gpib.Support@natinst.Com daq: daq.Support@natinst.Com vxi: vxi.Support@natinst.Com labview: lv.Support@natinst.Com labwindows: lw.Support@natinst.Com hiq: hiq.Support@natinst.Com visa: visa.Support@natinst.Com lookout: lookout.Support@natinst.Com e-mail: info@natinst.Com ftp s...

  • Page 3: Important Information

    Important information warranty the media on which you receive national instruments software are warranted not to fail to execute programming instructions, due to defects in materials and workmanship, for a period of 90 days from date of shipment, as evidenced by receipts or other documentation. Nati...

  • Page 4: Table

    © national instruments corporation v ni-vxi user manual table of contents about this manual organization of this manual..................................................................................... Xiii conventions used in this manual .............................................................

  • Page 5: Chapter 3

    Table of contents ni-vxi user manual vi © national instruments corporation multiple mainframe support ..................................................................................... 2-5 controllers....................................................................................................

  • Page 6

    Table of contents © national instruments corporation vii ni-vxi user manual wslcmd ..................................................................................................... 3-11 wslresp...................................................................................................... ...

  • Page 7

    Table of contents ni-vxi user manual viii © national instruments corporation vxiout......................................................................................................... 3-25 vxioutreg ...................................................................................................

  • Page 8

    Table of contents © national instruments corporation ix ni-vxi user manual vxi interrupt functions ............................................................................................ 3-43 programming considerations ...................................................................... 3-45 ...

  • Page 9: Appendix A

    Table of contents ni-vxi user manual x © national instruments corporation defaultsoftresethandler............................................................................. 3-61 defaultsysfailhandler ................................................................................. 3-61 defaultsysr...

  • Page 10: Figures

    Table of contents © national instruments corporation xi ni-vxi user manual figures figure 1-1. Vxi configuration registers ................................................................ 1-2 figure 1-2. Vxi software protocols ........................................................................ ...

  • Page 11: About

    © national instruments corporation xiii ni-vxi user manual about this manual this manual describes in detail the features of the ni-vxi software and the vxi/vme function calls in the c/c++ and basic languages. Organization of this manual the ni-vxi user manual for c/c++ and basic is organized as fol...

  • Page 12

    About this manual ni-vxi user manual xiv © national instruments corporation • appendix b, customer communication, contains forms you can use to request help from national instruments or to comment on our manuals. • the glossary contains an alphabetical list and description of terms used in this manu...

  • Page 13: Related Documentation

    About this manual © national instruments corporation xv ni-vxi user manual related documentation the following documents contain information that you may find helpful as you read this manual: • ieee standard for a versatile backplane bus: vmebus, ansi/ieee standard 1014-1987 • multisystem extension ...

  • Page 14: Overview of Ni-Vxi

    © national instruments corporation 1-1 ni-vxi user manual overview of ni-vxi chapter 1 this chapter introduces you to the concepts of vxi (vme extensions for instrumentation), vme, mxi (multisystem extension interface), and their relationship to the ni-vxi application programmer’s interface (api). C...

  • Page 15: Register-Based Devices

    Chapter 1 overview of ni-vxi ni-vxi user manual 1-2 © national instruments corporation reserved reserved reserved reserved data low data high response/data extended protocol/signal offset status/control device type id register vxi configuration space offset 3f 20 ie 1c 1a 18 0e 0c 0a 08 06 04 02 00 ...

  • Page 16: Message-Based Devices

    Chapter 1 overview of ni-vxi © national instruments corporation 1-3 ni-vxi user manual message-based devices in addition to register-based devices, the vxibus specification also defines message-based devices, which are required to have communication registers in addition to configuration registers. ...

  • Page 17

    Chapter 1 overview of ni-vxi ni-vxi user manual 1-4 © national instruments corporation a fashion very similar to ieee 488 instruments. In general, message-based devices typically contain some level of local intelligence that uses or requires a high level of communication. In addition, the word seria...

  • Page 18: Mxibus Overview

    Chapter 1 overview of ni-vxi © national instruments corporation 1-5 ni-vxi user manual register. Devices that do not have bus master capability always transmit such information via interrupts, whereas devices that do have bus master capability can either use interrupts or send signals. Some devices ...

  • Page 19

    Chapter 1 overview of ni-vxi ni-vxi user manual 1-6 © national instruments corporation because mxi-2 incorporates all of these new signals into a single connector, the triggers, interrupts, and utility signals can be extended not only to other mainframes but also to the local cpu in all mxi-2 produc...

  • Page 20: Introduction to The

    © national instruments corporation 2-1 ni-vxi user manual introduction to the ni-vxi functions chapter 2 this chapter introduces you to the ni-vxi functions and their capabilities. Additional discussion is provided for each function’s parameters and includes descriptions of the application developme...

  • Page 21

    Chapter 2 introduction to the ni-vxi functions ni-vxi user manual 2-2 © national instruments corporation • low-level vxibus access functions—low-level vxi/vmebus access functions are the fastest access method for directly reading from or writing to any of the vxi/vmebus address spaces. You can use t...

  • Page 22: Vxi-Only Function Groups

    Chapter 2 introduction to the ni-vxi functions © national instruments corporation 2-3 ni-vxi user manual of the vxi/vme interrupt lines, vxi ttl triggers, vxi ecl triggers, and utility bus signals. The national instruments resource manager configures the mainframe extenders with settings based on us...

  • Page 23: Labwindows/cvi

    Chapter 2 introduction to the ni-vxi functions ni-vxi user manual 2-4 © national instruments corporation labwindows/cvi you can use the functions described in this manual with labwindows/cvi. Labwindows/cvi is an integrated development environment for building instrumentation applications using the ...

  • Page 24: Multiple Mainframe Support

    Chapter 2 introduction to the ni-vxi functions © national instruments corporation 2-5 ni-vxi user manual because value is an output parameter, &value is used when calling the function instead of value . The input parameters are la and reg . Return values and system errors all ni-vxi functions return...

  • Page 25

    Chapter 2 introduction to the ni-vxi functions ni-vxi user manual 2-6 © national instruments corporation cable connected towards the root frame) in the frame acts as a remote controller. An embedded or external controller may use a remote controller to control the remote mainframe. • external contro...

  • Page 26

    Chapter 2 introduction to the ni-vxi functions © national instruments corporation 2-7 ni-vxi user manual bu s na tio nal in strument s ® bu s na tion al in str um en ts ® bus n at ion al in str ument s ® na tion al in str um ent s ® bu s remote controller and extender remote controller and extender ...

  • Page 27

    Chapter 2 introduction to the ni-vxi functions ni-vxi user manual 2-8 © national instruments corporation most functions that take a controller parameter will allow you to pass (-1) as the logical address. This selects the default controller for the system. Notice that the default controller is deter...

  • Page 28: Using Ni-Vxi

    Chapter 2 introduction to the ni-vxi functions © national instruments corporation 2-9 ni-vxi user manual using ni-vxi this section presents a general overview of the more commonly used class of functions available in ni-vxi. Additional information summarizes how you can use the functions to perform ...

  • Page 29: The Busacc.H File

    Chapter 2 introduction to the ni-vxi functions ni-vxi user manual 2-10 © national instruments corporation the busacc.H file the busacc.H file defines constants and macros for use with the high/low-level and slave memory access functions (see the master memory access and slave memory access sections ...

  • Page 30: System Configuration Tools

    Chapter 2 introduction to the ni-vxi functions © national instruments corporation 2-11 ni-vxi user manual an important note about these two functions is that the internal structure maintains a record of the number of calls to initvxilibrary() and closevxilibrary(). Although initvxilibrary() needs to...

  • Page 31: C/c++ Example

    Chapter 2 introduction to the ni-vxi functions ni-vxi user manual 2-12 © national instruments corporation for example, all vxi devices have at least one logical address by which they can be accessed. However, it is simple to change the logical address of most devices. Therefore, any program that use...

  • Page 32: Word Serial Communication

    Chapter 2 introduction to the ni-vxi functions © national instruments corporation 2-13 ni-vxi user manual word serial communication when communicating with a message-based devices (mbd) in vxi, the protocol for string passing is known as word serial. The term is derived from the fact that all comman...

  • Page 33: Master Memory Access

    Chapter 2 introduction to the ni-vxi functions ni-vxi user manual 2-14 © national instruments corporation master memory access you can access vxibus memory directly through the ni-vxi high-level and low-level vxibus access functions, within the capabilities of the controller. The main difference bet...

  • Page 34

    Chapter 2 introduction to the ni-vxi functions © national instruments corporation 2-15 ni-vxi user manual timeout = 2000l; /* 2 seconds */ /* notice the use of the macros for defining the access */ /* parameters. These can be found in the ni-vxi header files */ addrptr1 = (uint32) mapvxiaddress(acce...

  • Page 35: Slave Memory Access

    Chapter 2 introduction to the ni-vxi functions ni-vxi user manual 2-16 © national instruments corporation note: on modern, 32-bit operating systems running on high-performance processors (such as microsoft windows nt on a pentium or solaris 2 on a sparc), we have found no performance gained by using...

  • Page 36: Interrupts and Signals

    Chapter 2 introduction to the ni-vxi functions © national instruments corporation 2-17 ni-vxi user manual /* at this point, the remote master can perform */ /* i/o on the shared, allocated space. In addition, */ /* the program can use the local address to perform */ /* i/o on the same space, such as...

  • Page 37: C/c++ Example:

    Chapter 2 introduction to the ni-vxi functions ni-vxi user manual 2-18 © national instruments corporation alternatively, you can choose to handle either signals or interrupts with a callback handler. You can use routesignal() to specify that the events should be handled by the callback handlers rath...

  • Page 38: Triggers

    Chapter 2 introduction to the ni-vxi functions © national instruments corporation 2-19 ni-vxi user manual note: although ni-vxi simplifies the installation and use of callback handlers, it cannot affect how the system handles interrupts. The programmer must follow programming guidelines set by the c...

  • Page 39: Software Overview

    © national instruments corporation 3-1 ni-vxi user manual software overview chapter 3 this chapter describes the c/c++ and basic usage of vxi and vme functions and briefly describes each function. Functions are listed alphabetically in each functional group. System configuration functions the vxi sy...

  • Page 40: Closevxilibrary ()

    Chapter 3 software overview ni-vxi user manual 3-2 © national instruments corporation closevxilibrary () closevxilibrary is the application termination routine, which must be included at the end (or abort) of any application. Closevxilibrary disables interrupts and frees dynamic memory allocated for...

  • Page 41

    Chapter 3 software overview © national instruments corporation 3-3 ni-vxi user manual getdevinfo (la, field, fieldvalue) getdevinfo returns information about the specified device from the ni-vxi rm table. The field parameter specifies the attribute of the information to retrieve. Possible fields inc...

  • Page 42: Initvxilibrary ()

    Chapter 3 software overview ni-vxi user manual 3-4 © national instruments corporation initvxilibrary () initvxilibrary is the ni-vxi initialization routine. An application must call initvxilibrary at application startup. Initvxilibrary performs all necessary installation and initialization procedure...

  • Page 43

    Chapter 3 software overview © national instruments corporation 3-5 ni-vxi user manual setdevinfoshort (la, field, shortvalue) setdevinfoshort changes information about the specified device in the ni-vxi rm table. The field parameter specifies the attribute of the information to change. Setdevinfosho...

  • Page 44

    Chapter 3 software overview ni-vxi user manual 3-6 © national instruments corporation • buffer writes • buffer reads the word serial protocol is a 16-bit transfer protocol between a commander and its servants. The commander polls specific bits in the servant’s vxi response register to determine when...

  • Page 45: Programming Considerations

    Chapter 3 software overview © national instruments corporation 3-7 ni-vxi user manual in addition to the four basic types of word serial transfers, there are two special cases: the word serial clear and trigger commands. The word serial clear command must ignore the err* bit. One of the functions of...

  • Page 46

    Chapter 3 software overview ni-vxi user manual 3-8 © national instruments corporation the wsabort function is the only exception to this restriction. Wsabort is used to abort various word serial transfers in progress and will usually be called from an interrupt service routine (although it is not li...

  • Page 47

    Chapter 3 software overview © national instruments corporation 3-9 ni-vxi user manual figure 3-1 gives a precise description of this two-level mutual exclusion algorithm. Notice that this mutual exclusion is on a per logical address basis. Any number of logical addresses can have word serial transfe...

  • Page 48: Wsabort (La, Abortop)

    Chapter 3 software overview ni-vxi user manual 3-10 © national instruments corporation until the transfer is complete or a timeout occurs. This support also keeps a word serial device which is not responding from “hanging” on the local cpu. The following paragraphs describe the commander word serial...

  • Page 49: Wsgettmo (Actualtimo)

    Chapter 3 software overview © national instruments corporation 3-11 ni-vxi user manual wsecmd (la, cmdext, cmd, respflag, response) wsecmd sends an extended word serial command or query to a message-based servant. It polls the wr bit before sending the 48-bit command. Wsecmd sends the command by wri...

  • Page 50: Wsresp (La, Response)

    Chapter 3 software overview ni-vxi user manual 3-12 © national instruments corporation normally, you would use the wslcmd function to send longword serial queries with the response automatically read (specified with respflag). In cases when you need to inspect the longword serial transfer at a lower...

  • Page 51: Wssettmo (Timo, Actualtimo)

    Chapter 3 software overview © national instruments corporation 3-13 ni-vxi user manual normally, you would use the wscmd function to send word serial queries with the response automatically read (specified with respflag). In cases when you need to inspect the word serial transfer at a lower level, h...

  • Page 52

    Chapter 3 software overview ni-vxi user manual 3-14 © national instruments corporation wswrtf (la, filename, count, modevalue, retcount) wswrtf is an extension of the wswrt function. Wswrtf writes a specified number of bytes from the specified file to a message-based servant using the vxibus byte tr...

  • Page 53: Programming Considerations

    Chapter 3 software overview © national instruments corporation 3-15 ni-vxi user manual a buffer write is a series of byte available word serial commands sent to the servant, with the additional constraint that the data in ready (dir) bit as well as the wr bit must be asserted before sending the byte...

  • Page 54

    Chapter 3 software overview ni-vxi user manual 3-16 © national instruments corporation (dir, dor, wr, rr, and err*) are done automatically within the functions as required. Figure 3-2 provides a graphical overview of the servant word serial functions. Error hardware wsscmdhandler ni-vxi base interru...

  • Page 55: Defaultwsscmdhandler (Cmd)

    Chapter 3 software overview © national instruments corporation 3-17 ni-vxi user manual defaultwsscmdhandler (cmd) defaultwsscmdhandler is the default handler for the wsswrt interrupt, which initvxilibrary automatically installs when it initializes the ni-vxi software. The current wsscmdhandler is ca...

  • Page 56: Genproterror (Proterr)

    Chapter 3 software overview ni-vxi user manual 3-18 © national instruments corporation defaultwsslcmdhandler calls genproterror with a protocol error code of unsupcom for every longword serial command received. Defaultwssrdhandler (status, count) defaultwssrdhandler is the default handler for the ws...

  • Page 57: Getwssecmdhandler ()

    Chapter 3 software overview © national instruments corporation 3-19 ni-vxi user manual getwssecmdhandler () getwssecmdhandler returns the address of the current wssecmd interrupt handler function. While word serial operations are enabled, the wssecmd interrupt handler will be called every time an ex...

  • Page 58: Setwssecmdhandler (Func)

    Chapter 3 software overview ni-vxi user manual 3-20 © national instruments corporation default handler provides examples of how to parse commands, respond to queries, and generate protocol errors. Setwssecmdhandler (func) setwssecmdhandler replaces the current wssecmd interrupt handler with an alter...

  • Page 59: Wssabort (Abortop)

    Chapter 3 software overview © national instruments corporation 3-21 ni-vxi user manual wssabort (abortop) wssabort aborts the servant word serial operation(s) in progress. It returns an error code of forcedabort to the wssrd or wsswrt interrupt handlers in response to the corresponding pending funct...

  • Page 60: Wssnoresp ()

    Chapter 3 software overview ni-vxi user manual 3-22 © national instruments corporation wssnoresp () wssnoresp sets the wr bit so that it is ready to accept any further word serial commands. The wsscmd interrupt handler should call wssnoresp after processing a word serial command (it calls wsssendres...

  • Page 61: Programming Considerations

    Chapter 3 software overview © national instruments corporation 3-23 ni-vxi user manual high-level vxi/vmebus access functions you can use both low-level and high-level vxi/vmebus access functions to read or write to vxi/vmebus addresses. These are required in many situations, including the following...

  • Page 62: Vxiinreg (La, Reg, Value)

    Chapter 3 software overview ni-vxi user manual 3-24 © national instruments corporation vxi/vmebus access functions. You can use both high-level and low-level vxi/vmebus access functions at the same time. The following paragraphs describe the high-level vxi/vmebus access functions. Vxiin (accessparms...

  • Page 63: Vxioutreg (La, Reg, Value)

    Chapter 3 software overview © national instruments corporation 3-25 ni-vxi user manual address space for the source and destination, respectively. The width parameter selects either byte, word, or longword transfers. If one of the addresses selected has no device residing at the address and a bus er...

  • Page 64

    Chapter 3 software overview ni-vxi user manual 3-26 © national instruments corporation low-level vxi/vmebus access functions this section describes the use of the low-level vxi/vmebus access functions. You can use both low-level and high-level vxi/vmebus access functions to directly read or write to...

  • Page 65: Programming Considerations

    Chapter 3 software overview © national instruments corporation 3-27 ni-vxi user manual programming considerations all accesses to the vxi/vmebus address spaces are performed by reads and writes to particular offsets within the local cpu address space, which are made to correspond to addresses on the...

  • Page 66: Owner Privilege

    Chapter 3 software overview ni-vxi user manual 3-28 © national instruments corporation multiple-pointer access for a window application programmers can encounter a potential problem when the application requires different privilege states, byte orders, and/or base addresses within the same window. I...

  • Page 67

    Chapter 3 software overview © national instruments corporation 3-29 ni-vxi user manual can have multiple pointers in the same process or over multiple processes to access a particular window simultaneously, while still guaranteeing that the hardware context does not change between accesses. The call...

  • Page 68: Getcontext (Window, Context)

    Chapter 3 software overview ni-vxi user manual 3-30 © national instruments corporation getbyteorder (window, ordermode) getbyteorder retrieves the byte/word order of data transferred into or out of the specified window. The two possible settings are motorola (most significant byte/word first) or int...

  • Page 69

    Chapter 3 software overview © national instruments corporation 3-31 ni-vxi user manual getvxibusstatusind (controller, field, status) getvxibusstatusind retrieves information about the current state of the vxi/vmebus. The information that can be returned includes the state of the sysfail, acfail, vx...

  • Page 70: Mapvxiaddresssize (Size)

    Chapter 3 software overview ni-vxi user manual 3-32 © national instruments corporation mapvxiaddresssize (size) mapvxiaddresssize sets the size for mapping user windows. The subsequent calls to mapvxiaddress will attempt to map a window of the size passed to mapvxiaddresssize . Mapvxiaddresssize onl...

  • Page 71: Setprivilege (Window, Priv)

    Chapter 3 software overview © national instruments corporation 3-33 ni-vxi user manual setprivilege (window, priv) setprivilege sets the vxi/vmebus windowing hardware to access the specified window with the specified vxi/vmebus access privilege. The possible privileges include nonprivileged data, su...

  • Page 72: Getmyla

    Chapter 3 software overview ni-vxi user manual 3-34 © national instruments corporation local resource access functions local resources are hardware and/or software capabilities that are reserved for the local cpu (the cpu on which the ni-vxi interface resides). You can use these functions to gain ac...

  • Page 73: Vxiinlr (Reg, Width, Value)

    Chapter 3 software overview © national instruments corporation 3-35 ni-vxi user manual vxiinlr (reg, width, value) vxiinlr reads a single byte, word, or longword from the local cpu vxi/vme registers. On many cpus, the local cpu vxi/vme registers cannot be accessed from the local cpu in the a16 addre...

  • Page 74: Vxioutlr (Reg, Width, Value)

    Chapter 3 software overview ni-vxi user manual 3-36 © national instruments corporation vxioutlr (reg, width, value) vxioutlr writes a single byte, word, or longword to the local cpu vxi/vme registers. On many cpus, the local cpu vxi/vme registers cannot be accessed from the local cpu in the a16 addr...

  • Page 75

    Chapter 3 software overview © national instruments corporation 3-37 ni-vxi user manual vxi signals from message-based devices can be one of two types: response signals and event signals (bit 15 distinguishes between the two). Response signals are used to report changes in word serial communication s...

  • Page 76: Programming Considerations

    Chapter 3 software overview ni-vxi user manual 3-38 © national instruments corporation programming considerations the global signal queue used to hold signal values is of a finite length. If the application is not handling signals fast enough, it is theoretically possible to fill the global signal q...

  • Page 77: Waitforsignal Considerations

    Chapter 3 software overview © national instruments corporation 3-39 ni-vxi user manual figure 3-3 provides a graphical overview of the ni-vxi interrupt and signal functions. Routevxiint() vxi/vme interrupts 1-7 hardware ni-vxi software user application vxiinthandlers signalhandlers ni-vxi base inter...

  • Page 78: Disablesignalint ()

    Chapter 3 software overview ni-vxi user manual 3-40 © national instruments corporation returned immediately to the caller and the process/function is not suspended. The following paragraphs describe the vxi signal functions and default handler. The descriptions are presented at a functional level de...

  • Page 79: Getsignalhandler (La)

    Chapter 3 software overview © national instruments corporation 3-41 ni-vxi user manual getsignalhandler (la) getsignalhandler returns the address of the current signal handler for the specified vxi logical address. If signal interrupts are enabled (via enablesignalint ), the signal handler for a spe...

  • Page 80: Signalenq (Signal)

    Chapter 3 software overview ni-vxi user manual 3-42 © national instruments corporation signaldeq (la, signalmask, signal) signaldeq retrieves signals from the global signal queue. Two methods are available to handle vxi signals. You can handle the signals either by handlers or by queueing on a globa...

  • Page 81: Vxi Interrupt Functions

    Chapter 3 software overview © national instruments corporation 3-43 ni-vxi user manual vxi interrupt functions vxi/vme interrupts are a basic form of asynchronous communication used by devices with interrupter support. In vme, a device asserts a vme interrupt line and the vme interrupt handler devic...

  • Page 82

    Chapter 3 software overview ni-vxi user manual 3-44 © national instruments corporation specifies which types of signals are handled by signal handlers, and which are queued onto the global signal queue for each vxi logical address. A separate handler can be installed for each vxi logical address pre...

  • Page 83: Programming Considerations

    Chapter 3 software overview © national instruments corporation 3-45 ni-vxi user manual deassertvxiint and acknowledgevxiint are intended only for debugging purposes. Programming considerations figure 3-4 is a graphical overview of the ni-vxi interrupt and signal model. Routevxiint() vxi/vme interrup...

  • Page 84

    Chapter 3 software overview ni-vxi user manual 3-46 © national instruments corporation roak versus rora vxi/vme interrupters there are two types of vxi/vme interrupters. The release on acknowledge (roak) interrupter is the more common. A roak interrupter automatically unasserts the vxi/vme interrupt...

  • Page 85

    Chapter 3 software overview © national instruments corporation 3-47 ni-vxi user manual normally, vxi/vme interrupts are automatically acknowledged when enabled via the function enablevxiint . However, if the interrupts are not enabled and the assertion of an interrupt is detected through some method...

  • Page 86

    Chapter 3 software overview ni-vxi user manual 3-48 © national instruments corporation defaultvxiinthandler sets the global variables vxiintcontroller , vxiintlevel , and vxiintstatusid . You can leave this default handler installed or install a completely new handler using setvxiinthandler . Disabl...

  • Page 87: Getvxiinthandler (Level)

    Chapter 3 software overview © national instruments corporation 3-49 ni-vxi user manual frame (for an embedded cpu) or the first extended controller (in an external cpu situation). Enablevxitosignalint (controller, levels) enablevxitosignalint is used to sensitize the application to specified interru...

  • Page 88

    Chapter 3 software overview ni-vxi user manual 3-50 © national instruments corporation queue. The routesignal function specifies which types of signals should be handled by signal handlers, and which should be queued on the global signal queue for each vxi logical address. If the vxi/vme interrupt s...

  • Page 89: Vxi Trigger Functions

    Chapter 3 software overview © national instruments corporation 3-51 ni-vxi user manual vxi trigger functions vxi triggers are a backplane feature that vxi added to the vme standard. Tight timing and signaling is important between many types of controllers and/or instruments. In the past, clumsy cabl...

  • Page 90

    Chapter 3 software overview ni-vxi user manual 3-52 © national instruments corporation maximum time from source assertion edge). The accepting device(s) can later unassert the trigger line (no maximum time is specified) to complete the handshake. • start/stop—start/stop is a one-line, multiple-devic...

  • Page 91: Capabilities

    Chapter 3 software overview © national instruments corporation 3-53 ni-vxi user manual general, however, national instruments hardware has two current configurations that provide triggering functionality: • trigger control used on a vxi-mxi-1 frame extender when used as an extending controller (unde...

  • Page 92: Acceptor Trigger Functions

    Chapter 3 software overview ni-vxi user manual 3-54 © national instruments corporation embedded, external mxi-2, and remote controller trigger capabilities national instruments has developed a highly functional asic specifically designed for use within the vxibus triggering environment called the tr...

  • Page 93

    Chapter 3 software overview © national instruments corporation 3-55 ni-vxi user manual acknowledgetrig (controller, line) acknowledgetrig performs the required trigger acknowledgments for the async or semi-sync vxi-defined protocol, as configured via the enabletrigsense function. Defaulttrighandler ...

  • Page 94: Gettrighandler (Line)

    Chapter 3 software overview ni-vxi user manual 3-56 © national instruments corporation gettrighandler (line) gettrighandler returns the address of the current trigger handler for the specified vxi trigger line. Settrighandler (lines, func) settrighandler replaces the current trigger handler for the ...

  • Page 95: Source Trigger Functions

    Chapter 3 software overview © national instruments corporation 3-57 ni-vxi user manual crosspoint switch configurator (depending on the hardware capabilities of the applicable device). Unmaptrigtotrig (controller, srctrig, desttrig) unmaptrigtotrig unconfigures triggering hardware that was configure...

  • Page 96

    Chapter 3 software overview ni-vxi user manual 3-58 © national instruments corporation trigger configuration functions you can use the ni-vxi trigger configuration functions to configure not only the general settings of the trigger inputs and outputs, but also the tic counter and tick timers. Trigas...

  • Page 97

    Chapter 3 software overview © national instruments corporation 3-59 ni-vxi user manual panel. Gpio 3 is fed back in as the extclk signal used for signal conditioning modes with maptrigtotrig . The six remaining gpios are dependent upon the hardware platform. Regardless of the sources connected to th...

  • Page 98: Defaultbuserrorhandler ()

    Chapter 3 software overview ni-vxi user manual 3-60 © national instruments corporation the following paragraphs describe the system interrupt handler functions and default handlers. The descriptions are presented at a functional level describing the operation of each of the functions. The functions ...

  • Page 99: Defaultsoftresethandler ()

    Chapter 3 software overview © national instruments corporation 3-61 ni-vxi user manual low-level vxi/vmebus access functions will be reported to this handler. See also the descriptions of setbuserrorhandler and getbuserrorhandler . Defaultsoftresethandler () defaultsoftresethandler is the sample han...

  • Page 100: Disableacfail (Controller)

    Chapter 3 software overview ni-vxi user manual 3-62 © national instruments corporation defaultsysresethandler (controller) defaultsysresethandler is the sample handler for the sysreset interrupt, and is installed as a default handler when initvxilibrary initializes the ni-vxi software. It increments...

  • Page 101: Disablesysreset (Controller)

    Chapter 3 software overview © national instruments corporation 3-63 ni-vxi user manual state, the failed device clears its pass bit (in its status register) and asserts the sysfail* signal on the vxibus backplane. Disablesysreset (controller) disablesysreset desensitizes the application to sysreset ...

  • Page 102: Enablesysreset (Controller)

    Chapter 3 software overview ni-vxi user manual 3-64 © national instruments corporation specification requires that all vxi commanders monitor the passed or failed state of their vxi servants. When a vxibus device is in the failed state, the failed device clears its pass bit (in its status register) ...

  • Page 103: Getsoftresethandler ()

    Chapter 3 software overview © national instruments corporation 3-65 ni-vxi user manual getsoftresethandler () getsoftresethandler returns the address of the current soft reset interrupt handler. A default handler, defaultsoftresethandler , is automatically installed when initvxilibrary initializes t...

  • Page 104: Setsoftresethandler (Func)

    Chapter 3 software overview ni-vxi user manual 3-66 © national instruments corporation errors at times and valid results at other times. The initvxilibrary function automatically installs a default handler, defaultbuserrorhandler , when it initializes the ni-vxi software. Because bus errors can occu...

  • Page 105: Mapecltrig

    Chapter 3 software overview © national instruments corporation 3-67 ni-vxi user manual vxi/vmebus extender functions the ni-vxi software interface fully supports the standard vxibus extension method presented in the vxibus mainframe extender specification. When the national instruments resource mana...

  • Page 106: Maputilbus (Extender, Modes)

    Chapter 3 software overview ni-vxi user manual 3-68 © national instruments corporation you can use mapttltrig to configure the mainframe-to-mainframe mapping. The ni-vxi resource manager automatically configures a default mapping based on the user-modifiable configuration files. The mapttltrig funct...

  • Page 107: Function Classification

    © national instruments corporation1 a-1 ni-vxi user manual function classification reference a appendix this appendix contains two tables you can use as a quick reference. Table a-1, function listing by group, lists the ni-vxi functions by their group association. This arrangement can help you deter...

  • Page 108

    Appendix a function classification reference ni-vxi user manual a-2 © national instruments corporation table a-1. Function listing by group group function vxi vme c/c++ basic commander wsabort ✔ ✔ ✔ word serial wsclr ✔ ✔ ✔ protocol wscmd / wsecmd/ wslcmd ✔ ✔ ✔ wsgettmo ✔ ✔ ✔ wsrd / wsrdi / wsrdl ✔ ✔...

  • Page 109

    Appendix a function classification reference © national instruments corporation a-3 ni-vxi user manual table a-1. Function listing by group group function vxi vme c/c++ basic servant word setwsswrthandler ✔ ✔ serial protocol wssabort ✔ ✔ (continued) wssdisable ✔ ✔ wssenable ✔ ✔ wssnoresp /wsslnoresp...

  • Page 110

    Appendix a function classification reference ni-vxi user manual a-4 © national instruments corporation table a-1. Function listing by group group function vxi vme c/c++ basic local resource getmyla ✔ ✔ ✔ ✔ access readmodid ✔ ✔ ✔ setmodid ✔ ✔ ✔ vxiinlr ✔ ✔ ✔ ✔ vximemalloc ✔ ✔ ✔ ✔ vximemcopy ✔ ✔ ✔ ✔ v...

  • Page 111

    Appendix a function classification reference © national instruments corporation a-5 ni-vxi user manual table a-1. Function listing by group group function vxi vme c/c++ basic vxi/vme routevxiint ✔ ✔ ✔ ✔ interrupt setvxiinthandler ✔ ✔ ✔ (continued) vxiintacknowledgemode ✔ ✔ ✔ ✔ triggers acknowledgetr...

  • Page 112

    Appendix a function classification reference ni-vxi user manual a-6 © national instruments corporation table a-1. Function listing by group group function vxi vme c/c++ basic system interrupt disablesysreset ✔ ✔ ✔ ✔ handler enableacfail ✔ ✔ ✔ ✔ (continued) enablesoftreset ✔ ✔ ✔ enablesysfail ✔ ✔ ✔ ✔...

  • Page 113

    Appendix a function classification reference © national instruments corporation a-7 ni-vxi user manual table a-2. Function listing by name function group vxi vme c/c++ basic acknowledgetrig triggers ✔ ✔ ✔ acknowledgevxiint vxi/vme interrupt ✔ ✔ ✔ ✔ assertsysreset system interrupt handler ✔ ✔ ✔ ✔ ass...

  • Page 114

    Appendix a function classification reference ni-vxi user manual a-8 © national instruments corporation table a-2. Function listing by name function group vxi vme c/c++ basic disableacfail system interrupt handler ✔ ✔ ✔ ✔ disablesignalint vxi signal ✔ ✔ ✔ disablesoftreset system interrupt handler ✔ ✔...

  • Page 115

    Appendix a function classification reference © national instruments corporation a-9 ni-vxi user manual table a-2. Function listing by name function group vxi vme c/c++ basic getcontext low-level vxi/vmebus access ✔ ✔ ✔ ✔ getdevinfo system configuration ✔ ✔ ✔ getdevinfolong system configuration ✔ ✔ ✔...

  • Page 116

    Appendix a function classification reference ni-vxi user manual a-10 © national instruments corporation table a-2. Function listing by name function group vxi vme c/c++ basic initvxilibrary system configuration ✔ ✔ ✔ ✔ mapecltrig vxi/vmebus extender ✔ ✔ ✔ maptrigtotrig triggers ✔ ✔ ✔ mapttltrig vxi/...

  • Page 117

    Appendix a function classification reference © national instruments corporation a-11 ni-vxi user manual table a-2. Function listing by name function group vxi vme c/c++ basic setsignalhandler vxi signal ✔ ✔ ✔ setsoftresethandler system interrupt handler ✔ ✔ setsysfailhandler system interrupt handler...

  • Page 118

    Appendix a function classification reference ni-vxi user manual a-12 © national instruments corporation table a-2. Function listing by name function group vxi vme c/c++ basic access vxiinreg high-level vxi/vmebus access ✔ ✔ ✔ vxiintacknowledgemode vxi/vme interrupt ✔ ✔ ✔ ✔ vximemalloc local resource...

  • Page 119

    Appendix a function classification reference © national instruments corporation a-13 ni-vxi user manual table a-2. Function listing by name function group vxi vme c/c++ basic wsrdf commander word serial protocol ✔ ✔ ✔ wssabort servant word serial protocol ✔ ✔ wssdisable servant word serial protocol ...

  • Page 120: Customer Communication

    © national instruments corporation b-1 ni-vxi user manual customer communication b appendix for your convenience, this appendix contains forms to help you gather the information necessary to help us solve technical problems you might have as well as a form you can use to comment on the product docum...

  • Page 121: Faxback Support

    Faxback support faxback is a 24-hour information retrieval system containing a library of documents on a wide range of technical information. You can access faxback from a touch-tone telephone at (512) 418-1111. E-mail support (currently u.S. Only) you can submit technical support questions to the a...

  • Page 122: Technical Support Form

    Technical support form photocopy this form and update it each time you make changes to your software or hardware, and use the completed copy of this form as a reference for your current configuration. Completing this form accurately before contacting national instruments for technical support helps ...

  • Page 123: Documentation Comment Form

    Documentation comment form national instruments encourages you to comment on the documentation supplied with our products. This information helps us provide quality products to meet your needs. Title: ni-vxi™ user manual edition date: july 1996 part number: 371702a-01 please comment on the completen...

  • Page 124: Glossary

    © national instruments corporation g-1 ni-vxi user manual glossary prefix meaning value n- nano- 10 -9 m- milli- 10 -3 k- kilo- 10 3 m- mega- 10 6 g- giga- 10 9 a a16 space one of the vxibus address spaces. Equivalent to the vme 64 kb short address space. In vxi, the upper 16 kb of a16 space is allo...

  • Page 125

    Glossary ni-vxi user manual g-2 © national instruments corporation address modifier one of six signals in the vmebus specification used by vmebus masters to indicate the address space and mode (supervisory/nonprivileged, data/program/block) in which a data transfer is to take place. Address space a ...

  • Page 126

    Glossary © national instruments corporation g-3 ni-vxi user manual bav word serial byte available command. Used to transfer 8 bits of data from a commander to its servant under the word serial protocol. Berr* bus error signal. This signal is asserted by either a slave device or the bus time out (bto...

  • Page 127

    Glossary ni-vxi user manual g-4 © national instruments corporation c clearing replacing the information in a register, storage location, or storage unit with zeros or blanks. Clk10 a 10 mhz, ± 100 ppm, individually buffered (to each module slot), differential ecl system clock that is sourced from sl...

  • Page 128

    Glossary © national instruments corporation g-5 ni-vxi user manual d data transfer bus one of four buses on the vmebus backplane. The dtb is used by a bus master to transfer binary data between itself and a slave device. Decimal numbering system based upon the 10 digits 0 to 9. Also known as base 10...

  • Page 129

    Glossary ni-vxi user manual g-6 © national instruments corporation eos end of string; a character sent to designate the last byte of a data message. Err protocol error event signal a 16-bit value written to a message-based device’s signal register in which the most significant bit (bit 15) is a 1, d...

  • Page 130

    Glossary © national instruments corporation g-7 ni-vxi user manual gpio general-purpose input output, a module within the national instruments tic chip which is used for two purposes. First, gpios are used for connecting external signals to the tic chip for routing/conditioning to the vxibus trigger...

  • Page 131

    Glossary ni-vxi user manual g-8 © national instruments corporation ieee 488.2 a supplemental standard for gpib. Its full title is codes, formats, protocols and common commands. Int16 a 16-bit signed integer; may also be called a short integer or word. Int32 a 32-bit signed integer; may also be calle...

  • Page 132

    Glossary © national instruments corporation g-9 ni-vxi user manual m mb 1,048,576 or 2 20 mapping establishing a range of address space for a one-to-one correspondence between each address in the window and an address in vxibus memory. Master a functional part of a mxi/vme/vxibus device that initiat...

  • Page 133

    Glossary ni-vxi user manual g-10 © national instruments corporation n ni-vxi the national instruments bus interface software for vme/vxibus systems. Nonprivileged access one of the defined types of vmebus data transfers; indicated by certain address modifier codes. Each of the defined vmebus address...

  • Page 134

    Glossary © national instruments corporation g-11 ni-vxi user manual queue a group of items waiting to be acted upon by the computer. The arrangement of the items determines their processing priority. Queues are usually accessed in a fifo fashion. R read to get information from any input device or fi...

  • Page 135

    Glossary ni-vxi user manual g-12 © national instruments corporation roak release on acknowledge; a type of vxi interrupter which always deasserts its interrupt line in response to an iack cycle on the vxibus. All message-based vxi interrupters must be roak interrupters. Ror release on request; a typ...

  • Page 136

    Glossary © national instruments corporation g-13 ni-vxi user manual signal any communication between message-based devices consisting of a write to a signal register. Sending a signal requires that the sending device have vmebus master capability. Signed integer n bit pattern, interpreted such that ...

  • Page 137

    Glossary ni-vxi user manual g-14 © national instruments corporation system controller a functional module that has arbiter, daisy-chain driver, and mxibus cycle timeout responsibility. Always the first device in the mxibus daisy-chain. System hierarchy the tree structure of the commander/servant rel...

  • Page 138

    Glossary © national instruments corporation g-15 ni-vxi user manual v vic vxi interactive control program, a part of the ni-vxi bus interface software package. Used to program vxi devices, and develop and debug vxi application programs. Called victext when used on text- based platforms. Vme versa mo...

  • Page 139

    Glossary ni-vxi user manual g-16 © national instruments corporation wrviol write ready protocol violation; a type of word serial protocol error. If a commander attempts to write a command or query to a servant that is not write ready (already has a command or query pending), a write ready protocol v...

  • Page 140

    © national instruments corporation i-1 ni-vxi user manual index a acceptor trigger functions acknowledgetrig, 3-55 defaulttrighandler, 3-55 defaulttrighandler2, 3-55 disabletrigsense, 3-55 enabletrigsense, 3-55 gettrighandler, 3-56 overview, 3-54 settrighandler, 3-56 waitfortrig, 3-56 access functio...

  • Page 141

    Index ni-vxi user manual i-2 © national instruments corporation wscmd, 3-10 wsecmd, 3-11 wsgettmo, 3-11 wslcmd, 3-11 wslresp, 3-11 to 3-12 wsrd, 3-12 wsrdf, 3-12 wsresp, 3-12 to 3-13 wssettmo, 3-13 wstrg, 3-13 wswrt, 3-13 wswrtf, 3-14 configuration functions. See system configuration functions; trig...

  • Page 142

    Index © national instruments corporation i-3 ni-vxi user manual external controllers, 2-6 to 2-7 definition, 2-6 embeddded controller connected to other frames (figure), 2-6 embeddded controller connected using mxi-2 (figure), 2-7 f fax and telephone support, b-2 faxback support, b-2 finddevla funct...

  • Page 143

    Index ni-vxi user manual i-4 © national instruments corporation interrupts interrupt service routine support, commander word serial protocol functions, 3-7 to 3-8 interrupts and asynchronous events, 1-4 to 1-5 l labwindows/cvi software, 2-4 to 2-5 c/c++ example, 2-4 input versus output parameters, 2...

  • Page 144

    Index © national instruments corporation i-5 ni-vxi user manual multiple-pointer access for window, 3-28 to 3-29 access-only privilege, 3-28 to 3-29 owner privilege, 3-28 multitasking support, commander word serial protocol functions cooperative, 3-7 to 3-8 preemptive operating system, 3-8 to 3-10 m...

  • Page 145

    Index ni-vxi user manual i-6 © national instruments corporation request for service false (reqf) event, 3-37 request for service false (reqf) status/id, 3-37 request for service true (reqt) event, 3-37 request for service true (reqt) status/id, 3-37 response signals, 3-37 response status/ids, 3-43 r...

  • Page 146

    Index © national instruments corporation i-7 ni-vxi user manual setwssecmdhandler function, 3-20 setwsslcmdhandler function, 3-20 setwssrdhandler function, 3-20 setwsswrthandler function, 3-20 shared memory events, 3-37, 3-43 signal handling c/c++ example, 2-18 overview, 2-17 to 2-18 signal queuing ...

  • Page 147

    Index ni-vxi user manual i-8 © national instruments corporation start/stop, 3-52 sync, 3-51 triggering hardware capabilities, 3-52 to 3-54 embedded, external mxi-2, and remote controller, 3-54 external controller/vxi-mxi-1, 3-53 triggers definition, 3-51 overview, 2-19 u unmaptrigtotrig function, 3-...

  • Page 148

    Index © national instruments corporation i-9 ni-vxi user manual map trigger functions maptrigtotrig, 3-56 to 3-57 overview, 3-56 unmaptrigtotrig, 3-57 overview, 2-3, 3-51 to 3-52 source trigger functions overview, 3-57 scrtrig, 3-57 trigger configuration functions overview, 3-58 trigassertconfig, 3-...

  • Page 149

    Index ni-vxi user manual i-10 © national instruments corporation wsslnoresp function, 3-21, 3-22 wsslsendresp function, 3-21 wssrd function, 3-22 wsssendresp function, 3-22 wsswrt function, 3-22 wstrg function, 3-13 wswrt function, 3-13 wswrtf, 3-14.