/?чE/?чEqHHLєџєџ Xg(ќšHHdh I I $Normalџџџџј џ6џџџџџџџџ<  ШB6666$$гФрші ZТажѓ\EwјJСљь­ќ­ќ­ќ­ќ­ќ­ќ­ќ<щ ќ 2 $$т€Ђ VISA XOP џџџџџџџџџџџџџџg$XVISA (Virtual Instrument Software Architecture) is an instrument control system defined by the VXIplug&play Systems Alliance which is part of the IVI Foundation (). It enables a program to control VISA-compliant instruments connected to a computer through serial port, GPIB, Ethernet, VXI bus, USB, and other media. ЂџџџџЭџџџџџџџџт$XWith USB, only instruments that support the  are supported. If in doubt check with your instrument vendor. To interface with non-USBTMC instruments via USB, you need to write your own XOP that uses a vendor-supplied library. ,џџџџџџџџ-џџџџџџџџИXThere are several implementations of the VISA library. The most prominent is NI-VISA from National Instruments. It is the only implementation the runs on Macintosh as well as Windows. к$XTo use VISA with Igor you need to understand the basics of VISA. The National Instruments NI-VISA User Manual presents the basics of VISA very well. It is written for C programmers but you need to understand the same concepts to use VISA from Igor. Even if you are using a different VISA implementation, we recommend that you read the first five chapters of the NI VISA User Manual. You can download the NI-VISA User Manual from . ­џџџџиџџџџџџџџиXThis version of VISA XOP requires Igor Pro 8.00 or later because it supports long object names and paths. It runs on Macintosh in 64 bits (VISA64.xop) and on Windows in 32 bits (VISA64.xop) and 64 bits (VISA64.xop). ФXYou must have an implementation of VISA, such as NI-VISA, installed on your machine. You need to consult the documentation from your VISA library vendor to learn how to configure the VISA system. йHXThe VISA XOP adds no menu items or dialogs to Igor. It does add a set of operations and functions which you can call from Igor user-defined functions. The VISA XOP Functions are low-level functions that map directly to VISA library functions. The VISA XOP Operations are higher level operations similar to operations added by Igor's NIGPIB2 XOP. For most applications you will rely on the high-level operations and the basic low-level functions such as viOpen and viClose. ›џџџџ­џџџџџџџџїџџџџ џџџџџџџџ|XAn Igor procedure file, VISA.ipf, is also provided. It defines constants that you need when calling the VISA XOP functions. ЇXVISA XOP supports a subset of the capability of the VISA library. This subset will be sufficient for most data acquisitions tasks. Capabilities not supported include: X Formatted I/O X Asynchronous I/O X Event handler callbacks ЫXWhen you interface an instrument to Igor using VISA, you are dealing with software in the instrument, with the VISA library and with the VISA XOP. Interactions between these software elements can make interfacing difficult. You can speed development and avoid frustration by eliminating unknowns. You need a basic understanding of VISA, a good understanding the instrument's capabilities and expectations, and a good understanding of the VISA XOP to succeed. q$XVISA XOP is thread-safe. See ThreadSafe Functions and Multitasking for information on multithreaded programming. џџџџBџџџџџџџџInstalling VISA and VISA XOP иXYou must install a VISA library implementation (e.g., NI-VISA, TekVISA or Agilent VISA) on your machine. If you don't already have a VISA library that came with from your instrument supplier, NI-VISA is recommended. ч$XYou should be able to find a link to the NI-VISA installer for your platform at . You will need to read the documentation for the installed implementation to learn how to configure it for your hardware. PџџџџlџџџџџџџџРXIf you are running VISA XOP with Igor6 on Windows, and you do not have the Visual Studio 2013 runtime libraries on your system, you need to download and install them. They are available from: @X џџџџа$XTo activate the VISA XOP, create an alias (Macintosh) or shortcut (Windows) for the VISA.xop file and put the alias or shortcut in "Igor Pro User Files/Igor Extensions" (see Igor Pro User Files for details). ЎџџџџСџџџџџџџџя$XAlso activate VISA.ipf as a global procedure file by making an alias (Macintosh) or shortcut (Windows) for the VISA.ipf file and putting the alias or shortcut in "Igor Pro User Files/Igor Procedures" (see Igor Pro User Files for details). ЭџџџџрџџџџџџџџXNow relaunch Igor. $VISA XOP 64-bit Integer Limitations `$XAs of Igor Pro 7.00, Igor supports 64-bit signed and unsigned integer waves as well as 64-bit signed and unsigned function parameters and local variables. VISA XOP operations work with 64-bit integer values but are limited to 53 bits of precision. This means they work correctly with values up to about 9 quadrillion and produce incorrect results with larger values. This limitation stems from of the use of double-precision floating point variables, which store 53 bits for the , in the internal VISA XOP code and in Igor itself. Removing this limitation would require major rewrites and is not practical. пџџџџџџџџрџџџџџџџџ2XThis limitation affects the following operations: =XVISAReadBinary, VISAWriteBinary, VISAReadWave, VISAWriteWave zXA workaround is to use VISAReadBinaryWave and VISAWriteBinaryWave which work with 64-bit integer values of any magnitude. )VISA Library Terminator Character Issues (џџџџџџЊXWhen reading data, by default the VISA library stops reading when it encounters a terminator character. The terminator character defaults to linefeed (decimal value 10). ЭXThis may cause problems with the viRead function and the VISARead, VISAReadWave, VISAReadBinary, and VISAReadBinaryWave operations. Problems are most likely with the VISAReadBinary and VISAReadBinaryWave. ЯHXThis default behavior causes a problem if you read binary data using VISAReadBinary or VISAReadBinaryWave. If the binary data happens to contain a byte with decimal value 10, the VISA library stops reading. EџџџџSџџџџџџџџWџџџџiџџџџџџџџ8XTo fix this, you need to set two attributes, like this: ZviSetAttribute(session, VI_ATTR_TERMCHAR_EN, 0) // Disable terminator character detection kviSetAttribute(session, VI_ATTR_ASRL_END_IN, 0) // Disable terminator character detection for serial ports K$XThe VI_ATTR_TERMCHAR_EN attribute works for all types of I/O except for serial port I/O. The VI_ATTR_ASRL_END_IN attribute works for serial port I/O. This is explained at - see "Termination Character Enabled" (VI_ATTR_TERMCHAR_EN) and "Serial End Modes for Reads" (VI_ATTR_ASRL_END_IN). ЋџџџџжџџџџџџџџЗXWe recommending setting both of the attributes as shown above so that terminator character detection will be disabled regardless of the type of instrument you are communicating with. \lXThis problem also affects the viRead function and the VISARead and VISAReadWave operations. џџџџ$џџџџџџџџ6џџџџ>џџџџџџџџCџџџџOџџџџџџџџ§XIn the case of viRead, it always terminates on a terminator character unless you use the commands above to disable terminator character detection. If you intend to read a certain number of bytes regardless of what they might be, use the commands above. ZДXIn the case of VISARead and VISAReadWave, if you omit /T=termStr or specify something other than "" for termStr, these operations read bytes one-at-a-time and the VISA library treatment of terminator characters does not come into play. However, if you specify /T="", they read the number of bytes specified by /N=n in one call to the VISA library. In this case, the presence of a terminator character stops reading before n bytes have been read unless you set the attributes shown above. If you use /T="" with VISARead or VISAReadWave, use the commands above to disable terminator character detection. 9џџџџџџ@џџџџџџџџhџџџџџџoџџџџџџџџџџџџџџ џџџџџџџџ9џџџџџџ:џџџџџџџџІџџџџџџЇџџџџџџџџRevision Notes 0 1.00 This is the first release of the VISA XOP. = 1.01 Now runs on Intel Mac OS X as well as PowerPC Mac OS X. ” 1.02 Fixed leaks in viWrite, viSetAttributeString and viLock. Fixed a leak in viRead that occurred only if the cnt parameter was greater than 1024. s 1.03 On Intel Macintosh only, byte swapping for VISAReadBinary, VISAReadBinaryWave, VISAWriteBinary and VISAWriteBinaryWave was backwards. If you specified /B (low-byte-first), meaning that you were reading or writing little-endian data, the data was byte-swapped when it should not have been. Conversely, if you omitted /B, meaning that you were reading or writing big-endian data, the data was not byte-swapped when it should have been. This has been fixed. If you are using these operations on Intel Macintosh then this fix will break your code. You need to remove /B if you are using it and add it if you are not using it. q 1.04 Added support for reading the VI_ATTR_USB_RECV_INTR_DATA attribute using the viGetAttributeString function. f 1.10 This version requires Igor Pro 6.20 or later. It is the first that supports IGOR64 on Macintosh. ” This version supports reading and writing 64-bit integer values using VISAReadBinary, VISAWriteBinary, VISAReadBinaryWave, andVISAWriteBinaryWave.  In this version, if you call VISARead with /T="" (no terminators), VISARead attempts to read the number of bytes specified by the /N flag in one call rather than reading one byte at a time. This is similar to the behavior of VISAReadBinary and provides faster speed. Q 1.11 Recompiled with XOP Toolkit 7.01 to support Igor Pro 8 on 64-bit Macintosh. H 1.20 Made VISA XOP thread safe but this has not been thoroughly tested. i$ 1.30 This version of the VISA XOP requires Igor Pro 8.00 or later because it supports long object names. Vџџџџgџџџџџџџџ$$т€Ђ VISA Procedure File џџџџџџџџџџџџџџDXThe VISA.ipf Igor procedure file defines in Igor many of the constants defined by the VISA library. You will need these constants when calling VISA XOP functions. For example, VISA.ipf defines the constant VI_ATTR_ASRL_BAUD which you would pass to the VISA XOP function viSetAttribute to set the baud rate of a serial port. $$т€Ђ VISA XOP Functions џџџџџџџџџџџџџџеXThe VISA XOP adds the following low-level functions to Igor. These functions provide direct access to VISA library functions. VISA library functions that are not supported by VISA XOP are also noted in this list. a$X(In addition to these low-level functions, VISA XOP also adds higher-level VISA XOP Operations.) Kџџџџ^џџџџџџџџResource Manager H$xviOpenDefaultRM Opens a session with the VISA default resource manager. џџџџџџџџџџџџ+$xviOpen Opens a session with an instrument. џџџџџџџџџџџџ8$xviFindRsrc Find what instruments are available for use. џџџџ џџџџџџџџ@$xviFindNext Used with viFindRsrc to find successive instruments. џџџџ џџџџџџџџ6xviParseRsrc viParseRsrc is not supported by VISA XOP. :xviParseRsrcEx viParseRsrcEx is not supported by VISA XOP. Resource Template @$xviClose Closes a session opened with viOpenDefaultRM or viOpen. џџџџџџџџџџџџK$xviSetAttribute Sets a numeric attribute of a VISA interface or instrument. џџџџџџџџџџџџP$xviSetAttributeString Sets a string attribute of a VISA interface or instrument. џџџџџџџџџџџџK$xviGetAttribute Gets a numeric attribute of a VISA interface or instrument. џџџџџџџџџџџџP$xviGetAttributeString Gets a string attribute of a VISA interface or instrument. џџџџџџџџџџџџA$xviStatusDesc Returns a string description of a VISA status code. џџџџ џџџџџџџџ,$xviTerminate Terminates an asynchronous job. џџџџ џџџџџџџџ$xviLock Locks a resource. џџџџџџџџџџџџ$xviUnlock Unlocks resource. џџџџџџџџџџџџ*$xviEnableEvent Enables event notification. џџџџ џџџџџџџџ,$xviDisableEvent Disables event notification. џџџџџџџџџџџџ.$xviDiscardEvents Discards event notifications. џџџџџџџџџџџџ1$xviWaitOnEvent Waits until an event has occurred. џџџџ џџџџџџџџ@xviInstallHandler viInstallHandler is not supported by VISA XOP. DxviUninstallHandler viUninstallHandler is not supported by VISA XOP. Basic I/O *$xviRead Reads data into a string variable. џџџџџџџџџџџџ6xviReadAsync viReadAsync is not supported by VISA XOP. 8xviReadToFile viReadToFile is not supported by VISA XOP. ,$xviWrite Writes data from a string variable. џџџџџџџџџџџџ8xviWriteAsync viWriteAsync is not supported by VISA XOP. >xviWriteFromFile viWriteFromFile is not supported by VISA XOP. ,$xviAssertTrigger Generates a trigger signal. џџџџџџџџџџџџ-$xviReadSTB Reads an instrument's status byte. џџџџ џџџџџџџџ-$xviClear Performs a "device-clear" operation. џџџџџџџџџџџџFormatted and Buffered I/O 0xviSetBuf viSetBuf is not supported by VISA XOP. .xviFlush viFlush is not supported by VISA XOP. 4xviBufWrite viBufWrite is not supported by VISA XOP. 2xviBufRead viBufRead is not supported by VISA XOP. 0xviPrintf viPrintf is not supported by VISA XOP. 2xviVPrintf viVPrintf is not supported by VISA XOP. 2xviSPrintf viSPrintf is not supported by VISA XOP. 4xviVSPrintf viVSPrintf is not supported by VISA XOP. .xviScanf viScanf is not supported by VISA XOP. 0xviVScanf viVScanf is not supported by VISA XOP. 0xviSScanf viSScanf is not supported by VISA XOP. 2xviVSScanf viVSScanf is not supported by VISA XOP. 0xviQueryf viQueryf is not supported by VISA XOP. 2xviVQueryf viVQueryf is not supported by VISA XOP. Memory I/O I$xviIn8 Reads a one-byte value from a VXI board. Not supported by TekVISA. џџџџџџџџџџџџI$xviOut8 Writes a one-byte value to a VXI board. Not supported by TekVISA. џџџџџџџџџџџџJ$xviIn16 Reads a two-byte value from a VXI board. Not supported by TekVISA. џџџџџџџџџџџџJ$xviOut16 Writes a two-byte value to a VXI board. Not supported by TekVISA. џџџџџџџџџџџџK$xviIn32 Reads a four-byte value from a VXI board. Not supported by TekVISA. џџџџџџџџџџџџK$xviOut32 Writes a four-byte value to a VXI board. Not supported by TekVISA. џџџџџџџџџџџџU$xviMoveIn8 Reads multiple one-byte values from a VXI board. Not supported by TekVISA. џџџџ џџџџџџџџU$xviMoveOut8 Writes multiple one-byte values to a VXI board. Not supported by TekVISA. џџџџ џџџџџџџџV$xviMoveIn16 Reads multiple two-byte values from a VXI board. Not supported by TekVISA. џџџџ џџџџџџџџV$xviMoveOut16 Writes multiple two-byte values to a VXI board. Not supported by TekVISA. џџџџ џџџџџџџџW$xviMoveIn32 Reads multiple four-byte values from a VXI board. Not supported by TekVISA. џџџџ џџџџџџџџW$xviMoveOut32 Writes multiple four-byte values to a VXI board. Not supported by TekVISA. џџџџ џџџџџџџџ6xviMoveAsync viMoveAsync is not supported by VISA XOP. R$xviMapAddress Maps VXI register space into memory space. Not supported by TekVISA. џџџџ џџџџџџџџb$xviUnmapAddress Frees up memory space previously mapped by viMapAddress. Not supported by TekVISA. џџџџџџџџџџџџf$xviPeek8 Reads a one-byte value using an address obtained from viMapAddress. Not supported by TekVISA. џџџџџџџџџџџџg$xviPoke8 Writes a one-byte value using an address obtained from viMapAddress. Not supported by TekVISA. џџџџџџџџџџџџg$xviPeek16 Reads a two-byte value using an address obtained from viMapAddress. Not supported by TekVISA. џџџџџџџџџџџџh$xviPoke16 Writes a two-byte value using an address obtained from viMapAddress. Not supported by TekVISA. џџџџџџџџџџџџh$xviPeek32 Reads a four-byte value using an address obtained from viMapAddress. Not supported by TekVISA. џџџџџџџџџџџџi$xviPoke32 Writes a four-byte value using an address obtained from viMapAddress. Not supported by TekVISA. џџџџџџџџџџџџShared Memory F$xviMemAlloc Allocates memory on a VXI board. Not supported by TekVISA. џџџџ џџџџџџџџA$xviMemFree Frees memory on a VXI board. Not supported by TekVISA. џџџџ џџџџџџџџInterface Specific S$xviGpibControlREN Controls the GPIB remote enable signal. Not supported by TekVISA. џџџџџџџџџџџџO$xviGpibControlATN Controls the GPIB attention signal. Not supported by TekVISA. џџџџџџџџџџџџO$xviGpibSendIFC Sends the GPIB interface-clear signal. Not supported by TekVISA. џџџџ џџџџџџџџ]$xviGpibCommand Sends controller GPIB command bytes to the GPIB bus. Not supported by TekVISA. џџџџ џџџџџџџџW$xviGpibPassControl Passes GPIB control to another controller. Not supported by TekVISA. џџџџџџџџџџџџV$xviVxiCommandQuery Sends a command or query to a VXI device. Not supported by TekVISA. џџџџџџџџџџџџL$xviAssertUtilSignal Controls a utility bus signal. Not supported by TekVISA. џџџџџџџџџџџџK$xviAssertIntrSignal Controls an interrupt signal. Not supported by TekVISA. џџџџџџџџџџџџW$xviMapTrigger Maps a trigger source to a trigger destination. Not supported by TekVISA. џџџџ џџџџџџџџB$xviUnmapTrigger Unmaps a trigger signal. Not supported by TekVISA. џџџџџџџџџџџџF$xviUsbControlOut Sends data to a USB device. Not supported by TekVISA. џџџџџџџџџџџџG$xviUsbControlIn Reads data from a USB device. Not supported by TekVISA. џџџџџџџџџџџџ 0Errors and Status Codes From VISA XOP Functions •XWhen you call a VISA function from Igor, you are calling an Igor function added by the VISA XOP. The VISA XOP in turn calls a VISA library function. бXEach VISA library function returns a status code which indicates if the function succeeded or failed. Status codes greater than or equal to zero indicate success. Status codes less than zero indicate failure. ц$XEach VISA XOP function calls one VISA library function. The function result returned by the Igor VISA function is the status code returned by the VISA library function. In the event of a failure (status code less than zero) you can get a human-readable message by calling viStatusDesc. See the example under viStatusDesc. There is one special status code. -1 indicates that an error occurred in the VISA XOP function before it made any calls to the corresponding VISA library function. 4џџџџ@џџџџџџџџ1$XIn addition to the status code which is returned to your user-defined Igor function, each VISA XOP function returns an error code to Igor. Your user-defined Igor function does not see this error code. If the error code is non-zero, Igor aborts function execution and reports the error to the user. VISA XOP functions do not return errors to Igor to indicate a failure status returned by a VISA library function. They return errors to Igor only to indicate programming errors such as "out-of-memory" or passing a null (uninitialized) string variable as a parameter. You can test for Igor errors by calling GetRTError, but in general this is not necessary because they are programming errors that need to be fixed by the Igor programmer (you), not VISA library failures that need to be gracefully handled by your code. ]џџџџgџџџџџџџџ_$XSee the example under viFindRsrc for an example of handling VISA library failure status codes. џџџџ џџџџџџџџ!VISA XOP Functions Documentation G`Here is documentation for each of the functions added by the VISA XOP. 6viOpenDefaultRM(session) џџџџџџџџџџџџџџџџџџO$Opens the VISA default resource manager and returns a session ID via session . EџџџџџџLџџџџџџџџ+The function result is a VISA status code. (Parameters w$session is an output. On return it contains a session ID which can be passed to viOpen to open an instrument session. џџџџџџџџџџџџџџ(Details WYou must open a default resource manager session before doing anything else with VISA. 8See the VISA library documentation for further details. $See viOpen for an example. џџџџ џџџџџџџџ (See Also 6viOpen, viClose џџџџџџџџџџџџџџџџ CЦviOpen(session , resourceName , accessMode , openTimeout , instr ) џџџџџџџџџџџџџџџџџџџџџџџџџџџџџџ џџџџџџ*џџџџџџ-џџџџџџ8џџџџџџ;џџџџџџ@џџџџџџ?Opens a session with the instrument specified by resourceName. +The function result is a VISA status code. (Parameters 1$session is a value returned by viOpenDefaultRM. џџџџџџџџџџџџџџ$instr is an output. On return it contains an instrument session ID which can be passed to viRead, viWrite, viClose and so on. џџџџџџџџџџџџџџ(Details 8See the VISA library documentation for further details. (Examples @Variable defaultRM, instr (@String resourceName = "GPIB0::1::INSTR" @viOpenDefaultRM(defaultRM) -@viOpen(defaultRM, resourceName, 0, 0, instr) @// Do something with instr @viClose(instr) @viClose(defaultRM) H (See Also 6viOpenDefaultRM, viClose џџџџџџџџџџџџџџџџ <ЦviFindRsrc(session , expr , findList , retcnt , instrDesc ) џџџџџџ џџџџџџџџџџџџџџџџџџџџџџџџџџџџџџ$џџџџџџ'џџџџџџ-џџџџџџ0џџџџџџ9џџџџџџX$Finds the first resource matching expr and sets up for subsequent calls to viFindNext. "џџџџџџ&џџџџџџџџ+The function result is a VISA status code. (Parameters 1$session is a value returned by viOpenDefaultRM. џџџџџџџџџџџџџџч$expr is is a regular expression indicating what type of resources you want to find. See National Instruments' documentation for viFindRsrc for the regular expression rules. They are different from Igor's regular expression rules. џџџџџџџџџџџџџџH$findList is an output. It is used with subsequent calls to viFindNext. џџџџџџџџџџџџџџyHretcnt is the number of resources that match expr and is used to control the number of subsequent calls to viFindNext. џџџџџџџџџџџџџџ.џџџџџџ2џџџџџџџџh$instrDesc is an output. It is the description of the first resource found and can be passed to viOpen. џџџџџџ џџџџџџџџ(Details ХHUnlike calling viFindRsrc from C, when calling from Igor, you can not pass NULL for the findList parameter. Thus you must call viClose on the VISA object whose reference is returned in findList . Xџџџџџџ`џџџџџџџџКџџџџџџТџџџџџџџџmThe value returned in findList is a VISA object and must be passed to viClose when you are finished with it. 8See the VISA library documentation for further details. (Examples @Function Example() *@ Variable defaultRM=0, findList=0, retcnt @ String expr, instrDesc @ Variable i, status=0 @ :@ do // Just a structure to break out of in case of error :@ expr = "ASRL?*INSTR" // Match all serial instruments. &@ status = viOpenDefaultRM(defaultRM) @ if (status < 0) @ break @ endif @ D@ status = viFindRsrc(defaultRM, expr, findList, retcnt, instrDesc) @ if (status < 0) @ break @ endif @ if (retcnt <= 0) @ break @ endif @ @ i = 1 @ do .@ Printf "Instrument %d: %s\r", i, instrDesc @ @ i += 1 @ if (i > retcnt) @ break @ endif @ ,@ status = viFindNext(findList, instrDesc) @ if (status < 0) @ break @ endif @ while(1) @ while(0) @ @ if (status < 0) @ String errorDesc @ Variable viObject @ @ viObject = findList @ if (viObject == 0) @ viObject = defaultRM @ endif @ ,@ viStatusDesc(viObject, status, errorDesc) '@ Printf "VISA Error: %s\r", errorDesc @ endif @ @ if (findList != 0) @ viClose(findList) @ endif @ if (defaultRM != 0) @ viClose(defaultRM) @ endif @ @ return status @End @ (See Also $ZviOpenDefaultRM, viOpen, viFindNext џџџџџџџџџџџџџџџџџџџџџџџџџџџџ "ZviFindNext(findList , instrDesc ) џџџџџџ џџџџџџџџџџџџџџџџџџџџџџџџ@Finds the next resource. viFindNext is called after viFindRsrc. +The function result is a VISA status code. (Parameters 9$findList is an object reference returned by viFindRsrc. џџџџџџџџџџџџџџg$instrDesc is an output. It is the description of the next resource found and can be passed to viOpen. џџџџџџ џџџџџџџџ(Details 8See the VISA library documentation for further details. (Examples "$See the example under viFindRsrc. џџџџ џџџџџџџџ (See Also $ZviOpenDefaultRM, viOpen, viFindRsrc џџџџџџџџџџџџџџџџџџџџџџџџџџџџ 6viClose(session ) џџџџџџџџџџџџџџџџџџCloses a session. +The function result is a VISA status code. (Parameters ;$session is a value returned by viOpenDefaultRM or viOpen. џџџџџџџџџџџџџџ(Details 8See the VISA library documentation for further details. $See viOpen for an example. џџџџ џџџџџџџџ (See Also 6viOpenDefaultRM, viOpen џџџџџџџџџџџџџџџџ -~viSetAttribute(vi , attribute , attrState ) џџџџџџџџџџџџџџџџџџџџџџџџџџџџџџ џџџџџџ)џџџџџџJSets the value of a numeric attribute of a VISA interface or instrument . +The function result is a VISA status code. (Parameters 5$vi is a VISA object reference obtained from viOpen. џџџџџџџџџџџџџџT$attribute is an attribute constant as defined in the VISA.ipf Igor procedure file. џџџџџџ џџџџџџџџA$attrState is the new value to which the attribute is to be set. џџџџџџ џџџџџџџџ(Details $viSetAttribute works with numeric attributes only. It does not work with string attributes. For string attributes, use viSetAttributeString. wџџџџ‹џџџџџџџџзviSetAttribute does not support attributes of type ViAddr, ViBuf or ViAUInt8, or with any attributes not defined in VISA.h from VISA 3.0, or with any non-standard attributes such as VI_ATTR_PXI_* and VI_ATTR_USB_*. GSee the VISA library documentation for viSetAttribute further details. (Example &@Function VISASetAttrBaud(instr, baud) C@ Variable instr // An instrument referenced obtained from viOpen @ Variable baud @ @ Variable status 9@ status = viSetAttribute(instr, VI_ATTR_ASRL_BAUD, baud) @ return status @End @ (See Also -ZviOpen, viSetAttributeString, viGetAttribute џџџџџџџџџџџџџџџџџџџџџџџџџџџџ 6~viSetAttributeString(vi , attribute , attrStateStr ) џџџџџџџџџџџџџџџџџџџџџџџџ#џџџџџџ&џџџџџџ2џџџџџџISets the value of a string attribute of a VISA interface or instrument . +The function result is a VISA status code. (Parameters 5$vi is a VISA object reference obtained from viOpen. џџџџџџџџџџџџџџT$attribute is an attribute constant as defined in the VISA.ipf Igor procedure file. џџџџџџ џџџџџџџџD$attrStateStr is the new value to which the attribute is to be set. џџџџџџ џџџџџџџџ(Details ЃviSetAttributeString does not correspond to a VISA library function of the same name. It corresponds viSetStringAttribute for ViString and ViRsrc-type attributes. JAs of this writing, VISA defines no read/write attributes of these types.  $viSetAttributeString works with ViString and ViRsrc-type attributes only. It does not work with numeric attributes. For numeric attributes, use viSetAttribute. џџџџžџџџџџџџџнviSetAttributeString does not support attributes of type ViAddr, ViBuf or ViAUInt8, or with any attributes not defined in VISA.h from VISA 3.0, or with any non-standard attributes such as VI_ATTR_PXI_* and VI_ATTR_USB_*. GSee the VISA library documentation for viSetAttribute further details. @ (See Also -ZviOpen, viSetAttribute, viGetAttributeString џџџџџџџџџџџџџџџџџџџџџџџџџџџџ -~viGetAttribute(vi , attribute , attrState ) џџџџџџџџџџџџџџџџџџџџџџџџџџџџџџ џџџџџџ)џџџџџџj$Gets the value of a numeric attribute of a VISA interface or instrument which is returned via attrState . ^џџџџџџgџџџџџџџџ+The function result is a VISA status code. (Parameters 5$vi is a VISA object reference obtained from viOpen. џџџџџџџџџџџџџџT$attribute is an attribute constant as defined in the VISA.ipf Igor procedure file. џџџџџџ џџџџџџџџK$attrState is an output. On return it contains the value of the attribute. џџџџџџ џџџџџџџџ(Details $viGetAttribute works with numeric attributes only. It does not work with string attributes. For string attributes, use viGetAttributeString. wџџџџ‹џџџџџџџџзviGetAttribute does not support attributes of type ViAddr, ViBuf or ViAUInt8, or with any attributes not defined in VISA.h from VISA 3.0, or with any non-standard attributes such as VI_ATTR_PXI_* and VI_ATTR_USB_*. GSee the VISA library documentation for viGetAttribute further details. (Example &@Function VISAGetAttrBaud(instr, baud) C@ Variable instr // An instrument referenced obtained from viOpen @ Variable &baud // Output @ @ Variable status 9@ status = viGetAttribute(instr, VI_ATTR_ASRL_BAUD, baud) @ return status @End @ (See Also -ZviOpen, viGetAttributeString, viSetAttribute џџџџџџџџџџџџџџџџџџџџџџџџџџџџ 6~viGetAttributeString(vi , attribute , attrStateStr ) џџџџџџџџџџџџџџџџџџџџџџџџ#џџџџџџ&џџџџџџ2џџџџџџl$Gets the value of a string attribute of a VISA interface or instrument which is returned via attrStateStr . ]џџџџџџiџџџџџџџџ+The function result is a VISA status code. (Parameters 5$vi is a VISA object reference obtained from viOpen. џџџџџџџџџџџџџџT$attribute is an attribute constant as defined in the VISA.ipf Igor procedure file. џџџџџџ џџџџџџџџN$attrStateStr is an output. On return it contains the value of the attribute. џџџџџџ џџџџџџџџ(Details ЃviGetAttributeString does not correspond to a VISA library function of the same name. It corresponds viGetStringAttribute for ViString and ViRsrc-type attributes.  $viGetAttributeString works with ViString and ViRsrc-type attributes only. It does not work with numeric attributes. For numeric attributes, use viGetAttribute. џџџџžџџџџџџџџнviGetAttributeString does not support attributes of type ViAddr, ViBuf or ViAUInt8, or with any attributes not defined in VISA.h from VISA 3.0, or with any non-standard attributes such as VI_ATTR_PXI_* and VI_ATTR_USB_*. (Example +@Function VISAGetAttrRsrcClass(instr, name) C@ Variable instr // An instrument referenced obtained from viOpen @ String &name // Output @ @ Variable status ?@ status = viGetAttributeString(instr, VI_ATTR_RSRC_NAME, name) @ return status @End @ (See Also -ZviOpen, viGetAttributeString, viSetAttribute џџџџџџџџџџџџџџџџџџџџџџџџџџџџ "~viStatusDesc(vi , status , desc ) џџџџџџ џџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџ>$Returns via desc a string description of a VISA status code. џџџџџџџџџџџџџџ+The function result is a VISA status code. (Parameters 6$vi is a value returned by viOpenDefaultRM or viOpen. џџџџџџџџџџџџџџ7$status is a result returned by any VISA library call. џџџџџџџџџџџџџџT$desc is a string variable. On return it contains a description of the status code. џџџџџџџџџџџџџџ(Details 8See the VISA library documentation for further details. (Example >@// ReportVISAError is defined in the VISA.ipf procedure file. 0@Function ReportVISAError(name, session, status) I@ String name // VISA function name, e.g., viRead or other identifier 8@ Variable session // Session ID obtained from viOpen 5@ Variable status // Status code from VISA library @ @ String desc @ %@ viStatusDesc(session, status, desc) 2@ Printf "%s error (%x): %s\r", name, status, desc @ Beep @End @ R@// This function illustrates the use of ReportVISAError which calls viStatusDesc. @Function Test() @ Variable status @ Variable defaultRM )@ String resourceName = "GPIB0::1::INSTR" @ Variable instr = 0 @ %@ status = viOpenDefaultRM(defaultRM) @ if (status < 0) 4@ ReportVISAError("viOpenDefaultRM", instr, status) @ return status // Failure @ endif @ 7@ status = viOpen(defaultRM, resourceName, 0, 0, instr) @ if (status < 0) @ viClose(defaultRM) +@ ReportVISAError("viOpen", instr, status) @ return status // Failure @ endif @ @ // Do something with instr @ @ viClose(instr) @ viClose(defaultRM) @ return 0 // Success @End H (See Also 6viOpenDefaultRM, viOpen џџџџџџџџџџџџџџџџ "~viTerminate(vi , degree , jobId ) џџџџџџ џџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџ&Requests termination of an operation. +The function result is a VISA status code. (Parameters 6$vi is a value returned by viOpenDefaultRM or viOpen. џџџџџџџџџџџџџџ$degree must always be zero. џџџџџџџџџџџџџџ-$jobId specifies the operation to terminate. џџџџџџџџџџџџџџ(Details 8See the VISA library documentation for further details. This function is untested.  BЦviLock(vi , lockType , timeout , requestedKeyStr , accessKeyStr ) џџџџџџџџџџџџ џџџџџџ џџџџџџџџџџџџџџџџџџџџџџџџ!џџџџџџ0џџџџџџ3џџџџџџ?џџџџџџ!Sets access mode for a resource. +The function result is a VISA status code. (Parameters #$vi is a value returned by viOpen. џџџџџџџџџџџџџџ2$lockType is VI_EXCLUSIVE_LOCK or VI_SHARED_LOCK. џџџџџџџџџџџџџџM$timeout specifies the time in milliseconds to wait for resource to be free. џџџџџџџџџџџџџџf$requestedKeyStr is the key to use for a shared lock. It is ignored if lockType is VI_EXCLUSIVE_LOCK. џџџџџџџџџџџџџџN$accessKeyStr is an output. It is set to "" if lockType is VI_EXCLUSIVE_LOCK. џџџџџџ џџџџџџџџ(Details 8See the VISA library documentation for further details. This function is untested. (See Also 6viOpen, viUnlock џџџџџџџџџџџџџџџџ 6viUnlock(vi ) џџџџџџ џџџџџџ џџџџџџReleases a lock. +The function result is a VISA status code. (Parameters #$vi is a value returned by viOpen. џџџџџџџџџџџџџџ(Details 8See the VISA library documentation for further details. This function is untested. (See Also 6viOpen, viLock џџџџџџџџџџџџџџџџ 4ЂviEnableEvent(vi , eventType , mechanism, context ) џџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџ(џџџџџџ*џџџџџџ1џџџџџџGTells the VISA library that you are interested in the specified event. @$Later you would use viWaitOnEvent to see if the event occurred. џџџџ!џџџџџџџџ+The function result is a VISA status code. (Parameters 0$vi is a session identifier returned by viOpen. џџџџџџџџџџџџџџ_$eventType is one of the VI_EVENT constants defined in VISA.h (for C) and VISA.ipf (for Igor). џџџџџџ џџџџџџџџf$mechanism specifies how the event is to be handled. With VISA XOP, the only legal value is VI_QUEUE. џџџџџџ џџџџџџџџ$context must always be zero. џџџџџџџџџџџџџџ(Details 8See the VISA library documentation for further details. (See Also 7~viOpen, viDisableEvent, viDiscardEvents, viWaitOnEvent џџџџџџџџџџџџџџџџџџџџџџџџџџџџ'џџџџџџџџ)џџџџ 5ЂviDisableEvent(vi , eventType , mechanism, context ) џџџџџџџџџџџџџџџџџџџџџџџџџџџџџџ џџџџџџ)џџџџџџ+џџџџџџ2џџџџџџKTells the VISA library that you are not interested in the specified event. +The function result is a VISA status code. (Parameters 0$vi is a session identifier returned by viOpen. џџџџџџџџџџџџџџ_$eventType is one of the VI_EVENT constants defined in VISA.h (for C) and VISA.ipf (for Igor). џџџџџџ џџџџџџџџf$mechanism specifies how the event is to be handled. With VISA XOP, the only legal value is VI_QUEUE. џџџџџџ џџџџџџџџ$context must always be zero. џџџџџџџџџџџџџџ(Details 8See the VISA library documentation for further details. (See Also 6~viOpen, viEnableEvent, viDiscardEvents, viWaitOnEvent џџџџџџџџџџџџџџџџџџџџџџџџџџџџ&џџџџџџџџ(џџџџ 6ЂviDiscardEvents(vi , eventType , mechanism, context ) џџџџџџџџџџџџџџџџџџџџџџџџџџџџџџ!џџџџџџ*џџџџџџ,џџџџџџ3џџџџџџ.Discards specified events in the event queue. +The function result is a VISA status code. (Parameters 0$vi is a session identifier returned by viOpen. џџџџџџџџџџџџџџ_$eventType is one of the VI_EVENT constants defined in VISA.h (for C) and VISA.ipf (for Igor). џџџџџџ џџџџџџџџf$mechanism specifies how the event is to be handled. With VISA XOP, the only legal value is VI_QUEUE. џџџџџџ џџџџџџџџ$context must always be zero. џџџџџџџџџџџџџџ(Details 8See the VISA library documentation for further details. (See Also 5~viOpen, viEnableEvent, viDisableEvent, viWaitOnEvent џџџџџџџџџџџџџџџџџџџџџџџџџџџџ%џџџџџџџџ'џџџџ HЦviWaitOnEvent(vi , inEventType , timeout , outEventType , outContext ) џџџџџџџџџџџџџџџџџџџџџџџџџџџџџџ!џџџџџџ(џџџџџџ+џџџџџџ7џџџџџџ:џџџџџџDџџџџџџAWaits till the specified event occurs or until a timeout occurs. +The function result is a VISA status code. (Parameters 0$vi is a session identifier returned by viOpen. џџџџџџџџџџџџџџa$inEventType is one of the VI_EVENT constants defined in VISA.h (for C) and VISA.ipf (for Igor). џџџџџџ џџџџџџџџM$timeout is the maximum time in milliseconds to wait for the event to occur. џџџџџџџџџџџџџџŸ$outEventType is an output and returns the type of event that occurred. It is one of the VI_EVENT constants defined in VISA.h (for C) and VISA.ipf (for Igor). џџџџџџ џџџџџџџџГHoutContext is an output and identifies a unique occurrence of an event. If viWaitOnEvent succeeds then you must call viClose on outContext when you are finished with the event. џџџџџџ џџџџџџџџџџџџџџ‹џџџџџџџџ(Details 8See the VISA library documentation for further details. (See Also 7~viOpen, viEnableEvent, viDisableEvent, viDiscardEvents џџџџџџџџџџџџџџџџџџџџџџџџџџџџ%џџџџџџџџ'џџџџ "ЂviRead(vi , buf , cnt , retCnt ) џџџџџџџџџџџџ џџџџџџ џџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџ<Reads data from an instrument into an Igor string variable. EHFor reading into a numeric wave, use VISAReadWave or VISAReadBinary. %џџџџ1џџџџџџџџ5џџџџCџџџџџџџџ+The function result is a VISA status code. (Parameters 0$vi is a session identifier returned by viOpen. џџџџџџџџџџџџџџJ$buf is the string variable to receive the data read from the instrument. џџџџџџџџџџџџџџ%$cnt is the number of bytes to read. џџџџџџџџџџџџџџD$retCnt is an output and returns the number of bytes actually read. џџџџџџџџџџџџџџ(Details С$When reading binary data into a string, the VISA library may terminate the read prematurely unless you set the appropriate attributes. See VISA Library Terminator Character Issues for details. ‹џџџџГџџџџџџџџ8See the VISA library documentation for further details. (See Also 8ЂviOpen, viWrite, VISARead, VISAReadWave, VISAReadBinary џџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџ'џџџџџџџџ)џџџџ #ЂviWrite(vi , buf , cnt , retCnt ) џџџџџџџџџџџџ џџџџџџ џџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџ;Writes data from an Igor string variable to an instrument. GHFor reading into a numeric wave, use VISAWriteWave or VISAWriteBinary. %џџџџ2џџџџџџџџ6џџџџEџџџџџџџџ+The function result is a VISA status code. (Parameters 0$vi is a session identifier returned by viOpen. џџџџџџџџџџџџџџ/$buf is the string to write to the instrument. џџџџџџџџџџџџџџm$cnt is the number of bytes to write. It must not be larger than the number of bytes in the string variable. џџџџџџџџџџџџџџG$retCnt is an output and returns the number of bytes actually written. џџџџџџџџџџџџџџ(Details 8See the VISA library documentation for further details. (See Also :ЂviOpen, viRead, VISAWrite, VISAWriteWave, VISAWriteBinary џџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџ(џџџџџџџџ*џџџџ !ZviAssertTrigger(vi , protocol ) џџџџџџџџџџџџџџџџџџџџџџџџџџџџџџ(Asserts a hardware or software trigger. +The function result is a VISA status code. (Parameters 0$vi is a session identifier returned by viOpen. џџџџџџџџџџџџџџ?$protocol is one of the VI_TRIG constants defined in VISA.ipf. џџџџџџџџџџџџџџ(Details 8See the VISA library documentation for further details. (See Also ZviOpen, viRead, viWrite џџџџџџџџџџџџџџџџџџџџџџџџџџџџ ZviReadSTB(vi , status ) џџџџџџ џџџџџџ џџџџџџџџџџџџџџџџџџ#Reads an instrument's status byte. +The function result is a VISA status code. (Parameters 0$vi is a session identifier returned by viOpen. џџџџџџџџџџџџџџ?$status is an output and returns the instrument's status byte. џџџџџџџџџџџџџџ(Details 8See the VISA library documentation for further details. (See Also ZviOpen, viRead, viWrite џџџџџџџџџџџџџџџџџџџџџџџџџџџџ 6viClear(vi ) џџџџџџџџџџџџ џџџџџџbPerforms a "device-clear" operation on the instrument. What this means depends on the instrument. +The function result is a VISA status code. (Parameters 0$vi is a session identifier returned by viOpen. џџџџџџџџџџџџџџ(Details 8See the VISA library documentation for further details. (See Also ZviOpen, viRead, viWrite џџџџџџџџџџџџџџџџџџџџџџџџџџџџ "ЂviIn8(vi , space , offset , val ) џџџџџџџџџџџџџџџџџџ џџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџCReads a one-byte value from a VXI board. Not supported by TekVISA. +The function result is a VISA status code. (Parameters 0$vi is a session identifier returned by viOpen. џџџџџџџџџџџџџџ6$space is VI_A16_SPACE, VI_A24_SPACE or VI_A32_SPACE. џџџџџџџџџџџџџџ/$offset is the offset of the register to read. џџџџџџџџџџџџџџ=$val is a variable to receive the value read from the board. џџџџџџџџџџџџџџ(Details 8See the VISA library documentation for further details. This function is untested. (See Also &~viOpen, viOut8, viMoveIn8, viMoveOut8 џџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџ #ЂviOut8(vi , space , offset , val ) џџџџџџџџџџџџ џџџџџџ џџџџџџџџџџџџџџџџџџџџџџџџџџџџџџ џџџџџџBWrites a one-byte value to a VXI board. Not supported by TekVISA. +The function result is a VISA status code. (Parameters 0$vi is a session identifier returned by viOpen. џџџџџџџџџџџџџџ6$space is VI_A16_SPACE, VI_A24_SPACE or VI_A32_SPACE. џџџџџџџџџџџџџџ/$offset is the offset of the register to read. џџџџџџџџџџџџџџ'$val is a value to write to the board. џџџџџџџџџџџџџџ(Details 8See the VISA library documentation for further details. This function is untested. (See Also %~viOpen, viIn8, viMoveIn8, viMoveOut8 џџџџџџџџџџџџџџџџ џџџџџџџџџџџџџџџџџџџџџџџџ #ЂviIn16(vi , space , offset , val ) џџџџџџџџџџџџ џџџџџџ џџџџџџџџџџџџџџџџџџџџџџџџџџџџџџ џџџџџџCReads a two-byte value from a VXI board. Not supported by TekVISA. +The function result is a VISA status code. (Parameters 0$vi is a session identifier returned by viOpen. џџџџџџџџџџџџџџ6$space is VI_A16_SPACE, VI_A24_SPACE or VI_A32_SPACE. џџџџџџџџџџџџџџ/$offset is the offset of the register to read. џџџџџџџџџџџџџџ=$val is a variable to receive the value read from the board. џџџџџџџџџџџџџџ(Details 8See the VISA library documentation for further details. This function is untested. (See Also )~viOpen, viOut16, viMoveIn16, viMoveOut16 џџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџ $ЂviOut16(vi , space , offset , val ) џџџџџџџџџџџџ џџџџџџ џџџџџџџџџџџџџџџџџџџџџџџџџџџџџџ!џџџџџџBWrites a two-byte value to a VXI board. Not supported by TekVISA. +The function result is a VISA status code. (Parameters 0$vi is a session identifier returned by viOpen. џџџџџџџџџџџџџџ6$space is VI_A16_SPACE, VI_A24_SPACE or VI_A32_SPACE. џџџџџџџџџџџџџџ/$offset is the offset of the register to read. џџџџџџџџџџџџџџ'$val is a value to write to the board. џџџџџџџџџџџџџџ(Details 8See the VISA library documentation for further details. This function is untested. (See Also (~viOpen, viIn16, viMoveIn16, viMoveOut16 џџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџ #ЂviIn32(vi , space , offset , val ) џџџџџџџџџџџџ џџџџџџ џџџџџџџџџџџџџџџџџџџџџџџџџџџџџџ џџџџџџDReads a four-byte value from a VXI board. Not supported by TekVISA. +The function result is a VISA status code. (Parameters 0$vi is a session identifier returned by viOpen. џџџџџџџџџџџџџџ6$space is VI_A16_SPACE, VI_A24_SPACE or VI_A32_SPACE. џџџџџџџџџџџџџџ/$offset is the offset of the register to read. џџџџџџџџџџџџџџ=$val is a variable to receive the value read from the board. џџџџџџџџџџџџџџ(Details 8See the VISA library documentation for further details. This function is untested. (See Also )~viOpen, viOut32, viMoveIn32, viMoveOut32 џџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџ $ЂviOut32(vi , space , offset , val ) џџџџџџџџџџџџ џџџџџџ џџџџџџџџџџџџџџџџџџџџџџџџџџџџџџ!џџџџџџCWrites a four-byte value to a VXI board. Not supported by TekVISA. +The function result is a VISA status code. (Parameters 0$vi is a session identifier returned by viOpen. џџџџџџџџџџџџџџ6$space is VI_A16_SPACE, VI_A24_SPACE or VI_A32_SPACE. џџџџџџџџџџџџџџ/$offset is the offset of the register to read. џџџџџџџџџџџџџџ'$val is a value to write to the board. џџџџџџџџџџџџџџ(Details 8See the VISA library documentation for further details. This function is untested. (See Also (~viOpen, viIn32, viMoveIn32, viMoveOut32 џџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџ /ЦviMoveIn8(vi , space , offset , length , buf ) џџџџџџ џџџџџџ џџџџџџџџџџџџџџџџџџџџџџџџџџџџџџ џџџџџџ&џџџџџџ)џџџџџџ,џџџџџџKReads multiple one-byte values from a VXI board. Not supported by TekVISA. +The function result is a VISA status code. (Parameters 0$vi is a session identifier returned by viOpen. џџџџџџџџџџџџџџ6$space is VI_A16_SPACE, VI_A24_SPACE or VI_A32_SPACE. џџџџџџџџџџџџџџ/$offset is the offset of the register to read. џџџџџџџџџџџџџџ2$length is the number of one-byte values to read. џџџџџџџџџџџџџџЃHbuf is a wave to receive the values read from the board. The wave must be a signed or unsigned byte (8-bit integer) wave and must be at least as long as length . џџџџџџџџџџџџџџšџџџџџџ џџџџџџџџ(Details 8See the VISA library documentation for further details. This function is untested. (See Also "~viOpen, viIn8, viOut8, viMoveOut8 џџџџџџџџџџџџџџџџ џџџџџџџџџџџџџџџџџџџџџџџџ 0ЦviMoveOut8(vi , space , offset , length , buf ) џџџџџџ џџџџџџ џџџџџџџџџџџџџџџџџџџџџџџџџџџџџџ!џџџџџџ'џџџџџџ*џџџџџџ-џџџџџџJWrites multiple one-byte values to a VXI board. Not supported by TekVISA. +The function result is a VISA status code. (Parameters 0$vi is a session identifier returned by viOpen. џџџџџџџџџџџџџџ6$space is VI_A16_SPACE, VI_A24_SPACE or VI_A32_SPACE. џџџџџџџџџџџџџџ/$offset is the offset of the register to read. џџџџџџџџџџџџџџ3$length is the number of one-byte values to write. џџџџџџџџџџџџџџЂHbuf is a wave containing the values write to the board. The wave must be a signed or unsigned byte (8-bit integer) wave and must be at least as long as length . џџџџџџџџџџџџџџ™џџџџџџŸџџџџџџџџ(Details 8See the VISA library documentation for further details. This function is untested. (See Also !~viOpen, viIn8, viOut8, viMoveIn8 џџџџџџџџџџџџџџџџ џџџџџџџџџџџџџџџџџџџџџџџџ 0ЦviMoveIn16(vi , space , offset , length , buf ) џџџџџџ џџџџџџ џџџџџџџџџџџџџџџџџџџџџџџџџџџџџџ!џџџџџџ'џџџџџџ*џџџџџџ-џџџџџџKReads multiple two-byte values from a VXI board. Not supported by TekVISA. +The function result is a VISA status code. (Parameters 0$vi is a session identifier returned by viOpen. џџџџџџџџџџџџџџ6$space is VI_A16_SPACE, VI_A24_SPACE or VI_A32_SPACE. џџџџџџџџџџџџџџ/$offset is the offset of the register to read. џџџџџџџџџџџџџџ2$length is the number of two-byte values to read. џџџџџџџџџџџџџџЅHbuf is a wave to receive the values read from the board. The wave must be a signed or unsigned short (16-bit integer) wave and must be at least as long as length . џџџџџџџџџџџџџџœџџџџџџЂџџџџџџџџ(Details 8See the VISA library documentation for further details. This function is untested. (See Also %~viOpen, viIn16, viOut16, viMoveOut16 џџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџ 1ЦviMoveOut16(vi , space , offset , length , buf ) џџџџџџ џџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџ"џџџџџџ(џџџџџџ+џџџџџџ.џџџџџџJWrites multiple two-byte values to a VXI board. Not supported by TekVISA. +The function result is a VISA status code. (Parameters 0$vi is a session identifier returned by viOpen. џџџџџџџџџџџџџџ6$space is VI_A16_SPACE, VI_A24_SPACE or VI_A32_SPACE. џџџџџџџџџџџџџџ/$offset is the offset of the register to read. џџџџџџџџџџџџџџ3$length is the number of two-byte values to write. џџџџџџџџџџџџџџЄHbuf is a wave containing the values write to the board. The wave must be a signed or unsigned short (16-bit integer) wave and must be at least as long as length . џџџџџџџџџџџџџџ›џџџџџџЁџџџџџџџџ(Details 8See the VISA library documentation for further details. This function is untested. (See Also $~viOpen, viIn16, viOut16, viMoveIn16 џџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџ 0ЦviMoveIn32(vi , space , offset, length , buf ) џџџџџџ џџџџџџ џџџџџџџџџџџџџџџџџџџџџџџџџџџџџџ џџџџџџ&џџџџџџ*џџџџџџ-џџџџџџLReads multiple four-byte values from a VXI board. Not supported by TekVISA. +The function result is a VISA status code. (Parameters 0$vi is a session identifier returned by viOpen. џџџџџџџџџџџџџџ6$space is VI_A16_SPACE, VI_A24_SPACE or VI_A32_SPACE. џџџџџџџџџџџџџџ/$offset is the offset of the register to read. џџџџџџџџџџџџџџ3$length is the number of four-byte values to read. џџџџџџџџџџџџџџŸHbuf is a wave to receive the values read from the board. The wave must be a signed or unsigned long (32-bit integer) and must be at least as long as length . џџџџџџџџџџџџџџ–џџџџџџœџџџџџџџџ(Details 8See the VISA library documentation for further details. This function is untested. (See Also %~viOpen, viIn32, viOut32, viMoveOut32 џџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџ 1ЦviMoveOut32(vi , space , offset, length , buf ) џџџџџџ џџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџ!џџџџџџ'џџџџџџ+џџџџџџ.џџџџџџKWrites multiple four-byte values to a VXI board. Not supported by TekVISA. +The function result is a VISA status code. (Parameters 0$vi is a session identifier returned by viOpen. џџџџџџџџџџџџџџ6$space is VI_A16_SPACE, VI_A24_SPACE or VI_A32_SPACE. џџџџџџџџџџџџџџ/$offset is the offset of the register to read. џџџџџџџџџџџџџџ4$length is the number of four-byte values to write. џџџџџџџџџџџџџџЃHbuf is a wave containing the values write to the board. The wave must be a signed or unsigned long (32-bit integer) wave and must be at least as long as length . џџџџџџџџџџџџџџšџџџџџџ џџџџџџџџ(Details 8See the VISA library documentation for further details. This function is untested. (See Also $~viOpen, viIn32, viOut32, viMoveIn32 џџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџ SviMapAddress(vi , mapSpace , mapOffset , mapSize , access , suggested , address ) џџџџџџ џџџџџџџџџџџџџџџџџџџџџџџџџџџџџџ&џџџџџџ)џџџџџџ0џџџџџџ4џџџџџџ:џџџџџџ=џџџџџџFџџџџџџIџџџџџџPџџџџџџEMaps VXI register space into memory space. Not supported by TekVISA. +This function is for expert VXI bus users. +The function result is a VISA status code. (Parameters 0$vi is a session identifier returned by viOpen. џџџџџџџџџџџџџџO$mapSpace is VI_A16_SPACE, VI_A24_SPACE or VI_A32_SPACE (defined in VISA.ipf). џџџџџџџџџџџџџџ/$mapSize specifies the number of bytes to map. џџџџџџџџџџџџџџ$access must always be zero. џџџџџџџџџџџџџџ5$suggested is a suggested memory address or VI_NULL. џџџџџџ џџџџџџџџp$address is an output and specifies the mapped address. This is passed to one of the viPeek or viPoke routines. џџџџџџџџџџџџџџ(Details 8See the VISA library documentation for further details. This function is untested. (See Also QviOpen, viUnmapAddress, viPeek8, viPoke8, viPeek16, viPoke16, viPeek32, viPoke32 џџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџ!џџџџ(џџџџџџџџ*џџџџ2џџџџџџџџ4џџџџ<џџџџџџџџ>џџџџFџџџџџџџџHџџџџ 6viUnmapAddress(vi ) џџџџџџџџџџџџџџџџџџSFrees up memory space previously mapped by viMapAddress. Not supported by TekVISA. +This function is for expert VXI bus users. +The function result is a VISA status code. (Parameters 0$vi is a session identifier returned by viOpen. џџџџџџџџџџџџџџ(Details 8See the VISA library documentation for further details. This function is untested. (See Also OviOpen, viMapAddress, viPeek8, viPoke8, viPeek16, viPoke16, viPeek32, viPoke32 џџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџ&џџџџџџџџ(џџџџ0џџџџџџџџ2џџџџ:џџџџџџџџ<џџџџDџџџџџџџџFџџџџ ~viPeek8(vi , address , val ) џџџџџџџџџџџџ џџџџџџ џџџџџџџџџџџџџџџџџџџџџџџџ^Reads a one-byte value using an address obtained from viMapAddress. Not supported by TekVISA. +This function is for expert VXI bus users. .The function result is always VI_SUCCESS (0). (Parameters 0$vi is a session identifier returned by viOpen. џџџџџџџџџџџџџџ3$address is an address obtained from viMapAddress. џџџџџџџџџџџџџџ)$val is an output and is the value read. џџџџџџџџџџџџџџ(Details 8See the VISA library documentation for further details. This function is untested. (See Also OviOpen, viMapAddress, viPeek8, viPoke8, viPeek16, viPoke16, viPeek32, viPoke32 џџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџ&џџџџџџџџ(џџџџ0џџџџџџџџ2џџџџ:џџџџџџџџ<џџџџDџџџџџџџџFџџџџ ~viPoke8(vi , address , val ) џџџџџџџџџџџџ џџџџџџ џџџџџџџџџџџџџџџџџџџџџџџџ_Writes a one-byte value using an address obtained from viMapAddress. Not supported by TekVISA. +This function is for expert VXI bus users. .The function result is always VI_SUCCESS (0). (Parameters 0$vi is a session identifier returned by viOpen. џџџџџџџџџџџџџџ3$address is an address obtained from viMapAddress. џџџџџџџџџџџџџџ!$val is the value to be written. џџџџџџџџџџџџџџ(Details 8See the VISA library documentation for further details. This function is untested. (See Also OviOpen, viMapAddress, viPeek8, viPoke8, viPeek16, viPoke16, viPeek32, viPoke32 џџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџ&џџџџџџџџ(џџџџ0џџџџџџџџ2џџџџ:џџџџџџџџ<џџџџDџџџџџџџџFџџџџ ~viPeek16(vi , address , val ) џџџџџџ џџџџџџ џџџџџџџџџџџџџџџџџџџџџџџџџџџџџџ^Reads a two-byte value using an address obtained from viMapAddress. Not supported by TekVISA. +This function is for expert VXI bus users. .The function result is always VI_SUCCESS (0). (Parameters 0$vi is a session identifier returned by viOpen. џџџџџџџџџџџџџџ)$val is an output and is the value read. џџџџџџџџџџџџџџ3$address is an address obtained from viMapAddress. џџџџџџџџџџџџџџ(Details 8See the VISA library documentation for further details. This function is untested. (See Also OviOpen, viMapAddress, viPeek8, viPoke8, viPeek16, viPoke16, viPeek32, viPoke32 џџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџ&џџџџџџџџ(џџџџ0џџџџџџџџ2џџџџ:џџџџџџџџ<џџџџDџџџџџџџџFџџџџ ~viPoke16(vi , address , val ) џџџџџџ џџџџџџ џџџџџџџџџџџџџџџџџџџџџџџџџџџџџџ_Writes a two-byte value using an address obtained from viMapAddress. Not supported by TekVISA. +This function is for expert VXI bus users. .The function result is always VI_SUCCESS (0). (Parameters 0$vi is a session identifier returned by viOpen. џџџџџџџџџџџџџџ3$address is an address obtained from viMapAddress. џџџџџџџџџџџџџџ!$val is the value to be written. џџџџџџџџџџџџџџ(Details 8See the VISA library documentation for further details. This function is untested. (See Also OviOpen, viMapAddress, viPeek8, viPoke8, viPeek16, viPoke16, viPeek32, viPoke32 џџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџ&џџџџџџџџ(џџџџ0џџџџџџџџ2џџџџ:џџџџџџџџ<џџџџDџџџџџџџџFџџџџ ~viPeek32(vi , address , val ) џџџџџџ џџџџџџ џџџџџџџџџџџџџџџџџџџџџџџџџџџџџџ_Reads a four-byte value using an address obtained from viMapAddress. Not supported by TekVISA. +This function is for expert VXI bus users. .The function result is always VI_SUCCESS (0). (Parameters 0$vi is a session identifier returned by viOpen. џџџџџџџџџџџџџџ)$val is an output and is the value read. џџџџџџџџџџџџџџ3$address is an address obtained from viMapAddress. џџџџџџџџџџџџџџ(Details 8See the VISA library documentation for further details. This function is untested. (See Also OviOpen, viMapAddress, viPeek8, viPoke8, viPeek16, viPoke16, viPeek32, viPoke32 џџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџ&џџџџџџџџ(џџџџ0џџџџџџџџ2џџџџ:џџџџџџџџ<џџџџDџџџџџџџџFџџџџ ~viPoke32(vi , address , val ) џџџџџџ џџџџџџ џџџџџџџџџџџџџџџџџџџџџџџџџџџџџџ`Writes a four-byte value using an address obtained from viMapAddress. Not supported by TekVISA. +This function is for expert VXI bus users. .The function result is always VI_SUCCESS (0). (Parameters 0$vi is a session identifier returned by viOpen. џџџџџџџџџџџџџџ3$address is an address obtained from viMapAddress. џџџџџџџџџџџџџџ!$val is the value to be written. џџџџџџџџџџџџџџ(Details 8See the VISA library documentation for further details. This function is untested. (See Also OviOpen, viMapAddress, viPeek8, viPoke8, viPeek16, viPoke16, viPeek32, viPoke32 џџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџ&џџџџџџџџ(џџџџ0џџџџџџџџ2џџџџ:џџџџџџџџ<џџџџDџџџџџџџџFџџџџ ~viMemAlloc(vi , size , offset ) џџџџџџ џџџџџџ џџџџџџџџџџџџџџџџџџџџџџџџџџџџџџnAllocates memory on a VXI board. The memory can be accessed using viMove functions. Not supported by TekVISA. +The function result is a VISA status code. (Parameters 0$vi is a session identifier returned by viOpen. џџџџџџџџџџџџџџ*$size is the number of bytes to allocate. џџџџџџџџџџџџџџM$offset is an output and is used with viMove functions to access the memory. џџџџџџџџџџџџџџ(Details #$Call viMemFree to free the memory. џџџџџџџџџџџџ8See the VISA library documentation for further details. This function is untested. (See Also [viOpen, viMemFree, viMoveIn8, viMoveOut8, viMoveIn16, viMoveOut16, viMoveIn32, viMoveOut32 џџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџ(џџџџџџџџ*џџџџ4џџџџџџџџ6џџџџAџџџџџџџџCџџџџMџџџџџџџџOџџџџ ZviMemFree(vi , offset ) џџџџџџ џџџџџџ џџџџџџџџџџџџџџџџџџB$Frees memory allocated with viMemAlloc. Not supported by TekVISA. џџџџ&џџџџџџџџ+The function result is a VISA status code. (Parameters 0$vi is a session identifier returned by viOpen. џџџџџџџџџџџџџџ-$offset is the value returned by viMemAlloc. џџџџџџџџџџџџџџ(Details 8See the VISA library documentation for further details. This function is untested. (See Also 6viOpen, viMemAlloc џџџџџџџџџџџџџџџџ ZviGpibControlREN(vi , mode ) џџџџџџџџџџџџџџџџџџџџџџџџџџџџџџ@Controls the GPIB remote-enable line. Not supported by TekVISA. +The function result is a VISA status code. (Parameters 0$vi is a session identifier returned by viOpen. џџџџџџџџџџџџџџ+$mode specifies the state of the REN line. џџџџџџџџџџџџџџ(Details 8See the VISA library documentation for further details. This function is untested. (See Also JЂviOpen, viGpibControlATN, viGpibSendIFC, viGpibCommand, viGpibPassControl џџџџџџџџџџџџџџџџџџџџџџџџџџџџ'џџџџџџџџ)џџџџ6џџџџџџџџ8џџџџ ZviGpibControlATN(vi , mode ) џџџџџџџџџџџџџџџџџџџџџџџџџџџџџџ<Controls the GPIB attention line. Not supported by TekVISA. +The function result is a VISA status code. (Parameters 0$vi is a session identifier returned by viOpen. џџџџџџџџџџџџџџ+$mode specifies the state of the ATN line. џџџџџџџџџџџџџџ(Details 8See the VISA library documentation for further details. This function is untested. (See Also JЂviOpen, viGpibControlREN, viGpibSendIFC, viGpibCommand, viGpibPassControl џџџџџџџџџџџџџџџџџџџџџџџџџџџџ'џџџџџџџџ)џџџџ6џџџџџџџџ8џџџџ 6viGpibSendIFC(vi ) џџџџџџџџџџџџџџџџџџASends the GPIB interface-clear signal. Not supported by TekVISA. +The function result is a VISA status code. (Parameters 0$vi is a session identifier returned by viOpen. џџџџџџџџџџџџџџ(Details 8See the VISA library documentation for further details. This function is untested. (See Also MЂviOpen, viGpibControlREN, viGpibControlATN, viGpibCommand, viGpibPassControl џџџџџџџџџџџџџџџџџџџџџџџџџџџџ*џџџџџџџџ,џџџџ9џџџџџџџџ;џџџџ (ЂviGpibCommand(vi , cmd , cnt , retCnt ) џџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџ%џџџџџџ<Controls the GPIB attention line. Not supported by TekVISA. +The function result is a VISA status code. (Parameters 0$vi is a session identifier returned by viOpen. џџџџџџџџџџџџџџyHcmd is a signed or unsigned byte (8-bit integer) wave containing the data to sent. It must be at least as long as cnt . џџџџџџџџџџџџџџsџџџџџџvџџџџџџџџ&$cnt is the number of bytes to write. џџџџџџџџџџџџџџG$retCnt is an output and returns the number of bytes actually written. џџџџџџџџџџџџџџ(Details 8See the VISA library documentation for further details. This function is untested. (See Also MЂviOpen, viGpibControlREN, viGpibControlATN, viGpibSendIFC, viGpibPassControl џџџџџџџџџџџџџџџџџџџџџџџџџџџџ*џџџџџџџџ,џџџџ9џџџџџџџџ;џџџџ ,~viGpibPassControl(vi , primAddr , secAddr ) џџџџџџџџџџџџџџџџџџџџџџџџџџџџџџ"џџџџџџ)џџџџџџExPasses GPIB control to another controller. Not supported by TekVISA. +The function result is a VISA status code. (Parameters 0$vi is a session identifier returned by viOpen. џџџџџџџџџџџџџџ8$primAddr is the primary address of the new controller. џџџџџџџџџџџџџџl$secAddr is the secondary address of the new controller or VI_NO_SEC_ADDR (a constant defined in VISA.ipf). џџџџџџџџџџџџџџ(Details 8See the VISA library documentation for further details. This function is untested. (See Also IЂviOpen, viGpibControlREN, viGpibControlATN, viGpibSendIFC, viGpibCommand џџџџџџџџџџџџџџџџџџџџџџџџџџџџ*џџџџџџџџ,џџџџ9џџџџџџџџ;џџџџ /ЂviVxiCommandQuery(vi , mode , cmd , response ) џџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџ!џџџџџџ$џџџџџџ,џџџџџџDxSends a command or query to a VXI device. Not supported by TekVISA. +The function result is a VISA status code. (Parameters 0$vi is a session identifier returned by viOpen. џџџџџџџџџџџџџџB$mode determines whether to send a command and/or get a response. џџџџџџџџџџџџџџ$cmd is the command to send. џџџџџџџџџџџџџџA$response is an output and returns the response from the device. џџџџџџџџџџџџџџ(Details 8See the VISA library documentation for further details. This function is untested. (See Also viOpen џџџџ ZviAssertUtilSignal(vi , line ) џџџџџџџџџџџџџџџџџџџџџџџџџџџџџџ9xControls a utility bus signal. Not supported by TekVISA. +The function result is a VISA status code. (Parameters 0$vi is a session identifier returned by viOpen. џџџџџџџџџџџџџџV$line is VI_UTIL_ASSERT_SYSRESET, VI_UTIL_ASSERT_SYSFAIL or VI_UTIL_DEASSERT_SYSFAIL. џџџџџџџџџџџџџџ(Details 8See the VISA library documentation for further details. This function is untested. (See Also 6viOpen, viAssertIntrSignal џџџџџџџџџџџџџџџџ *~viAssertIntrSignal(vi , mode , statusID ) џџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџ'џџџџџџ9xControls a utility bus signal. Not supported by TekVISA. +The function result is a VISA status code. (Parameters 0$vi is a session identifier returned by viOpen. џџџџџџџџџџџџџџ)$mode specifies how to assert interrupt. џџџџџџџџџџџџџџ=$statusID is the value used during interrupt acknowledgment. џџџџџџџџџџџџџџ(Details 8See the VISA library documentation for further details. This function is untested. (See Also 6viOpen, viAssertUtilSignal џџџџџџџџџџџџџџџџ .ЂviMapTrigger(vi , trigSrc , trigDest , mode ) џџџџџџ џџџџџџџџџџџџџџџџџџџџџџџџџџџџџџ$џџџџџџ'џџџџџџ+џџџџџџJxMaps a trigger source to a trigger destination. Not supported by TekVISA. +The function result is a VISA status code. (Parameters 0$vi is a session identifier returned by viOpen. џџџџџџџџџџџџџџ'$trigSrc specifies the trigger source. џџџџџџџџџџџџџџ,$trigSrc specifies the trigger destination. џџџџџџџџџџџџџџ$mode must always be zero. џџџџџџџџџџџџџџ(Details 8See the VISA library documentation for further details. This function is untested. (See Also 6viOpen, viUnmapTrigger џџџџџџџџџџџџџџџџ *~viUnmapTrigger(vi , trigSrc , trigDest ) џџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџ&џџџџџџ3xUnmaps a trigger signal. Not supported by TekVISA. +The function result is a VISA status code. (Parameters 0$vi is a session identifier returned by viOpen. џџџџџџџџџџџџџџ'$trigSrc specifies the trigger source. џџџџџџџџџџџџџџ,$trigSrc specifies the trigger destination. џџџџџџџџџџџџџџ(Details 8See the VISA library documentation for further details. This function is untested. (See Also 6viOpen, viMapTrigger џџџџџџџџџџџџџџџџ SviUsbControlOut(vi , bmRequestType , bRequest , wValue , wIndex , wLength , buf ) џџџџџџџџџџџџџџџџџџџџџџџџ"џџџџџџ%џџџџџџ-џџџџџџ0џџџџџџ6џџџџџџ9џџџџџџ?џџџџџџBџџџџџџIџџџџџџLџџџџџџOџџџџџџ6xSends data to a USB device. Not supported by TekVISA. ZxUse of this function requires a detailed knowledge of the low-level operation of the USB. +The function result is a VISA status code. (Parameters 0$vi is a session identifier returned by viOpen. џџџџџџџџџџџџџџgЦbmRequestType, bRequest , wValue , wIndex , wLength are explained in the NI-VISA Programmers Manual. џџџџџџ џџџџџџџџџџџџџџџџџџџџџџџџ џџџџџџ#џџџџџџ)џџџџџџ,џџџџџџ3џџџџџџ4џџџџџџџџ~Hbuf is a signed or unsigned byte (8-bit integer) wave containing the data to sent. It must be at least as long as wLength . џџџџџџџџџџџџџџtџџџџџџ{џџџџџџџџ(Details 8See the VISA library documentation for further details. This function is untested. (See Also 6viOpen, viUsbControlIn џџџџџџџџџџџџџџџџ [2LviUsbControlIn(vi , bmRequestType , bRequest , wValue , wIndex , wLength , buf , retCnt ) џџџџџџџџџџџџџџџџџџџџџџџџ!џџџџџџ$џџџџџџ,џџџџџџ/џџџџџџ5џџџџџџ8џџџџџџ>џџџџџџAџџџџџџHџџџџџџKџџџџџџNџџџџџџRџџџџџџXџџџџџџ8xReads data from a USB device. Not supported by TekVISA. ZxUse of this function requires a detailed knowledge of the low-level operation of the USB. +The function result is a VISA status code. (Parameters 0$vi is a session identifier returned by viOpen. џџџџџџџџџџџџџџgЦbmRequestType, bRequest , wValue , wIndex , wLength are explained in the NI-VISA Programmers Manual. џџџџџџ џџџџџџџџџџџџџџџџџџџџџџџџ џџџџџџ#џџџџџџ)џџџџџџ,џџџџџџ3џџџџџџ4џџџџџџџџzHbuf is a signed or unsigned byte (8-bit integer) wave into which data is read. It must be at least as long as wLength . џџџџџџџџџџџџџџpџџџџџџwџџџџџџџџ(Details 8See the VISA library documentation for further details. This function is untested. (See Also 6viOpen, viUsbControlOut џџџџџџџџџџџџџџџџ` $$т€Ђ VISA XOP Operations џџџџџџџџџџџџџџ‘XThe VISA XOP adds the following command line operations to Igor. These operations provide higher level capabilities than the VISA XOP functions. 5$`VISAControl Controls various aspects of the VISA XOP џџџџ џџџџџџџџ?$`VISARead For reading ASCII data into Igor variables or strings џџџџџџџџџџџџ)$`VISAWrite For writing ASCII data strings џџџџ џџџџџџџџ4$`VISAReadWave For reading ASCII data into Igor waves џџџџ џџџџџџџџ5$`VISAWriteWave For writing ASCII data from Igor waves џџџџ џџџџџџџџF$`VISAReadBinary For reading binary data into Igor variables or strings џџџџџџџџџџџџG$`VISAWriteBinary For writing binary data from Igor variables or strings џџџџџџџџџџџџ;$`VISAReadBinaryWave For reading binary data into Igor waves џџџџџџџџџџџџ<$dVISAWriteBinaryWave For writing binary data from Igor waves џџџџџџџџџџџџ@XThe VISARead, VISAWrite, VISAReadWave, VISAWriteWave, VISAReadBinary, VISAWriteBinary, VISAReadBinaryWave and VISAWriteBinaryWave, operations are collectively called "read/write" operations. These work at a level higher than the VISA XOP functions. For most data transfer operations, you can use these high level calls. a$X(In addition to these higher-level operations, VISA XOP also adds low-level VISA XOP Functions.) Lџџџџ^џџџџџџџџ1Errors and Status Codes From VISA XOP Operations &XVISA XOP operations return an error to Igor in the event of an error, whether this is an Igor error (e.g., "attempt to use a null wave") or a VISA library error (e.g., VI_ERROR_TMO). This is in contrast to low-level VISA XOP functions which do not return VISA library errors as errors to Igor. WXIn addition, the operations set the variables V_flag and V_status which you can use to determine what occurred. V_flag gives information about the overall success of the operation. V_status is the status code returned from the last VISA library function call made by the operation or -1 if the error occurred before any calls the the library. ƒXWhen the operation returns an error to Igor, by default Igor will stop running procedures and display an error dialog. For most purposes this is sufficient. However if you are trying to write a bulletproof set of routines for use by a wide audience you may want to implement more sophisticated error handling. In that case, you must check for runtime errors after calling the operation. пXHere is an example. The function result is an Igor error code, 0 for success or a non-zero value indicating an error occurred. In addition, the function returns the VISA library status code via the output parameter status. Function Test(instr, status) B Variable instr // An instrument referenced obtained from viOpen. B Variable &status // Output: Status code from VISA library or -1.   Variable err = 0   Variable v1 1 VISARead instr, v1 // Sets V_flag and V_status.  ! // Check for VISA library error C err = GetRTError(1) // Clear runtime error so Igor will not abort # if (err != 0) // VISARead failed?  status = V_status < return err // Let calling routine deal with error if any.  endif   status = VI_SUCCESS " return 0 // 0 indicates success. End  m$ For an example of printing an error message based on a VISA status code, see the example under viStatusDesc. _џџџџkџџџџџџџџ 7VISA XOP Operations Versus NIGPIB2 and VDT2 Operations БXThe VISA XOP operations are very similar to operations provided by Igor's NIGPIB2 and VDT2 XOPs. If you have used NIGPIB2 or VDT2, the VISA XOP operations work nearly the same. ž$XThe only major difference is that the VISA XOP operations take a session parameter which identifies the instrument you want to work with. You obtain a value for the session parameter using the viOpen function. This is in contrast to NIGPIB2 operations which work on a device specified using the "GPIB device" command and VDT2 operations which work on a serial port specified using the VDTOperationsPort operation. СџџџџЧџџџџџџџџ"VISA XOP Operations Documentation H`Here is documentation for each of the operations added by the VISA XOP.  I6VISAControl [/Q] testMode=mode , dumpTestBuffer, clearTestBuffer, killIO џџџџџџџџџџџџџџџџџџQThe VISAControl operation provides control over miscellaneous VISA XOP features. [,VISAControl sets V_Flag to zero if no error occurred or to non-zero if an error did occur. (Flags !,/Q Do not report errors to Igor. , Without /Q, if an error occurs during execution of VISAControl, VISAControl returns an error to Igor which causes function execution to abort. (Keywords r6,testMode=mode mode=1 puts VISA XOP in a test mode. This is used only by WaveMetrics for self-testing of VISA XOP. џџџџџџ џџџџџџ џџџџџџџџj,dumpTestBuffer Dumps the test data buffer. This is used only by WaveMetrics for self-testing of VISA XOP. l,clearTestBuffer Clears the test data buffer. This is used only by WaveMetrics for self-testing of VISA XOP. n,killIO Closes all open default resource manager sessions which in turn closes all open sessions of all kinds. џџџџџџЗ, Use this during development to return the VISA library to an initialized state. After you execute VISAControl killIO, any sessions that you obtained from viOpen are no longer valid. џџџџџџ>, VISA XOP also closes all open VISA sessions when Igor quits. џџџџџџIЂVISARead [ /T=termStr /N=n /Q] session , variableName [ , variableName ] џџџџџџџџџџџџџџџџџџџџџџџџ&џџџџџџ)џџџџџџ5џџџџџџ:џџџџџџFџџџџџџYReads from the device specified by session into one or more string or numeric variables. (Parameters CHsession is a session to an instrument obtained by calling viOpen. џџџџџџџџџџџџџџ;џџџџAџџџџџџџџ+HWhen used from the command line or in a macro, variableName must be the name of a local or global variable in the current data folder. When used from a user function, variableName can be the name of a local variable or the name of an NVAR or SVAR referencing a global variable in any data folder. /џџџџџџ;џџџџџџџџЈџџџџџџДџџџџџџџџ(Flags “$,/T=termStr termStr is a string or string expression specifying characters which terminate a read of a single variable. The default is /T=",\r\t". џџџџџџџџџџџџџџ $, If termStr is not "", VISARead reads bytes one-at-a-time and is not affected by the VISA VI_ATTR_TERMCHAR or VI_ATTR_ASRL_END_IN attributes. It terminates the read only when a terminator specified by /T is received or (with GPIB devices) the END signal is received. џџџџџџ џџџџџџџџl, If termStr is "", VISARead reads the number of bytes specified by /N=n in one VISA library call. This runs quickly but the VISA library may terminate the read prematurely unless you set the appropriate attributes. See VISA Library Terminator Character Issues for details. џџџџџџ џџџџџџџџFџџџџџџGџџџџџџџџлџџџџџџџџџџџџB,/N=n n is maximum number of characters to read for each variable. *,/Q Specifies no error message on timeout. (Details ?VISARead sets the variable V_Flag to the number of items read. VISARead internally calls the VISA library viRead function and sets the variable V_status to the status code returned from the last call to viRead or -1 if the error occurred before any calls the the library. This can be used to determine what went wrong in the event of an error. WHere is a discussion of how VISARead goes about trying to read into its argument list. \$If the /T=termStr flag is present, it specifies a terminator character or characters. The terminator is the character that ends input into a string or numeric variable. The default is /T=",\r\t" so that a comma, carriage return or tab ends a read. When dealing with a GPIB device, the read is also ended if the talker asserts the GPIB END signal. џџџџџџџџџџџџџџФ$NOTE: VISARead is not affected by the VISA VI_ATTR_TERMCHAR attribute. It terminates the read only when a terminator specified by /T is received or (with GPIB devices) the END signal is received. џџџџџџџџџџџџџџv/N=n is an optional maximum number of characters to be read into a string or numeric variable. The default is /N=255. §If /Q is present and a timeout occurs, VISARead aborts after setting the variable V_Flag to the number of items read but does not put up an error message and does not halt procedure execution. This allows a procedure to handle a timeout in its own way. ІWhen reading a string, VISARead reads until the next terminator is encountered. The terminator is not put into the string. The next read starts after the terminator. z$Do not use VISARead to read binary data or anything that contains a null character (ASCII 0). Use VISAReadBinary instead. bџџџџpџџџџџџџџ$When reading a numeric variable, VISARead first skips any non-numeric characters and then reads a number. If the variableName refers to a complex variable, VISARead reads two numbers from the device and stores both the real and imaginary parts of the variable. qџџџџџџ}џџџџџџџџ(Example @Function Test(instr) A@ Variable instr // An instrument referenced obtained from viOpen @ @ Variable v1, v2 @ String s1 @ VISARead instr, v1, s1, v2 HEnd eThis reads from the device referenced by instr into variable v1, string variable s1 and variable v2. (Terminators *There are three common cases to consider: ( Instruments that send CR as terminator / Instruments that send CR and LF as terminator D Instruments that send neither CR nor LF but use the END line only. QYou must determine what terminator your instrument sends from its documentation. †The following examples show how you would read a response in the three cases into a string variable. str1 is an Igor string variable.  // CR terminator  String str1 * VISARead str1 // Read the string till CR   // CRLF terminator  String str1, lf F VISARead/T="\r\n" str1, lf // Read the string till CR, then read LF.   // END terminator  String str1 + VISARead str1 // Read the string till END  fThe following examples show how you would read a response in the three cases into a numeric variable.  // CR terminator  Variable v0 ( VISARead v0 // Read the number till CR   // CRLF terminator  Variable v0  String lf D VISARead/T="\r\n" v0, lf // Read the number till CR, then read LF.   // END terminator ) VISARead v0 // Read the string till END  YIf you expected , here is what you would do:  Variable v0, v1, v2  String lf # VISARead/T=",\r\n" v0, v1, v2, lf  ›When dealing with a GPIB device, you may want to read every character into a string until END is asserted. To do this you can specify an empty terminator:  VISARead/T="" str1  ZъVISAReadWave [ /R=[ start , end ] /T=termStr /N=n /Q ] session , waveName [, waveName ] џџџџџџџџџџџџџџџџџџџџџџџџ!џџџџџџ&џџџџџџ.џџџџџџ8џџџџџџ?џџџџџџBџџџџџџJџџџџџџOџџџџџџWџџџџџџ#Reads data from device into waves. (Parameters CHsession is a session to an instrument obtained by calling viOpen. џџџџџџџџџџџџџџ;џџџџAџџџџџџџџ­The waves must be 1-dimensional and can be numeric or text waves. For numeric waves only, complex waves are supported and VISAReadWave reads two values for each wave point. uAssuming the the /R flag is omitted, data is stored into point 0 of each wave, then point 1 of each wave, and so on. (Flags S,/N=n n is maximum number of characters to read for each value. The default is 255. *,/Q Specifies no error message on timeout. }H,/R=[ start, end ] Specifies the starting and ending point numbers for a range of the waves that you want to read data into. џџџџџџ џџџџџџџџ џџџџџџџџџџџџџџ‘$,/T=termStr termStr is a string or string expression specifying characters which terminate a read of a single number. The default is /T=",\r\t". џџџџџџџџџџџџџџ$, If termStr is not "", VISAReadWave reads bytes one-at-a-time and is not affected by the VISA VI_ATTR_TERMCHAR or VI_ATTR_ASRL_END_IN attributes. It terminates the read only when a terminator specified by /T is received or (with GPIB devices) the END signal is received. џџџџџџ џџџџџџџџl, If termStr is "", VISAReadWave reads the number of bytes specified by /N=n in one VISA library call. This runs quickly but the VISA library may terminate the read prematurely unless you set the appropriate attributes. See VISA Library Terminator Character Issues for details. џџџџџџ џџџџџџџџJџџџџџџKџџџџџџџџпџџџџџџџџџџџџ(Details †If the /R flag is omitted, VISAReadWave stores values in point 0 through point n-1 where n is the number of points in the first wave. QVISAReadWave sets the variable V_flag to the number of individual numbers read. VISAReadWave internally calls the VISA library viRead function and sets the variable V_status to the status code returned from the last call to viRead or -1 if the error occurred before any calls the the library. This can be used to determine what went wrong in the event of an error. ‰$VISAReadWave works with 64-bit integer data but is limited to 53 bits of precision. See VISA XOP 64-bit Integer Limitations for details. Xџџџџ{џџџџџџџџ(Example @Function Test(instr) B Variable instr // An instrument referenced obtained from viOpen  I WAVE wave1, wave2, wave3 // Reference to waves in current data folder. * VISAReadWave instr, wave1, wave2, wave3  End vThis reads from the device into wave1, wave2 and wave3. It reads until it has put a value in each point of each wave. (Terminators >$See the discussion of terminators for the VISARead operation. *џџџџ2џџџџџџџџ €2DVISAReadBinary [ /B /Q /S=strLen /T=termStr /TYPE=type /Y={offset , multiplier } ] session , variableName [,variableName ] џџџџџџџџџџџџ!џџџџџџ&џџџџџџ.џџџџџџ5џџџџџџ9џџџџџџ?џџџџџџEџџџџџџHџџџџџџRџџџџџџWџџџџџџ^џџџџџџaџџџџџџmџџџџџџqџџџџџџ~џџџџџџАReads binary data into Igor strings and variables. The binary data can be read as integers of one, two or four bytes, 32-bit IEEE floating point or 64-bit IEEE floating point. (Parameters CHsession is a session to an instrument obtained by calling viOpen. џџџџџџџџџџџџџџ;џџџџAџџџџџџџџ+HWhen used from the command line or in a macro, variableName must be the name of a local or global variable in the current data folder. When used from a user function, variableName can be the name of a local variable or the name of an NVAR or SVAR referencing a global variable in any data folder. /џџџџџџ;џџџџџџџџЈџџџџџџДџџџџџџџџжlIf /S=strLen is used, the arguments are expected to be string variables and bytes are read up to strLen bytes or until a byte is read from GPIB with END asserted or until a byte specified by /T=termStr is read. џџџџџџ џџџџџџџџbџџџџџџhџџџџџџџџФџџџџџџЬџџџџџџџџm$If /S=strLen is NOT used, the arguments are expected to be numeric variables into which data is to be read. џџџџџџџџџџџџџџП$Reading binary data into strings is used mostly to skip a number of bytes or until a certain byte is received. To read actual ASCII data into strings, use VISARead instead of VISAReadBinary. ›џџџџЃџџџџџџџџ(Flags Р /B Indicates that multi-byte data is to be received low-byte-first. Without /B, multi-byte data is received high-byte-first. This flag affects receiving of numeric data only, not string data. * /Q Specifies no error message on timeout. Шl /S=strLen If present, the variables are expected to be string variables. Bytes are read up to strLen bytes or until a byte is read with END asserted or until a byte specified by /T=termStr is read. џџџџџџ џџџџџџџџ^џџџџџџdџџџџџџџџЖџџџџџџОџџџџџџџџш$ /T=termStr Specifies a terminator character when reading bytes into strings. The default value is "" (no terminators). The read will be faster if no terminators are specified. This has no effect when reading into numeric variables. џџџџџџ џџџџџџџџ$ If termStr is not "", VISAReadBinary reads bytes one-at-a-time and is not affected by the VISA VI_ATTR_TERMCHAR or VI_ATTR_ASRL_END_IN attributes. It terminates the read only when a terminator specified by /T is received or (with GPIB devices) the END signal is received. џџџџџџ џџџџџџџџl If termStr is "", VISAReadBinary reads the number of bytes specified by /N=n in one VISA library call. This runs quickly but the VISA library may terminate the read prematurely unless you set the appropriate attributes. See VISA Library Terminator Character Issues for details. џџџџџџ џџџџџџџџLџџџџџџMџџџџџџџџсџџџџ џџџџџџџџl /TYPE=type Specifies the format of the incoming binary data. See WaveType for the definition of type . The default value is 8 (signed byte). џџџџџџ џџџџџџџџAџџџџIџџџџџџџџ`џџџџџџdџџџџџџџџŽ /Y={o, m} o is offset, m is multiplier. /Y is used to scale integer data into real numbers. output data = (input data + offset) * multiplier. (Details UIf a numeric variable is complex, VISAReadBinary reads two values for that variable. gVISAReadBinary sets the variable V_flag, after creating it if necessary, to the number of items read. VISAReadBinary internally calls the VISA library viRead function and sets the variable V_status to the status code returned from the last call to viRead or -1 if the error occurred before any calls the the library. This can be used to determine what went wrong in the event of an error. ‹$VISAReadBinary works with 64-bit integer data but is limited to 53 bits of precision. See VISA XOP 64-bit Integer Limitations for details. Zџџџџ}џџџџџџџџ (Examples @Function Test(instr) A@ Variable instr // An instrument referenced obtained from viOpen @ F@ // Read 10 bytes or until END is received into string variable str1. @ String str1 !@ VISAReadBinary/S=10 instr, str1 @ V@ // Read two-byte signed integer binary numbers into the numeric variables v0 and v1. @ Variable v0, v1 D@ VISAReadBinary/TYPE=(0x10) instr, v0, v1 // Read big-endian data. I@ VISAReadBinary/TYPE=(0x10)/B instr, v0, v1 // Read little-endian data. @ W@ // Read four-byte IEEE single-precision floating point binary numbers into v0 and v1. A@ VISAReadBinary/TYPE=2 instr, v0, v1 // Read big-endian data. E@ VISAReadBinary/TYPE=2/B instr, v0, v1 // Read little-endian data. @End  dъVISAReadBinaryWave [ /B /Q /TYPE=type /Y={offset , multiplier } ] session , waveName [,waveName] џџџџџџ!џџџџџџ%џџџџџџ+џџџџџџ1џџџџџџ4џџџџџџ>џџџџџџDџџџџџџKџџџџџџNџџџџџџVџџџџџџZџџџџџџbџџџџџџxReads binary data into the numeric waves named in wavelist. The waves can be of any numeric data type, real or complex. (Parameters CHsession is a session to an instrument obtained by calling viOpen. џџџџџџџџџџџџџџ;џџџџAџџџџџџџџ(Flags } /B Indicates that multi-byte data is to be received low-byte-first. Without /B, multi-byte data is received high-byte-first. * /Q Specifies no error message on timeout. l /TYPE=type Specifies the format of the incoming binary data. See WaveType for the definition of type . The default value is 8 (signed byte). џџџџџџ џџџџџџџџAџџџџIџџџџџџџџ`џџџџџџdџџџџџџџџŽ /Y={o, m} o is offset, m is multiplier. /Y is used to scale integer data into real numbers. output data = (input data + offset) * multiplier. (Details С$When reading binary data into a string, the VISA library may terminate the read prematurely unless you set the appropriate attributes. See VISA Library Terminator Character Issues for details. ‹џџџџГџџџџџџџџŽIf multiple waves are specified, all of the values for the first wave are read, followed by all of the values for the second wave, and so on. ˆ$If a wave is complex, VISAReadBinaryWave reads two values for each point in that wave. This is true regardless of the /TYPE=type flag. |џџџџџџ€џџџџџџџџxVISAReadBinaryWave sets the variable V_flag, after creating it if necessary, to the number of waves (not points) read. #VISAReadBinaryWave internally calls the VISA library viRead function and sets the variable V_status to the status code returned from the last call to viRead or -1 if the error occurred before any calls the the library. This can be used to determine what went wrong in the event of an error. (Examples @Function Test(instr) A@ Variable instr // An instrument referenced obtained from viOpen @ J@ // Reads two-byte signed integer binary numbers into each point of wave. G@ VISAReadBinaryWave/TYPE=(0x10) instr, wave0 // Big-endian data. K@ VISAReadBinaryWave/TYPE=(0x10)/B instr, wave0 // Little-endian data. @ M@ // Reads a four byte signed integer binary number into each point of wave0, W@ // wave1 and wave2. All of wave0 is read first, then all of wave1, then all of wave2. P@ VISAReadBinaryWave/TYPE=(0x20) instr, wave0, wave1, wave2 // Big-endian data. U@ VISAReadBinaryWave/TYPE=(0x20)/B instr, wave0, wave1, wave2 // Little-endian data. @ J@ // Reads two-byte signed integer binary numbers into each point of wave. K@ // Then it adds 0 to each point and multiplies by .25. This would be used K@ // to scale integer data where 1 count represents .25 volts, for example. N@ VISAReadBinaryWave/TYPE=(0x10)/Y={0,0.25} instr, wave0 // Big-endian data. S@ VISAReadBinaryWave/TYPE=(0x10)/Y={0,0.25}/B instr, wave0 // Little-endian data. @End  HVISAWrite [ /Q ] session , str џџџџџџџџџџџџџџџџџџџџџџџџ+Transmits contents of the string argument. (Parameters CHsession is a session to an instrument obtained by calling viOpen. џџџџџџџџџџџџџџ;џџџџAџџџџџџџџ$str is a string expression. џџџџџџџџџџџџџџ(Flags *,/Q Specifies no error message on timeout. (Details UVISAWrite sets the variable V_flag to 1 if the write succeeded or to zero otherwise. VISAWrite internally calls the VISA library viWrite function and sets the variable V_status to the status code returned from the last call to viWrite or -1 if the error occurred before any calls the the library. This can be used to determine what went wrong in the event of an error. (Examples @Function Test(instr) A@ Variable instr // An instrument referenced obtained from viOpen @ 8@ // Transmits a greeting followed by a carriage return. !@ VISAWrite instr, "Hello" + "\r" @ V@ // Transmits the contents of variable v1, the sine of .5 radians and the contents of X@ // point 0 of wave1, separated by tabs with a carriage return and linefeed at the end. @ Variable v1 = 1234 @ Wave wave1 @ String str 6@ sprintf str, "%g\t%g\t%g\r\n", v1, sin(.5), wave1[0] @ VISAWrite instr, str @End  ‰ъVISAWriteWave [ /R=[ start , end ] /F={numericFormatStr, leaderStr, separatorStr, terminatorStr } /Q ] session , waveName [,waveName] џџџџџџџџџџџџџџџџџџџџџџџџ џџџџџџ(џџџџџџ`џџџџџџiџџџџџџpџџџџџџsџџџџџџ{џџџџџџџџџџџџ‡џџџџџџ-Transmits contents of wave or waves as text. ЏThe waves must be 1-dimensional and can be numeric or text waves. For numeric waves only, complex waves are supported and VISAWriteWave writes two values for each wave point. (Parameters CHsession is a session to an instrument obtained by calling viOpen. џџџџџџџџџџџџџџ;џџџџAџџџџџџџџ@H /F={numericFormatStr, leaderStr, separatorStr, terminatorStr } џџџџџџџџџџџџ<џџџџџџ>џџџџџџџџХ$ numericFormatStr is the numeric format string used to generate the output text for each numeric wave point. VISAWriteWave passes this string to the C sprintf function. The default value is "%g". џџџџџџџџџџџџџџ†H Only numeric formats are allowed. numericFormatStr must end with a numeric conversion character. See Printf for details on formats. #џџџџџџ3џџџџџџџџgџџџџmџџџџџџџџ[$ leaderStr is text that is inserted at the start of each line of data. The default is "". џџџџџџ џџџџџџџџ`$ separatorStr is text that is inserted between each pair of points. The default is "\t" (tab). џџџџџџ џџџџџџџџp$ terminatorStr is text that is written at the end of each line of data. The default is "\r" (carriage-return). џџџџџџџџџџџџџџz /R=[start,end] Specifies the starting and ending point numbers for a range of the waves that you want to write data from. + /Q Specifies no error message on timeout. (Details ˆIf the /R flag is omitted, VISAWriteWave writes values for point 0 through point n-1 where n is the number of points in the first wave. uVISAWriteWave sets the variable V_flag, after creating it if necessary, to the number of individual numbers written. VISAWriteWave internally calls the VISA library viWrite function and sets the variable V_status to the status code returned from the last call to viWrite or -1 if the error occurred before any calls the the library. This can be used to determine what went wrong in the event of an error. Š$VISAWriteWave works with 64-bit integer data but is limited to 53 bits of precision. See VISA XOP 64-bit Integer Limitations for details. Yџџџџ|џџџџџџџџ (Examples @Function Test(instr) A@ Variable instr // An instrument referenced obtained from viOpen @ J@ // Transmits contents of the waves as text, using 15 digits of precision C@ // with a comma between numbers and CRLF at the end of each line. GH@ VISAWriteWave/F={"%.15g", "", ",", "\r\n"} instr, wave1, wave2, wave3 џџџџџџџџџџџџџџ*џџџџџџ+џџџџџџџџ@End  GЂVISAWriteBinary [ /B /Q /TYPE=type ] session , argument [,argument ] џџџџџџџџџџџџ"џџџџџџ&џџџџџџ-џџџџџџ0џџџџџџ8џџџџџџ<џџџџџџEџџџџџџПTransmits contents of the argument or arguments as binary data. The binary data can be sent as integers of one-, two- or four-bytes, 32-bit IEEE floating point or 64-bit IEEE floating point. (Parameters CHsession is a session to an instrument obtained by calling viOpen. џџџџџџџџџџџџџџ;џџџџAџџџџџџџџ#$argument is a numeric expression. џџџџџџџџџџџџџџ(Flags u /B Indicates that multi-byte data is to be sent low-byte-first. Without /B, multi-byte data is sent high-byte-first. * /Q Specifies no error message on timeout. ™l /TYPE=type Specifies the format in which the binary data is transmitted. See WaveType for the definition of type . The default value is 8 (signed byte). џџџџџџ џџџџџџџџMџџџџUџџџџџџџџlџџџџџџpџџџџџџџџ(Details kVISAWriteBinary sets the variable V_flag, after creating it if necessary, to the number of items written. "VISAWriteBinary internally calls the VISA library viWrite function and sets the variable V_status to the status code returned from the last call to viWrite or -1 if the error occurred before any calls the the library. This can be used to determine what went wrong in the event of an error. x$VISAWriteBinary can not transmit strings. Use VISAWrite for that. VISAWriteBinary can also not transmit complex values. .џџџџ7џџџџџџџџŒ$VISAWriteBinary works with 64-bit integer data but is limited to 53 bits of precision. See VISA XOP 64-bit Integer Limitations for details. [џџџџ~џџџџџџџџ (Examples @Function Test(instr) A@ Variable instr // An instrument referenced obtained from viOpen @ C@ // Writes 123 and -456 as two byte signed integer binary numbers. =@ VISAWriteBinary/TYPE=(0x10) instr, 123, -456 // Big-endian B@ VISAWriteBinary/TYPE=(0x10)/B instr, 123, -456 // Little-endian @ G@ // Writes 2*PI and -PI/2 as 32-bit IEEE floating point binary numbers ;@ VISAWriteBinary/TYPE=2 instr, 2*PI, -PI/2 // Big-endian @@ VISAWriteBinary/TYPE=2/B instr, 2*PI, -PI/2 // Little-endian @End  JЂVISAWriteBinaryWave [ /B /Q /TYPE=type ] session , waveName [,waveName] џџџџџџ"џџџџџџ&џџџџџџ*џџџџџџ1џџџџџџ4џџџџџџ<џџџџџџ@џџџџџџHџџџџџџUWrites binary data from the listed waves. The waves can be of any numeric data type. (Parameters CHsession is a session to an instrument obtained by calling viOpen. џџџџџџџџџџџџџџ;џџџџAџџџџџџџџ(Flags u /B Indicates that multi-byte data is to be sent low-byte-first. Without /B, multi-byte data is sent high-byte-first. * /Q Specifies no error message on timeout. ™l /TYPE=type Specifies the format in which the binary data is transmitted. See WaveType for the definition of type . The default value is 8 (signed byte). џџџџџџ џџџџџџџџMџџџџUџџџџџџџџlџџџџџџpџџџџџџџџ(Details <The waves can be of any numeric data type, real or complex. ‘If multiple waves are specified, all of the values for the first wave are written, followed by all of the values for the second wave, and so on. Š$If a wave is complex, VISAWriteBinaryWave writes two values for each point in that wave. This is true regardless of the /TYPE=type flag. ~џџџџџџ‚џџџџџџџџ|VISAWriteBinaryWave sets the variable V_flag, after creating it if necessary, to the number of waves (not points) written. &VISAWriteBinaryWave internally calls the VISA library viWrite function and sets the variable V_status to the status code returned from the last call to viWrite or -1 if the error occurred before any calls the the library. This can be used to determine what went wrong in the event of an error. (Examples @Function Test(instr) A@ Variable instr // An instrument referenced obtained from viOpen @ K@ // Writes each point of wave0 as a two-byte signed integer binary number. A@ VISAWriteBinaryWave/TYPE=(0x10) instr, wave0 // Big-endian F@ VISAWriteBinaryWave/TYPE=(0x10)/B instr, wave0 // Little-endian @ E@ // Writes all of wave0 as a four-byte signed integer binary number, 4@ // followed by all of wave1 and then all of wave2. K@ VISAWriteBinaryWave/TYPE=(0x20) instr, wave0, wave1, wave2 // Big-endian O@ VISAWriteBinaryWave/TYPE=(0x20)/B instr, wave0, wave1, wave2 // Little-endian @ N@ // Writes each point of wave0 as a 32-bit IEEE floating point binary number. >@ VISAWriteBinaryWave/TYPE=2 instr, wave0 // Big-endian B@ VISAWriteBinaryWave/TYPE=2/B instr, wave0 // Little-endian @End Z’$ 0юђаš Т D ђ  @ ЎвАТˆркє8 Тњ>ОА„Ђр@В(цДИ Ь#т#$\$і$p'ш'T(ю(*X*І*:+|+Ц,-ф-p.ˆ.њ.P/В/0X0˜0А011 2€2њ2f3М34F4š4№4H5Є5ъ546D6˜6д67h7І7ъ7@8˜8№89H9|9Ж9ю9$:\:”:Ю:;8;n;І;м;<&<š<=‚=і=l>т>b?т?b@т@dAцA"BžB*CКCLDоDpEF–FЊFG†G GH˜HIšIJœJKˆK LvLцLXM`M–M2N OQvTU(UvUЬUFVxVŠV,W:W˜WжWX,XxX€XYжYZZvZ [.[l[|[œ[Ъ[ь[ \B\X\r\z\Š\р\ш\№]r^Є^Ж^_$`–`^a№aўac†cФcдcюcd€Œ€š€Ц€2:R’ЈВКЪX‚`‚ƒАƒтƒєƒT„в„J…X…†Ь†А‡О‡№‡:ˆZˆbˆzˆРˆжˆрˆшˆјˆ†‰Ž‰4ŠœŠЮŠрŠ@‹Ђ‹ Œ.ŒlŒzŒОŒєŒD‚ОЦктŽFŽRŽ\ŽdŽМŽвŽъŽ4NV‚šдјLd€Вжфь‘‘,‘F‘f‘p‘x‘ˆ‘м‘ф‘Š’Ж’ш’њ’Z“Ђ“њ“”F”h”p”~•І•и•ъ•8–”– —œ—˜"˜`˜‚˜’˜р˜ш˜4™L™~™™о™ь™*šLš\šЈšАšŒ›к›DœvœˆœтœlќDžRžž ž\ŸdŸB ” Ц и 2ЁМЁLЂ”ЂЂЂрЂ№ЂЊЃВЃЄФЄіЄЅbЅьЅ|ІФІвІЇ ЇкЇтЇіЈ>ЉpЉ‚ЉмЉhЊрЊЊЋЌЌКЌјЌ­Ф­Ь­–ЎиЎlЏžЏАЏ А~АЮА<БJБ6ВtВ„ВdГlГ8ДzДЕBЕTЕЎЕЖ ЖЗ З^ЗnЗPИXИкИЙ:ЙLЙІЙКК\КlКфКьКfЛЛТЛдЛ.̘̲МфМєМlНtНОН&ОXОjОФОвОП П˜П ПjРДРцРјРRСВС ТtТ‚ТРТтТђТœУЄУpФИФъФќФVХЖХЦbЦpЦЎЦаЦрЦŠЧ’Ч^ШЈШкШьШFЩІЩЪhЪvЪДЪжЪцЪ”ЫœЫhЬАЬтЬєЬNЭЎЭЮZЮhЮІЮШЮиЮ„ЯŒЯXаЂадаца@б бњбbвpвЎваврвŽг–гbдЌдод№дJеЊежVжdжЂжФждж€зˆз„ижиййtйдй.кŠк|лŠлШлълњл мЈмЄнєн&о8о’ођоLпЊпšрЈрцрссОсЦсТтуFуXуВуфlфШфМхЪхц*ц:цфцьцъч:шlш~шиш8щ’щ№щтъ№ъ.ыPы`ыьь э^ээЂэќэ\юЖюя№№N№p№€№*ё2ё0ђ‚ђДђЦђ ѓ€ѓкѓ8є*ѕ8ѕvѕ˜ѕЈѕPіXіРї ј>јpј‚јмјVљАљјљXњђњћ>ћ`ћpћжќоќ0§Š§М§ю§ўZўhўІўШўиў<DцJ|АТzЮм<LАИZРђ&8’№<JˆЊК & Ш , ^ ’ Є ў R А О ќ  . ’ š <Ђдtв,jŒœЊBvˆт6”Ђрv~ †ИьўXЖNp€фь6HЂіn|Ъ*:ЊВ* – Ш к 4!Œ!š!и!њ! "Z"b"р"&#X#j#Ф#$($f$ˆ$˜$Š%’%&R&„&–&№&F'T'’'Д'Ф'Ж(О()V)ˆ)š)є)*@*b*r*h+p+@,‚,Д,Ц, -ш-8.Њ.И.і./(/0&0ж0"1T1f1Р1"2И2Ц23&363(4045R5„5–5№5\6Є677\7~7Ž7Ў7Ж768v8Ј8К89”9Ђ9р9::j:r: ;`;’;Є;ў;R<К<Ш<=(=8==˜=n>О>№>?\?Ў?@J@X@–@И@Ш@A$AвA B>BPBЊBќBRC`CžCРCаC"D*D’EЮE.F`FrFЬFHЬHкHI:IJIžIІI:KxKиK LLvLЊMrN€NОNрN№NDOLOŽO&P†P№PDQЂQRrRфRJSАSіT‚UКUцVDXЮYДZиZ [h[p[ˆ[[Є[м[ф[ \V\€\š\м\ъ\ђ\]6]@]H]р]ш]&^о^І`Ю`a$aЊabdbpb˜b.c>cьc\dЮdTe$fzflgЬgоgphъiіiДjъknmЖmцmєm:nZoИo>q,rЈrЌsXtќt,v:vVvžvІvОvаvђvќvhwzwЊwиwxXxАxТJУXУЪУђФ”ХJЦZЦvЦОЦЦЦЧTЧœЧЄЧђЧ4ШzШ„ШŒШ~ЩкЩьЩ~ЪŠЪЫ6ЫBЬPЬ’Ь*ЭоЭ`ЮŒЯœЯИЯааZаЂаюаіаBб|бЮб$в,в€вФв ггSubtopicџџHA џOperationBody1aџџџџТ џOperationFlags1aџџlТД џOperationFlags1џџџџlТД џCode1џџ Ј)6Dи  џCode1aџџ Ј)6Dи џOperationBody1џџџџТ џTopicBody1џџ дHи џ Topicџџ дH џ OperationSectionџџАHи џ OperationKeywords1aџџџџЦј џ OperationKeywords1џџџџј џCode_Template1џџд/CWk“ЇЛЯуї 3G[oƒ—Ћ џCode_Template1aџџд/CWk“ЇЛЯуї 3G[oƒ—Ћ џTopicBody1aџџ дHи џOperationSummary1aџџЂТ џTopicBody1a+џџ Ђд џTopicBody1a+џџ Ђд џSubtopic+џџДј џCode_Indented1џџ@/CWk“ЇЛЯуї 3G[oƒ—Ћ џCode_Indented1aџџд/CWk“ЇЛЯуї 3G[oƒ—Ћ џIndex1aџџДд џSubtopic+џџHј џ 2є0шш bішшџџўџџПЮннS00USBTMC protocolBrowseURL "http://digital.ni.com/public.nsf/allkb/044FA220F32774ED86256DB3005850CA"џџўџџПЮ йй<significandDisplayHelpTopic "https://en.wikipedia.org/wiki/Significand"Ь+]'pЈ$ѕЬ'CиI›TA—НТИGenevaCourierHelveticaMonacoNew YorkPalatinoTimesChicagoSymbolOsakaAvant GardeTimes New RomanArialCourier NewAmerican Typewriter LightPlantagenet CherokeeOptimaMS PGothicLucida SansKhmer MNAmerican TypewriterArial Unicode MSZapf DingbatsLucida Sans UnicodeIџџџџџџџџџџЬЬџџџџџџЬЬkнТЂџџџџЬЬ џџ@@ ЬЬ ™™ ff ЬЬжЃџџџџЬЬЬЬ™™уMffэ3“>џџЬЬкgлL™™€€€€€@џџ@.3ff™™џџаннннннЊЊЊЊЊЊ@@џџ 2ЬЬ!ўџўџўџ"џџЊЊ#ˆˆˆˆˆˆ$ffffff%џџџПџП&џџUU'џџff(ЛЛЛЛЛЛ)џџ@Хй*``џџ+,@юnџџ-ЬЬŽˆ.џџЬЬ/™™™™™™0`ђ1ЬЬ@D23333333џџќџ@4ЬЬЩЬ5џџўџџП6џ7+gЬЬ8Tsfц9€€џџ:џџќ@;ЬЬЬЬЬЬ<]fЬЬ=™™>wwwwww? Ѓ9fц@>џA™™q=B+CЬЬыQDџџ€€E,F€џџGнЌ4sfцHџПРџџIџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџш `€ˆ DL №345џџџџy6AypE цA(j9y@ŠPœZІiСЬ‚кэ–˜>ЄNИU`ks4‚E—]ІuЛЊШЕдФлЯфнђъї&".->8HBPPV^]ldzlˆs–{Ѕ…ДУ›вЇсВ№ОЫ кт)ъ7ѓEќSao{#‡4“EžSЌaЙsЧ…г˜рЋюИћЧ з$ц?BNEpR|™…Ж’оЁДО6ЬQмVISA XOPVISA Procedure FileVISA XOP FunctionsVISA XOP OperationsInstalling VISA and VISA XOPVISA XOP 64-bit Integer LimitationsVISA Library Terminator Character IssuesRevision NotesResource ManagerResource TemplateBasic I/OFormatted and Buffered I/OMemory I/OShared MemoryInterface SpecificErrors and Status Codes From VISA XOP FunctionsVISA XOP Functions DocumentationviOpenDefaultRMviOpenviFindRsrcviFindNextviCloseviSetAttributeviSetAttributeStringviGetAttributeviGetAttributeStringviStatusDescviTerminateviLockviUnlockviEnableEventviDisableEventviDiscardEventsviWaitOnEventviReadviWriteviAssertTriggerviReadSTBviClearviIn8viOut8viIn16viOut16viIn32viOut32viMoveIn8viMoveOut8viMoveIn16viMoveOut16viMoveIn32viMoveOut32viMapAddressviUnmapAddressviPeek8viPoke8viPeek16viPoke16viPeek32viPoke32viMemAllocviMemFreeviGpibControlRENviGpibControlATNviGpibSendIFCviGpibCommandviGpibPassControlviVxiCommandQueryviAssertUtilSignalviAssertIntrSignalviMapTriggerviUnmapTriggerviUsbControlOutviUsbControlInErrors and Status Codes From VISA XOP OperationsVISA XOP Operations Versus NIGPIB2 and VDT2 OperationsVISA XOP Operations DocumentationVISAControlVISAReadVISAReadWaveVISAReadBinaryVISAReadBinaryWaveVISAWriteVISAWriteWaveVISAWriteBinaryVISAWriteBinaryWaveUSBTMCSignificand–