home *** CD-ROM | disk | FTP | other *** search
/ Chip 1997 September / CHIP_CD_1997_09_PL.iso / software / testsoft / labwind / demo.6 / main / instr / hp5313xa.doc < prev    next >
Encoding:
Text File  |  1996-08-02  |  113.9 KB  |  3,239 lines

  1.  
  2.                    HP 53131/2A Universal Counter (VISA I/O)
  3. ________________________________________________________________________________
  4.  
  5.   Introduction:
  6.  
  7.   This instrument driver provides programming support for the HP 53131/2A Universal Counter (VISA I/O).
  8.   It contains functions for opening, configuring, taking measurements from, and
  9.   closing the instrument.
  10.  
  11. ________________________________________________________________________________
  12.  
  13.   Assumptions:
  14.  
  15.   To successfully use this module, the following conditions must be met:
  16.  
  17.   For GPIB instrument drivers:
  18.          -  the instrument is connected to the GPIB.
  19.          -  the GPIB address supplied to the initialize function must match the
  20.             GPIB address of the instrument.
  21.  
  22. ________________________________________________________________________________
  23.  
  24.   Error Codes:
  25.  
  26.   Error codes are returned as the return value of each instrument driver
  27.   function. A program should examine this value after each call to an instrument
  28.   driver function to determine if any error occurred. Possible error codes and
  29.   their meanings are listed with the corresponding instrument driver function.
  30.  
  31. ________________________________________________________________________________
  32.  
  33.   How To Use This Document:
  34.  
  35.   This document is intended to be used as a programming reference manual.
  36.   It describes each function in the HP 53131/2A Universal Counter (VISA I/O)
  37.   instrument. The functions are listed in alphabetical order with a
  38.   description of the function, C syntax of the function, a description of each
  39.   parameter, and possible error codes.
  40.  
  41. ________________________________________________________________________________
  42.  
  43. Function Tree Layout:
  44.  
  45.    HP 53131/2A Universal Counter            Function Name:
  46.                (VISA I/O)
  47.  
  48.       Initialize                                  hp5313xa_init
  49.       Configuration Functions
  50.          Input Conditions                         hp5313xa_inputCond
  51.          Trigger/Sensitivity                      hp5313xa_trigSens
  52.          Limits                                   hp5313xa_limit
  53.          Math                                     hp5313xa_math
  54.          Save/Recall Settings                     hp5313xa_savRecSet
  55.          Configure Particular Meas
  56.             Freq, Period, & Ratio                 hp5313xa_freqPeriodRatio
  57.             Phase (Ch1 To Ch2)                    hp5313xa_phase
  58.             Totalize (Ch1)                        hp5313xa_totalize
  59.             Time, Width, Dutycycle                hp5313xa_timWidDuty
  60.             Time Interval Ch1 To Ch2              hp5313xa_timeInterval
  61.             Configure For Block Meas              hp5313xa_confblock
  62.          Configure Generic Measurements           hp5313xa_confFunc
  63.       Action/Status Functions
  64.          Particular Measurements
  65.             Start/Stop Measurements               hp5313xa_strStpMeas
  66.             Status Register
  67.                Initiate Registers                 hp5313xa_initReg
  68.                Set SRQ Enable Condition           hp5313xa_setSrqCond
  69.                Wait For SRQ                       hp5313xa_waitSrq
  70.          Initiate Generic Measurements            hp5313xa_initMeas
  71.          Invoke Post-Processing                   hp5313xa_postProcess
  72.       Data Functions
  73.          Query Measurements                       hp5313xa_queryMeas
  74.          Data Results                             hp5313xa_dataRes
  75.          Math Results                             hp5313xa_mathRes
  76.          Limit Results                            hp5313xa_limitRes
  77.          Statistics Results                       hp5313xa_statisticsRes
  78.       Utility Functions
  79.          Query Chan 3's Settings                  hp5313xa_queryChan3
  80.          Enable/Disable Settings                  hp5313xa_enaDisSet
  81.          Write To Instrument                      hp5313xa_writeInstrData
  82.          Read Instrument Data                     hp5313xa_readInstrData
  83.          Reset                                    hp5313xa_reset
  84.          Self-Test                                hp5313xa_selfTest
  85.          Error-Query                              hp5313xa_errorQuery
  86.          Error Message                            hp5313xa_errorMessage
  87.          Revision Query                           hp5313xa_revisionQuery
  88.       Close                                       hp5313xa_close
  89. ________________________________________________________________________________
  90.  
  91.   HP 53131/2A Universal Counter (VISA I/O)
  92.  
  93.       This instrument module provides programming support for the
  94.       HP 53131/2A Universal Counter.  The module is divided into the following
  95.       functions:
  96.       
  97.       Functions/Classes:
  98.       
  99.       (1) Initialize:
  100.       This function initializes the instrument and sets it to a default
  101.       configuration.
  102.       
  103.       (2) Configuration Functions: (Class)
  104.       This class of functions configures the counter's input ports, the Trigger
  105.       Level/Sensitivity, the limit test, and the math processing.  It also
  106.       configures particular or generic measurements.
  107.       
  108.       (3) Action/Status Functions: (Class)
  109.       This class of functions begins or terminates an acquisition. It also
  110.       provides functions which allow the user to determine the current status
  111.       of the instrument.
  112.       
  113.       (4) Data Functions: (Class)
  114.       This class of functions queries for the results of General/Generic
  115.       measurements, limit test, math, and statistics.
  116.       
  117.       (5) Utility Functions: (Class)
  118.       This class of functions provides lower level functions to communicate
  119.       with the instrument, and change instrument parameters.
  120.       
  121.       (6) Close:
  122.       This function takes the instrument offline.
  123.       
  124. ________________________________________________________________________________
  125.  
  126.               The following functions are in alphabetical order.
  127.  
  128. ________________________________________________________________________________
  129.  
  130.   hp5313xa_close
  131.  
  132.       ViStatus hp5313xa_close (ViSession instrumentHandle);
  133.  
  134.   Purpose
  135.  
  136.       This function performs the following operations:
  137.       viClose (instrSession) and viClose (rmSession).
  138.       
  139.       Notes:
  140.       
  141.       (1) The instrument must be reinitialized to use it again.
  142.  
  143.   Parameter List
  144.  
  145.       instrumentHandle
  146.  
  147.           Variable Type       ViSession
  148.  
  149.           This control accepts the Instrument Handle returned by the Initialize
  150.           function to select the desired instrument driver session.
  151.           
  152.           Default Value:  None
  153.  
  154.   Return Value
  155.  
  156.           This control contains the status code returned by the function call.
  157.           
  158.           Status Codes:
  159.           
  160.           Status    Description
  161.           -------------------------------------------------
  162.                  0  No error (the call was successful).
  163.           
  164.           3FFF0005  The specified termination character was read.
  165.           3FFF0006  The specified number of bytes was read.
  166.           
  167.           BFFF0000  Miscellaneous or system error occurred.
  168.           BFFF000E  Invalid session handle.
  169.           BFFF0015  Timeout occurred before operation could complete.
  170.           BFFF0034  Violation of raw write protocol occurred.
  171.           BFFF0035  Violation of raw read protocol occurred.
  172.           BFFF0036  Device reported an output protocol error.
  173.           BFFF0037  Device reported an input protocol error.
  174.           BFFF0038  Bus error occurred during transfer.
  175.           BFFF003A  Invalid setup (attributes are not consistent).
  176.           BFFF005F  No listeners condition was detected.
  177.           BFFF0060  This interface is not the controller in charge.
  178.           BFFF0067  Operation is not supported on this session.
  179.           
  180. ________________________________________________________________________________
  181.  
  182.   hp5313xa_confFunc
  183.  
  184.       ViStatus hp5313xa_confFunc (ViSession instrumentHandle, ViInt16 selectFunction);
  185.  
  186.   Purpose
  187.  
  188.       This function configures the counter for measurement of the selected
  189.       function. This function is used when "reading" or "fetching" measurement
  190.       methods are used.
  191.       
  192.       Notes:
  193.       
  194.       (1) If a direct measurement is desired, use the function "Query
  195.       Measurement" from the "Query Result" class.
  196.  
  197.   Parameter List
  198.  
  199.       instrumentHandle
  200.  
  201.           Variable Type       ViSession
  202.  
  203.           This control accepts the Instrument Handle returned by the Initialize
  204.           function to select the desired instrument driver session.
  205.           
  206.           Default Value:  None
  207.  
  208.       selectFunction
  209.  
  210.           Variable Type       ViInt16
  211.  
  212.           This control selects function to be configured for measurements.
  213.           
  214.           Valid Range:
  215.           The numbers (1, 2, & 3) following each quantity represent channel
  216.           number.
  217.           
  218.           0 - DutyCycle 1 (Default Value)
  219.           1 - Fall Time 1
  220.           2 - Rise Time 1
  221.           3 - Frequency 1
  222.           4 - Frequency 2
  223.           5 - Frequency 3
  224.           6 - Freq Ratio 1 to 2
  225.           7 - Freq Ratio 1 to 3
  226.           8 - Max Volt 1
  227.           9 - Min Volt 1
  228.           10 - Max Volt 2
  229.           11 - Min Volt 2
  230.           12 - Negative Width 1
  231.           13 - Positive Width 1
  232.           14 - Period 1
  233.           15 - Period 2
  234.           16 - Period 3
  235.           17 - Phase 1 to 2
  236.           18 - Positive peak 1
  237.           19 - Positive peak 2
  238.           20 - Time interval 1 to 2
  239.           21 - Totalize 1 (continuous)
  240.           22 - Totalize 1
  241.           
  242.           Notes:
  243.           
  244.           (1) Default values were used for the parameters (e.g., reference,
  245.           resolution, etc.) of each function. To determine these default
  246.           values, See the description of each function on the programming guide
  247.           manual.
  248.           
  249.  
  250.   Return Value
  251.  
  252.           This control contains the status code returned by the function call.
  253.           
  254.           Status Codes:
  255.           
  256.           Status    Description
  257.           -------------------------------------------------
  258.                  0  No error (the call was successful).
  259.           
  260.           3FFF0005  The specified termination character was read.
  261.           3FFF0006  The specified number of bytes was read.
  262.           
  263.           BFFC0002  Parameter 2 (Select_Function) out of range.
  264.           
  265.           BFFF0000  Miscellaneous or system error occurred.
  266.           BFFF000E  Invalid session handle.
  267.           BFFF0015  Timeout occurred before operation could complete.
  268.           BFFF0034  Violation of raw write protocol occurred.
  269.           BFFF0035  Violation of raw read protocol occurred.
  270.           BFFF0036  Device reported an output protocol error.
  271.           BFFF0037  Device reported an input protocol error.
  272.           BFFF0038  Bus error occurred during transfer.
  273.           BFFF003A  Invalid setup (attributes are not consistent).
  274.           BFFF005F  No listeners condition was detected.
  275.           BFFF0060  This interface is not the controller in charge.
  276.           BFFF0067  Operation is not supported on this session.
  277.           
  278. ________________________________________________________________________________
  279.  
  280.   hp5313xa_confblock
  281.  
  282.       ViStatus hp5313xa_confblock (ViSession instrumentHandle, ViBoolean statistics,
  283.                                    ViInt32 ofMeasurements, ViBoolean filterData,
  284.                                    ViInt16 show, ViReal64 lowerLimit,
  285.                                    ViReal64 upperLimit);
  286.  
  287.   Purpose
  288.  
  289.       This function configures the counter for a block measurement. It
  290.       specifies the number of measurements to combine for statistics
  291.       processing. It specifies which measurements will be used in computing
  292.       statistics; out-of-limit measurements can be filtered out of the
  293.       statistics processing.
  294.       
  295.  
  296.   Parameter List
  297.  
  298.       instrumentHandle
  299.  
  300.           Variable Type       ViSession
  301.  
  302.           This control accepts the Instrument Handle returned by the Initialize
  303.           function to select the desired instrument driver session.
  304.           
  305.           Default Value:  None
  306.  
  307.       statistics
  308.  
  309.           Variable Type       ViBoolean
  310.  
  311.           This control enables or disable the statistics post-processing.
  312.           
  313.           Valid Range:
  314.           VI_OFF (0) - Disable (Default Value)
  315.           VI_ON  (1) - Enable
  316.           
  317.           
  318.  
  319.       ofMeasurements
  320.  
  321.           Variable Type       ViInt32
  322.  
  323.           This control specifies the number of measurements to combine for
  324.           statistical processing.
  325.           
  326.           Valid Range: 2 - 1,000,000
  327.           
  328.           Default Value: 50
  329.  
  330.       filterData
  331.  
  332.           Variable Type       ViBoolean
  333.  
  334.           This control enables or disables the statistics filter. When set to
  335.           enable, only measurements (scaled and offset if math is enabled)
  336.           which are within the filter limits are combined into the statistics
  337.           processing.  When set to disable, all measurements, whether they are
  338.           in or out of the filter limits are combined into the statistics
  339.           processing.
  340.           
  341.           Valid Range:
  342.           VI_OFF (0) - Disable (Default Value)
  343.           VI_ON  (1) - Enable
  344.           
  345.           
  346.  
  347.       show
  348.  
  349.           Variable Type       ViInt16
  350.  
  351.           This control selects which statistical result will appear on the
  352.           front-panel display and returned by the data result query.
  353.           
  354.           Valid Range:
  355.           0 - Measurement (Default Value)
  356.           1 - Standard Deviation
  357.           2 - Mean
  358.           3 - Maximum
  359.           4 - Minimum
  360.           
  361.           
  362.  
  363.       lowerLimit
  364.  
  365.           Variable Type       ViReal64
  366.  
  367.           This control sets the statistics filter lower limit.
  368.           
  369.           Valid Range: -9.999999E-12 to +9.999999E+12
  370.           
  371.           Default Value: 0.0
  372.  
  373.       upperLimit
  374.  
  375.           Variable Type       ViReal64
  376.  
  377.           This control sets the statistics filter upper limit.
  378.           
  379.           Valid Range: -9.999999E-12 to +9.999999E+12
  380.           
  381.           Default Value: 0.0
  382.  
  383.   Return Value
  384.  
  385.           This control contains the status code returned by the function call.
  386.           
  387.           Status Codes:
  388.           
  389.           Status    Description
  390.           -------------------------------------------------
  391.                  0  No error (the call was successful).
  392.           
  393.           3FFF0005  The specified termination character was read.
  394.           3FFF0006  The specified number of bytes was read.
  395.           
  396.           BFFC0002  Parameter 2 (Statistics) out of range.
  397.           BFFC0003  Parameter 3 (#_Of_Measurements) out of range.
  398.           BFFC0004  Parameter 4 (Filter_Data)out of range.
  399.           BFFC0005  Parameter 5 (Show) out of range.
  400.           BFFC0006  Parameter 6 (Lower_Limit) out of range.
  401.           BFFC0007  Parameter 7 (Upper_Limit) out of range.
  402.           
  403.           BFFF0000  Miscellaneous or system error occurred.
  404.           BFFF000E  Invalid session handle.
  405.           BFFF0015  Timeout occurred before operation could complete.
  406.           BFFF0034  Violation of raw write protocol occurred.
  407.           BFFF0035  Violation of raw read protocol occurred.
  408.           BFFF0036  Device reported an output protocol error.
  409.           BFFF0037  Device reported an input protocol error.
  410.           BFFF0038  Bus error occurred during transfer.
  411.           BFFF003A  Invalid setup (attributes are not consistent).
  412.           BFFF005F  No listeners condition was detected.
  413.           BFFF0060  This interface is not the controller in charge.
  414.           BFFF0067  Operation is not supported on this session.
  415.           
  416. ________________________________________________________________________________
  417.  
  418.   hp5313xa_dataRes
  419.  
  420.       ViStatus hp5313xa_dataRes (ViSession instrumentHandle, ViReal64 *measuredData);
  421.  
  422.   Purpose
  423.  
  424.       This function returns the data displayed on the instrument's front panel.
  425.  
  426.   Parameter List
  427.  
  428.       instrumentHandle
  429.  
  430.           Variable Type       ViSession
  431.  
  432.           This control accepts the Instrument Handle returned by the Initialize
  433.           function to select the desired instrument driver session.
  434.           
  435.           Default Value:  None
  436.  
  437.       measuredData
  438.  
  439.           Variable Type       ViReal64 (passed by reference)
  440.  
  441.           This control returns the data displayed on the instrument's front
  442.           panel.
  443.           
  444.           Notes:
  445.           
  446.           (1) The unit of the measured value is as follows: Seconds(Time),
  447.           Hertz(Frequency), Volts(Voltage), or None.
  448.  
  449.   Return Value
  450.  
  451.           This control contains the status code returned by the function call.
  452.           
  453.           Status Codes:
  454.           
  455.           Status    Description
  456.           -------------------------------------------------
  457.                  0  No error (the call was successful).
  458.           
  459.           3FFF0005  The specified termination character was read.
  460.           3FFF0006  The specified number of bytes was read.
  461.           3FFF0803  Interpreting the instrument's response.
  462.           
  463.           BFFF0000  Miscellaneous or system error occurred.
  464.           BFFF000E  Invalid session handle.
  465.           BFFF0015  Timeout occurred before operation could complete.
  466.           BFFF0034  Violation of raw write protocol occurred.
  467.           BFFF0035  Violation of raw read protocol occurred.
  468.           BFFF0036  Device reported an output protocol error.
  469.           BFFF0037  Device reported an input protocol error.
  470.           BFFF0038  Bus error occurred during transfer.
  471.           BFFF003A  Invalid setup (attributes are not consistent).
  472.           BFFF005F  No listeners condition was detected.
  473.           BFFF0060  This interface is not the controller in charge.
  474.           BFFF0067  Operation is not supported on this session.
  475.           
  476. ________________________________________________________________________________
  477.  
  478.   hp5313xa_enaDisSet
  479.  
  480.       ViStatus hp5313xa_enaDisSet (ViSession instrumentHandle, ViBoolean limitTest,
  481.                                    ViBoolean math, ViBoolean filterData,
  482.                                    ViBoolean statistics);
  483.  
  484.   Purpose
  485.  
  486.       This function enables or disables some major counter settings such as
  487.       limit testing, math, filtering data, and statistics.
  488.  
  489.   Parameter List
  490.  
  491.       instrumentHandle
  492.  
  493.           Variable Type       ViSession
  494.  
  495.           This control accepts the Instrument Handle returned by the Initialize
  496.           function to select the desired instrument driver session.
  497.           
  498.           Default Value:  None
  499.  
  500.       limitTest
  501.  
  502.           Variable Type       ViBoolean
  503.  
  504.           This control enables or disables the limit test.
  505.           
  506.           Valid Range:
  507.           VI_OFF (0) - Disable
  508.           VI_ON  (1) - Enable (Default Value)
  509.  
  510.       math
  511.  
  512.           Variable Type       ViBoolean
  513.  
  514.           This control enables or disables math. It specifies whether or not
  515.           measurement data will be scaled and offset.
  516.           
  517.           Valid Range:
  518.           VI_OFF (0) - Disable
  519.           VI_ON  (1) - Enable (Default Value)
  520.           
  521.           
  522.  
  523.       filterData
  524.  
  525.           Variable Type       ViBoolean
  526.  
  527.           This control enables or disables the statistics filter. When set to
  528.           enable, only measurements (scaled and offset if math is enabled)
  529.           which are within the filter limits are combined into the statistics
  530.           processing. When set to disable, all measurements, whether they are
  531.           in or out of the filter limits are combined into the statistics
  532.           processing.
  533.           
  534.           Valid Range:
  535.           VI_OFF (0) - Disable (Default Value)
  536.           VI_ON  (1) - Enable
  537.           
  538.           
  539.  
  540.       statistics
  541.  
  542.           Variable Type       ViBoolean
  543.  
  544.           This control enables or disable the statistics post-processing.
  545.           
  546.           Valid Range:
  547.           VI_OFF (0) - Disable (Default Value)
  548.           VI_ON  (1) - Enable
  549.           
  550.           
  551.  
  552.   Return Value
  553.  
  554.           This control contains the status code returned by the function call.
  555.           
  556.           Status Codes:
  557.           
  558.           Status    Description
  559.           -------------------------------------------------
  560.                  0  No error (the call was successful).
  561.           
  562.           3FFF0005  The specified termination character was read.
  563.           3FFF0006  The specified number of bytes was read.
  564.           
  565.           BFFC0002  Parameter 2 out of range.
  566.           BFFC0003  Parameter 3 out of range.
  567.           BFFC0004  Parameter 4 out of range.
  568.           BFFC0005  Parameter 5 out of range.
  569.           BFFF0000  Miscellaneous or system error occurred.
  570.           BFFF000E  Invalid session handle.
  571.           BFFF0015  Timeout occurred before operation could complete.
  572.           BFFF0034  Violation of raw write protocol occurred.
  573.           BFFF0035  Violation of raw read protocol occurred.
  574.           BFFF0036  Device reported an output protocol error.
  575.           BFFF0037  Device reported an input protocol error.
  576.           BFFF0038  Bus error occurred during transfer.
  577.           BFFF003A  Invalid setup (attributes are not consistent).
  578.           BFFF005F  No listeners condition was detected.
  579.           BFFF0060  This interface is not the controller in charge.
  580.           BFFF0067  Operation is not supported on this session.
  581.           
  582. ________________________________________________________________________________
  583.  
  584.   hp5313xa_errorMessage
  585.  
  586.       ViStatus hp5313xa_errorMessage (ViSession instrumentHandle, ViStatus errorCode,
  587.                                       ViChar errorMessage[]);
  588.  
  589.   Purpose
  590.  
  591.       This function takes the Status Code returned by the instrument driver
  592.       functions, interprets it and returns it as a user readable string.
  593.  
  594.   Parameter List
  595.  
  596.       instrumentHandle
  597.  
  598.           Variable Type       ViSession
  599.  
  600.           This control accepts the Instrument Handle returned by the Initialize
  601.           function to select the desired instrument driver session.
  602.           
  603.           Default Value:  VI_NULL
  604.  
  605.       errorCode
  606.  
  607.           Variable Type       ViStatus
  608.  
  609.           This control accepts the Status Code returned from the instrument
  610.           driver functions.
  611.           
  612.           Default Value:
  613.           0 - VI_SUCCESS
  614.  
  615.       errorMessage
  616.  
  617.           Variable Type       ViChar[]
  618.  
  619.           This control returns the interpreted Status Code as a user readable
  620.           message string.
  621.           
  622.           Notes:
  623.           
  624.           (1) The array must contain at least 256 elements ViChar[256].
  625.  
  626.   Return Value
  627.  
  628.           This control contains the status code returned by the function call.
  629.           
  630.           Status Codes:
  631.           
  632.           Status    Description
  633.           -------------------------------------------------
  634.                  0  No error (the call was successful).
  635.           
  636.           3FFF0005  The specified termination character was read.
  637.           3FFF0006  The specified number of bytes was read.
  638.           
  639.           BFFF0000  Miscellaneous or system error occurred.
  640.           BFFF000E  Invalid session handle.
  641.           BFFF0015  Timeout occurred before operation could complete.
  642.           BFFF0034  Violation of raw write protocol occurred.
  643.           BFFF0035  Violation of raw read protocol occurred.
  644.           BFFF0036  Device reported an output protocol error.
  645.           BFFF0037  Device reported an input protocol error.
  646.           BFFF0038  Bus error occurred during transfer.
  647.           BFFF003A  Invalid setup (attributes are not consistent).
  648.           BFFF005F  No listeners condition was detected.
  649.           BFFF0060  This interface is not the controller in charge.
  650.           BFFF0067  Operation is not supported on this session.
  651.           
  652. ________________________________________________________________________________
  653.  
  654.   hp5313xa_errorQuery
  655.  
  656.       ViStatus hp5313xa_errorQuery (ViSession instrumentHandle, ViInt32 *errorCode,
  657.                                     ViChar errorMessage[]);
  658.  
  659.   Purpose
  660.  
  661.       This function reads an error code from the instrument's error queue.
  662.       
  663.       Notes:
  664.       
  665.       (1) If this instrument does not support an Error Query, this function
  666.       should return the Warning Code 0x3FFC0104 - VI_WARN_NSUP_ERROR_QUERY
  667.  
  668.   Parameter List
  669.  
  670.       instrumentHandle
  671.  
  672.           Variable Type       ViSession
  673.  
  674.           This control accepts the Instrument Handle returned by the Initialize
  675.           function to select the desired instrument driver session.
  676.           
  677.           Default Value:  None
  678.  
  679.       errorCode
  680.  
  681.           Variable Type       ViInt32 (passed by reference)
  682.  
  683.           This control returns the error code read from the instrument's error
  684.           queue.
  685.           
  686.  
  687.       errorMessage
  688.  
  689.           Variable Type       ViChar[]
  690.  
  691.           This control returns the error message string read from the
  692.           instrument's error message queue.
  693.           
  694.           Notes:
  695.           
  696.           (1) The array must contain at least 256 elements ViChar[256].
  697.  
  698.   Return Value
  699.  
  700.           This control contains the status code returned by the function call.
  701.           
  702.           Status Codes:
  703.           
  704.           Status    Description
  705.           -------------------------------------------------
  706.                  0  No error (the call was successful).
  707.           
  708.           3FFC0104  Error Query not supported - VI_WARN_NSUP_ERROR_QUERY
  709.           3FFF0005  The specified termination character was read.
  710.           3FFF0006  The specified number of bytes was read.
  711.           
  712.           BFFF0000  Miscellaneous or system error occurred.
  713.           BFFF000E  Invalid session handle.
  714.           BFFF0015  Timeout occurred before operation could complete.
  715.           BFFF0034  Violation of raw write protocol occurred.
  716.           BFFF0035  Violation of raw read protocol occurred.
  717.           BFFF0036  Device reported an output protocol error.
  718.           BFFF0037  Device reported an input protocol error.
  719.           BFFF0038  Bus error occurred during transfer.
  720.           BFFF003A  Invalid setup (attributes are not consistent).
  721.           BFFF005F  No listeners condition was detected.
  722.           BFFF0060  This interface is not the controller in charge.
  723.           BFFF0067  Operation is not supported on this session.
  724.           
  725. ________________________________________________________________________________
  726.  
  727.   hp5313xa_freqPeriodRatio
  728.  
  729.       ViStatus hp5313xa_freqPeriodRatio (ViSession instrumentHandle,
  730.                                          ViInt16 selectFunction, ViInt16 selectArming,
  731.                                          ViReal64 timeDigits, ViBoolean startSlope,
  732.                                          ViInt16 stop);
  733.  
  734.   Purpose
  735.  
  736.       This function configures the selected function for measurement. It sets
  737.       the start/stop arming sources.
  738.       
  739.  
  740.   Parameter List
  741.  
  742.       instrumentHandle
  743.  
  744.           Variable Type       ViSession
  745.  
  746.           This control accepts the Instrument Handle returned by the Initialize
  747.           function to select the desired instrument driver session.
  748.           
  749.           Default Value:  None
  750.  
  751.       selectFunction
  752.  
  753.           Variable Type       ViInt16
  754.  
  755.           This control selects the function to configure for measurement.
  756.           
  757.           Valid Range:
  758.           1 - Chan 1 Frequency (Default)
  759.           2 - Chan 2 Frequency
  760.           3 - Chan 3 Frequency
  761.           4 - Freq Ratio 1 to 2
  762.           5 - Freq Ratio 1 to 3
  763.           6 - Chan 1 Period
  764.  
  765.       selectArming
  766.  
  767.           Variable Type       ViInt16
  768.  
  769.           This control selects the arming mode for the measurement process.
  770.           
  771.           Valid Range:
  772.           0 - Auto (Default)
  773.           1 - Digits
  774.           2 - Time
  775.           3 - Extern
  776.           
  777.           Notes:
  778.           Below each arming mode is followed by a brief description:
  779.           
  780.           0 - Auto.   Makes individual measurements fast as possible.
  781.           
  782.           1 - Digits. Sets the number of digits of resolution to be
  783.                       provided by the result.
  784.           
  785.           2 - Time.   Sets the length of time for which the signal is
  786.                       measured.
  787.           
  788.           3 - Extern. An external signal at Ext Arm(rear-panel) is used to
  789.                       start a measurement.
  790.           
  791.  
  792.       timeDigits
  793.  
  794.           Variable Type       ViReal64
  795.  
  796.           This control specifies the gate time used with time arming or
  797.           specifies the number of digits of resolution when digits arming is
  798.           selected.
  799.           
  800.           Valid Range:
  801.           
  802.           Dependent upon whether Time or Digits is selected by the "Select
  803.           Arming" control:
  804.           - Time: 100E-5 to 999E-5 Seconds. (Short gate time) or 10E-3 to
  805.                   1000.000 Seconds.(Long gate time)
  806.           
  807.           - Digits: 3 to 15 (Integers Only).
  808.           
  809.           Default Value: 3.0 Sec
  810.  
  811.       startSlope
  812.  
  813.           Variable Type       ViBoolean
  814.  
  815.           This control sets the slope of the external start arm signal used in
  816.           external arming for measurements.
  817.           
  818.           Valid Range:
  819.           VI_OFF (0) - Negative (Default Value)
  820.           VI_ON  (1) - Positive
  821.           
  822.           
  823.  
  824.       stop
  825.  
  826.           Variable Type       ViInt16
  827.  
  828.           This control sets the external stop arm signal used in external
  829.           arming for measurements.
  830.           
  831.           Valid Range:
  832.           0 - Immediate.(Default Value)
  833.           1 - Negative Slope.
  834.           2 - Positive Slope.
  835.           3 - Timer. Set the time value.
  836.           
  837.           
  838.  
  839.   Return Value
  840.  
  841.           This control contains the status code returned by the function call.
  842.           
  843.           Status Codes:
  844.           
  845.           Status    Description
  846.           -------------------------------------------------
  847.                  0  No error (the call was successful).
  848.           
  849.           3FFF0005  The specified termination character was read.
  850.           3FFF0006  The specified number of bytes was read.
  851.           
  852.           BFFC0002  Parameter 2 (Select_Function) out of range.
  853.           BFFC0003  Parameter 3 (Select_Arming) out of range.
  854.           BFFC0004  Parameter 4 (Time/Digits) out of range.
  855.           BFFC0005  Parameter 5 (Start_Slope) out of range.
  856.           BFFC0006  Parameter 6 (Stop) out of range.
  857.           
  858.           BFFF0000  Miscellaneous or system error occurred.
  859.           BFFF000E  Invalid session handle.
  860.           BFFF0015  Timeout occurred before operation could complete.
  861.           BFFF0034  Violation of raw write protocol occurred.
  862.           BFFF0035  Violation of raw read protocol occurred.
  863.           BFFF0036  Device reported an output protocol error.
  864.           BFFF0037  Device reported an input protocol error.
  865.           BFFF0038  Bus error occurred during transfer.
  866.           BFFF003A  Invalid setup (attributes are not consistent).
  867.           BFFF005F  No listeners condition was detected.
  868.           BFFF0060  This interface is not the controller in charge.
  869.           BFFF0067  Operation is not supported on this session.
  870.           
  871. ________________________________________________________________________________
  872.  
  873.   hp5313xa_init
  874.  
  875.       ViStatus hp5313xa_init (ViRsrc resourceName, ViBoolean IDQuery,
  876.                               ViBoolean resetDevice, ViInt16 instrumentModel,
  877.                               ViSession *instrumentHandle);
  878.  
  879.   Purpose
  880.  
  881.       This function performs the following initialization actions:
  882.       
  883.       - Opens a session to the Default Resource Manager resource and a session
  884.       to the specified device using the interface and address specified in the
  885.       Resource_Name control.
  886.       
  887.       - Performs an identification query on the Instrument.
  888.       
  889.       - Resets the instrument to a known state.
  890.       
  891.       - Sends initialization commands to the instrument that set any necessary
  892.       programmatic variables such as Headers Off, Short Command form, and Data
  893.       Transfer Binary to the state necessary for the operation of the
  894.       instrument driver.
  895.       
  896.       - Returns an Instrument Handle which is used to differentiate between
  897.       different sessions of this instrument driver.
  898.       
  899.       - Each time this function is invoked a Unique Session is opened.  It is
  900.       possible to have more than one session open for the same resource.
  901.       
  902.       Notes:
  903.       
  904.       (1) If this instrument does not support an ID Query, and the ID Query
  905.       control is set to "Do Query" then this function should return the Warning
  906.       Code 0x3FFC0101 - VI_WARN_NSUP_ID_QUERY.
  907.       
  908.       (2) If this instrument does not support a Reset, and the Reset control is
  909.       set to "Reset Device" then this function should return the Warning Code
  910.       0x3FFC0102 - VI_WARN_NSUP_RESET.
  911.       
  912.  
  913.   Parameter List
  914.  
  915.       resourceName
  916.  
  917.           Variable Type       ViRsrc
  918.  
  919.           This control specifies the interface and address of the device that
  920.           is to be initialized (Instrument Descriptor). The exact grammar to be
  921.           used in this control is shown in the note below.
  922.           
  923.           Default Value:  "GPIB::1"
  924.           
  925.           Notes:
  926.           
  927.           (1) Based on the Instrument Descriptor, this operation establishes a
  928.           communication session with a device.  The grammar for the Instrument
  929.           Descriptor is shown below.  Optional parameters are shown in square
  930.           brackets ([]).
  931.           
  932.           Interface   Grammar
  933.           ------------------------------------------------------
  934.           GPIB        GPIB[board]::primary address[::secondary address]
  935.                       [::INSTR]
  936.           
  937.           The GPIB keyword is used with GPIB instruments.
  938.           
  939.           The default value for optional parameters are shown below.
  940.           
  941.           Optional Parameter          Default Value
  942.           -----------------------------------------
  943.           board                       0
  944.           secondary address           none - 31
  945.           
  946.  
  947.       IDQuery
  948.  
  949.           Variable Type       ViBoolean
  950.  
  951.           This control specifies if an ID Query is sent to the instrument
  952.           during the initialization procedure.
  953.           
  954.           Valid Range:
  955.           VI_OFF (0) - Skip Query
  956.           VI_ON  (1) - Do Query (Default Value)
  957.           
  958.           Notes:
  959.           
  960.           (1) If this instrument does not support an ID Query, and this control
  961.           is set to "Do Query" then this function should return the Warning
  962.           Code 0x3FFC0101 - VI_WARN_NSUP_ID_QUERY.
  963.           
  964.           (2) Under normal circumstances the ID Query ensures that the
  965.           instrument initialized is the type supported by this driver. However
  966.           circumstances may arise where it is undesirable to send an ID Query
  967.           to the instrument.  In those cases; set this control to "Skip Query"
  968.           and this function will initialize the selected interface, without
  969.           doing an ID Query.
  970.  
  971.       resetDevice
  972.  
  973.           Variable Type       ViBoolean
  974.  
  975.           This control specifies if the instrument is to be reset to its
  976.           power-on settings during the initialization procedure.
  977.           
  978.           Valid Range:
  979.           VI_OFF (0) - Don't Reset
  980.           VI_ON  (1) - Reset Device (Default Value)
  981.           
  982.           Notes:
  983.           
  984.           (1) If this instrument does not support a Reset, and this control is
  985.           set to "Reset Device" then this function should return the Warning
  986.           Code 0x3FFC0102 - VI_WARN_NSUP_RESET.
  987.           
  988.           (2) If you do not want the instrument reset. Set this control to
  989.           "Don't Reset" while initializing the instrument.
  990.  
  991.       instrumentModel
  992.  
  993.           Variable Type       ViInt16
  994.  
  995.           This control selects the instrument model to be operated.
  996.           
  997.           Valid Range:
  998.           1 - HP 53131A
  999.           2 - HP 53132A
  1000.           
  1001.           Default Value:
  1002.           1 - HP 53131A
  1003.  
  1004.       instrumentHandle
  1005.  
  1006.           Variable Type       ViSession (passed by reference)
  1007.  
  1008.           This control returns an Instrument Handle that is used in all
  1009.           subsequent function calls to differentiate between different sessions
  1010.           of this instrument driver.
  1011.           
  1012.           Notes:
  1013.           
  1014.           (1) Each time this function is invoked a Unique Session is opened.
  1015.           It is possible to have more than one session open for the same
  1016.           resource.
  1017.           
  1018.  
  1019.   Return Value
  1020.  
  1021.           This control contains the status code returned by the function call.
  1022.           
  1023.           Status Codes:
  1024.           
  1025.           Status    Description
  1026.           -------------------------------------------------
  1027.                  0  No error (the call was successful).
  1028.           
  1029.           3FFF0005  The specified termination character was read.
  1030.           3FFF0006  The specified number of bytes was read.
  1031.           
  1032.           BFFC0002  Parameter 2 (ID Query) out of range.
  1033.           BFFC0011  Instrument returned invalid response to ID Query
  1034.           
  1035.           BFFF0000  Miscellaneous or system error occurred.
  1036.           BFFF000E  Invalid session handle.
  1037.           BFFF0015  Timeout occurred before operation could complete.
  1038.           BFFF0034  Violation of raw write protocol occurred.
  1039.           BFFF0035  Violation of raw read protocol occurred.
  1040.           BFFF0036  Device reported an output protocol error.
  1041.           BFFF0037  Device reported an input protocol error.
  1042.           BFFF0038  Bus error occurred during transfer.
  1043.           BFFF003A  Invalid setup (attributes are not consistent).
  1044.           BFFF005F  No listeners condition was detected.
  1045.           BFFF0060  This interface is not the controller in charge.
  1046.           BFFF0067  Operation is not supported on this session.
  1047.           
  1048.           BFFF0803  Error Scanning Response VI_ERROR_INTERPRETING_RESPONSE
  1049.           
  1050. ________________________________________________________________________________
  1051.  
  1052.   hp5313xa_initMeas
  1053.  
  1054.       ViStatus hp5313xa_initMeas (ViSession instrumentHandle);
  1055.  
  1056.   Purpose
  1057.  
  1058.       This function initiates generic measurements.  It starts the measurement
  1059.       when the "fetching" measurement is used.  After calling this function,
  1060.       one can fetch for the configured function or any related function (See
  1061.       Note: for the related functions).  Use the "Query Measurement" function
  1062.       from the "Query Result" class to return the result of the measurement.
  1063.       
  1064.       Notes:
  1065.       
  1066.       (1) The only functions which can be derived (using Fetch) from the stored
  1067.       data are period to/from frequency, maximum to/from minimum, maximum
  1068.       to/from peak-to-peak, and minimum to/from peak-to-peak. All other
  1069.       functions require an acquisition of a new type.
  1070.  
  1071.   Parameter List
  1072.  
  1073.       instrumentHandle
  1074.  
  1075.           Variable Type       ViSession
  1076.  
  1077.           This control accepts the Instrument Handle returned by the Initialize
  1078.           function to select the desired instrument driver session.
  1079.           
  1080.           Default Value:  None
  1081.  
  1082.   Return Value
  1083.  
  1084.           This control contains the status code returned by the function call.
  1085.           
  1086.           Status Codes:
  1087.           
  1088.           Status    Description
  1089.           -------------------------------------------------
  1090.                  0  No error (the call was successful).
  1091.           
  1092.           3FFF0005  The specified termination character was read.
  1093.           3FFF0006  The specified number of bytes was read.
  1094.           
  1095.           BFFF0000  Miscellaneous or system error occurred.
  1096.           BFFF000E  Invalid session handle.
  1097.           BFFF0015  Timeout occurred before operation could complete.
  1098.           BFFF0034  Violation of raw write protocol occurred.
  1099.           BFFF0035  Violation of raw read protocol occurred.
  1100.           BFFF0036  Device reported an output protocol error.
  1101.           BFFF0037  Device reported an input protocol error.
  1102.           BFFF0038  Bus error occurred during transfer.
  1103.           BFFF003A  Invalid setup (attributes are not consistent).
  1104.           BFFF005F  No listeners condition was detected.
  1105.           BFFF0060  This interface is not the controller in charge.
  1106.           BFFF0067  Operation is not supported on this session.
  1107.           
  1108. ________________________________________________________________________________
  1109.  
  1110.   hp5313xa_initReg
  1111.  
  1112.       ViStatus hp5313xa_initReg (ViSession instrumentHandle);
  1113.  
  1114.   Purpose
  1115.  
  1116.       This function clears the Standard Event Status Enable, Service Request
  1117.       Enable, and presets the enable registers and transition filters
  1118.       associated with the operation and questionable status reporting
  1119.       structures.
  1120.       
  1121.  
  1122.   Parameter List
  1123.  
  1124.       instrumentHandle
  1125.  
  1126.           Variable Type       ViSession
  1127.  
  1128.           This control accepts the Instrument Handle returned by the Initialize
  1129.           function to select the desired instrument driver session.
  1130.           
  1131.           Default Value:  None
  1132.  
  1133.   Return Value
  1134.  
  1135.           This control contains the status code returned by the function call.
  1136.           
  1137.           Status Codes:
  1138.           
  1139.           Status    Description
  1140.           -------------------------------------------------
  1141.                  0  No error (the call was successful).
  1142.           
  1143.           3FFF0005  The specified termination character was read.
  1144.           3FFF0006  The specified number of bytes was read.
  1145.           
  1146.           BFFF0000  Miscellaneous or system error occurred.
  1147.           BFFF000E  Invalid session handle.
  1148.           BFFF0015  Timeout occurred before operation could complete.
  1149.           BFFF0034  Violation of raw write protocol occurred.
  1150.           BFFF0035  Violation of raw read protocol occurred.
  1151.           BFFF0036  Device reported an output protocol error.
  1152.           BFFF0037  Device reported an input protocol error.
  1153.           BFFF0038  Bus error occurred during transfer.
  1154.           BFFF003A  Invalid setup (attributes are not consistent).
  1155.           BFFF005F  No listeners condition was detected.
  1156.           BFFF0060  This interface is not the controller in charge.
  1157.           BFFF0067  Operation is not supported on this session.
  1158.           
  1159. ________________________________________________________________________________
  1160.  
  1161.   hp5313xa_inputCond
  1162.  
  1163.       ViStatus hp5313xa_inputCond (ViSession instrumentHandle, ViInt16 channel,
  1164.                                    ViBoolean coupling, ViBoolean impedanceOhms,
  1165.                                    ViBoolean attenuation, ViBoolean filter);
  1166.  
  1167.   Purpose
  1168.  
  1169.       This function controls the characteristics of the Counter's input ports
  1170.       (channels 1 and 2).
  1171.  
  1172.   Parameter List
  1173.  
  1174.       instrumentHandle
  1175.  
  1176.           Variable Type       ViSession
  1177.  
  1178.           This control accepts the Instrument Handle returned by the Initialize
  1179.           function to select the desired instrument driver session.
  1180.           
  1181.           Default Value:  None
  1182.  
  1183.       channel
  1184.  
  1185.           Variable Type       ViInt16
  1186.  
  1187.           This control selects the channel for which to set the input
  1188.           conditions.
  1189.           
  1190.           Valid Range:
  1191.           1 - Channel 1 (Default Value)
  1192.           2 - Channel 2
  1193.           
  1194.  
  1195.       coupling
  1196.  
  1197.           Variable Type       ViBoolean
  1198.  
  1199.           This control selects the input coupling for the selected channel.
  1200.           
  1201.           Valid Range:
  1202.           VI_OFF (0) - AC
  1203.           VI_ON  (1) - DC (Default Value)
  1204.  
  1205.       impedanceOhms
  1206.  
  1207.           Variable Type       ViBoolean
  1208.  
  1209.           This control selects the input impedance for the selected channel.
  1210.           
  1211.           Valid Range:
  1212.           VI_ON (0) - 50 Ohms
  1213.           VI_ON  (1) - 1M Ohms (Default Value)
  1214.  
  1215.       attenuation
  1216.  
  1217.           Variable Type       ViBoolean
  1218.  
  1219.           This control selects the input attenuation for the selected channel.
  1220.           
  1221.           Valid Range:
  1222.           VI_OFF (0) - 1X
  1223.           VI_ON  (1) - 10X (Default Value)
  1224.  
  1225.       filter
  1226.  
  1227.           Variable Type       ViBoolean
  1228.  
  1229.           This control enables or disables the low pass filter for the selected
  1230.           input channel.
  1231.           
  1232.           Valid Range:
  1233.           VI_ON  (1) - Disable
  1234.           VI_OFF (0) - Enable (Default Value)
  1235.  
  1236.   Return Value
  1237.  
  1238.           This control contains the status code returned by the function call.
  1239.           
  1240.           Status Codes:
  1241.           
  1242.           Status    Description
  1243.           -------------------------------------------------
  1244.                  0  No error (the call was successful).
  1245.           
  1246.           3FFF0005  The specified termination character was read.
  1247.           3FFF0006  The specified number of bytes was read.
  1248.           
  1249.           BFFC0002  Parameter 2 (Channel) out of range.
  1250.           BFFC0003  Parameter 3 (Coupling) out of range.
  1251.           BFFC0004  Parameter 4 (Impedance) out of range.
  1252.           BFFC0005  Parameter 5 (Attenuation) out of range.
  1253.           BFFC0006  Parameter 6 (Filter) out of range.
  1254.           
  1255.           BFFF0000  Miscellaneous or system error occurred.
  1256.           BFFF000E  Invalid session handle.
  1257.           BFFF0015  Timeout occurred before operation could complete.
  1258.           BFFF0034  Violation of raw write protocol occurred.
  1259.           BFFF0035  Violation of raw read protocol occurred.
  1260.           BFFF0036  Device reported an output protocol error.
  1261.           BFFF0037  Device reported an input protocol error.
  1262.           BFFF0038  Bus error occurred during transfer.
  1263.           BFFF003A  Invalid setup (attributes are not consistent).
  1264.           BFFF005F  No listeners condition was detected.
  1265.           BFFF0060  This interface is not the controller in charge.
  1266.           BFFF0067  Operation is not supported on this session.
  1267.           
  1268. ________________________________________________________________________________
  1269.  
  1270.   hp5313xa_limit
  1271.  
  1272.       ViStatus hp5313xa_limit (ViSession instrumentHandle, ViBoolean limitTest,
  1273.                                ViBoolean onFail, ViBoolean show, ViReal64 lowerLimit,
  1274.                                ViReal64 upperLimit);
  1275.  
  1276.   Purpose
  1277.  
  1278.       This function controls the limit test. It defines the lower and upper
  1279.       limit test.
  1280.  
  1281.   Parameter List
  1282.  
  1283.       instrumentHandle
  1284.  
  1285.           Variable Type       ViSession
  1286.  
  1287.           This control accepts the Instrument Handle returned by the Initialize
  1288.           function to select the desired instrument driver session.
  1289.           
  1290.           Default Value:  None
  1291.  
  1292.       limitTest
  1293.  
  1294.           Variable Type       ViBoolean
  1295.  
  1296.           This control enables or disables the limit test.
  1297.           
  1298.           Valid Range:
  1299.           VI_OFF (0) - Disable
  1300.           VI_ON  (1) - Enable (Default Value)
  1301.  
  1302.       onFail
  1303.  
  1304.           Variable Type       ViBoolean
  1305.  
  1306.           This control sets if the counter should stop measurements or continue
  1307.           measuring (go on) when a measurement exceeds the user-entered limits.
  1308.           
  1309.           Valid Range:
  1310.           VI_ON  (0) - Go On
  1311.           VI_OFF (1) - Stop (Default Value)
  1312.  
  1313.       show
  1314.  
  1315.           Variable Type       ViBoolean
  1316.  
  1317.           This control sets whether the measurement display is numeric or
  1318.           symbolic(on a graph).
  1319.           
  1320.           Valid Range:
  1321.           VI_OFF (0) - Numeric
  1322.           VI_ON  (1) - Graph (Default Value)
  1323.  
  1324.       lowerLimit
  1325.  
  1326.           Variable Type       ViReal64
  1327.  
  1328.           This control sets the lower limit used for limit testing.
  1329.           
  1330.           Valid Range:  -9.999999E-12 to 9.999999E+12
  1331.           
  1332.           Default Value:  0.00
  1333.           
  1334.  
  1335.       upperLimit
  1336.  
  1337.           Variable Type       ViReal64
  1338.  
  1339.           This control sets the upper limit used for limit testing.
  1340.           
  1341.           Valid Range:   -9.999999E-12 to +9.999999E+12
  1342.           
  1343.           Default: 0.0
  1344.  
  1345.   Return Value
  1346.  
  1347.           This control contains the status code returned by the function call.
  1348.           
  1349.           Status Codes:
  1350.           
  1351.           Status    Description
  1352.           -------------------------------------------------
  1353.                  0  No error (the call was successful).
  1354.           
  1355.           3FFF0005  The specified termination character was read.
  1356.           3FFF0006  The specified number of bytes was read.
  1357.           3FFF0805  Upper limit <= Lower limit
  1358.           
  1359.           BFFC0002  Parameter 2 (Limit_Test) out of range.
  1360.           BFFC0003  Parameter 3 (On_Fail) out of range.
  1361.           BFFC0004  Parameter 4 (Show) out of range.
  1362.           BFFC0005  Parameter 5 (Lower_Limit) out of range.
  1363.           BFFC0006  Parameter 6 (Upper_Limit) out of range.
  1364.           
  1365.           BFFF0000  Miscellaneous or system error occurred.
  1366.           BFFF000E  Invalid session handle.
  1367.           BFFF0015  Timeout occurred before operation could complete.
  1368.           BFFF0034  Violation of raw write protocol occurred.
  1369.           BFFF0035  Violation of raw read protocol occurred.
  1370.           BFFF0036  Device reported an output protocol error.
  1371.           BFFF0037  Device reported an input protocol error.
  1372.           BFFF0038  Bus error occurred during transfer.
  1373.           BFFF003A  Invalid setup (attributes are not consistent).
  1374.           BFFF005F  No listeners condition was detected.
  1375.           BFFF0060  This interface is not the controller in charge.
  1376.           BFFF0067  Operation is not supported on this session.
  1377.           
  1378.           
  1379. ________________________________________________________________________________
  1380.  
  1381.   hp5313xa_limitRes
  1382.  
  1383.       ViStatus hp5313xa_limitRes (ViSession instrumentHandle,
  1384.                                   ViInt16 *dataWithinLimit, ViInt16 *failCount,
  1385.                                   ViInt16 *passCount, ViInt16 *lowerFailures,
  1386.                                   ViInt16 *upperFailures);
  1387.  
  1388.   Purpose
  1389.  
  1390.       This function reports the results of the limit test on multiple
  1391.       measurements.
  1392.  
  1393.   Parameter List
  1394.  
  1395.       instrumentHandle
  1396.  
  1397.           Variable Type       ViSession
  1398.  
  1399.           This control accepts the Instrument Handle returned by the Initialize
  1400.           function to select the desired instrument driver session.
  1401.           
  1402.           Default Value:  None
  1403.  
  1404.       dataWithinLimit
  1405.  
  1406.           Variable Type       ViInt16 (passed by reference)
  1407.  
  1408.           This control returns the status of the last measurement that was
  1409.           limit tested.
  1410.           
  1411.           Valid Range:
  1412.           VI_FALSE (0) - Passed the limit test.
  1413.           VI_TRUE  (1) - Failed the limit test.
  1414.  
  1415.       failCount
  1416.  
  1417.           Variable Type       ViInt16 (passed by reference)
  1418.  
  1419.           This control holds the number of out of limit values.
  1420.           
  1421.  
  1422.       passCount
  1423.  
  1424.           Variable Type       ViInt16 (passed by reference)
  1425.  
  1426.           This control holds the number of in limit values.
  1427.           
  1428.  
  1429.       lowerFailures
  1430.  
  1431.           Variable Type       ViInt16 (passed by reference)
  1432.  
  1433.           This control holds the number of limit test failures at the lower
  1434.           limit.
  1435.           
  1436.  
  1437.       upperFailures
  1438.  
  1439.           Variable Type       ViInt16 (passed by reference)
  1440.  
  1441.           This control holds the number of limit test failures at the upper
  1442.           limit.
  1443.           
  1444.  
  1445.   Return Value
  1446.  
  1447.           This control contains the status code returned by the function call.
  1448.           
  1449.           Status Codes:
  1450.           
  1451.           Status    Description
  1452.           -------------------------------------------------
  1453.                  0  No error (the call was successful).
  1454.           
  1455.           3FFF0005  The specified termination character was read.
  1456.           3FFF0006  The specified number of bytes was read.
  1457.           3FFF0803  Interpreting the instrument's response.
  1458.           
  1459.           BFFF0000  Miscellaneous or system error occurred.
  1460.           BFFF000E  Invalid session handle.
  1461.           BFFF0015  Timeout occurred before operation could complete.
  1462.           BFFF0034  Violation of raw write protocol occurred.
  1463.           BFFF0035  Violation of raw read protocol occurred.
  1464.           BFFF0036  Device reported an output protocol error.
  1465.           BFFF0037  Device reported an input protocol error.
  1466.           BFFF0038  Bus error occurred during transfer.
  1467.           BFFF003A  Invalid setup (attributes are not consistent).
  1468.           BFFF005F  No listeners condition was detected.
  1469.           BFFF0060  This interface is not the controller in charge.
  1470.           BFFF0067  Operation is not supported on this session.
  1471.           
  1472. ________________________________________________________________________________
  1473.  
  1474.   hp5313xa_math
  1475.  
  1476.       ViStatus hp5313xa_math (ViSession instrumentHandle, ViBoolean math,
  1477.                               ViReal64 scaleValue, ViReal64 offsetValue);
  1478.  
  1479.   Purpose
  1480.  
  1481.       This function controls the math (scale/offset) processing. It sets the
  1482.       scale and offset values. The counter has only one fixed math operation
  1483.       and is as follows Math = "Meas" * Scale + Offset
  1484.  
  1485.   Parameter List
  1486.  
  1487.       instrumentHandle
  1488.  
  1489.           Variable Type       ViSession
  1490.  
  1491.           This control accepts the Instrument Handle returned by the Initialize
  1492.           function to select the desired instrument driver session.
  1493.           
  1494.           Default Value:  None
  1495.  
  1496.       math
  1497.  
  1498.           Variable Type       ViBoolean
  1499.  
  1500.           This control enables or disables math. It specifies whether or not
  1501.           measurement data will be scaled and offset.
  1502.           
  1503.           Valid Range:
  1504.           VI_OFF (0) - Disable
  1505.           VI_ON  (1) - Enable (Default Value)
  1506.  
  1507.       scaleValue
  1508.  
  1509.           Variable Type       ViReal64
  1510.  
  1511.           This control specifies the scale value to be use with the math
  1512.           function.
  1513.           
  1514.           Valid Range: -9.999999E-12 to +9.999999E+12
  1515.           
  1516.           Default Value: 0.0
  1517.           
  1518.  
  1519.       offsetValue
  1520.  
  1521.           Variable Type       ViReal64
  1522.  
  1523.           This control specifies the offset value to be use with the math
  1524.           function.
  1525.           
  1526.           Valid Range: -9.999999E-12 to +9.999999E+12
  1527.           
  1528.           Default Value: 0.0
  1529.  
  1530.   Return Value
  1531.  
  1532.           This control contains the status code returned by the function call.
  1533.           
  1534.           Status Codes:
  1535.           
  1536.           Status    Description
  1537.           -------------------------------------------------
  1538.                  0  No error (the call was successful).
  1539.           
  1540.           3FFF0005  The specified termination character was read.
  1541.           3FFF0006  The specified number of bytes was read.
  1542.           
  1543.           BFFC0002  Parameter 2 (Math) out of range.
  1544.           BFFC0003  Parameter 3 (Scale_Value) out of range.
  1545.           BFFC0004  Parameter 4 (Offset Value) out of range.
  1546.           
  1547.           BFFF0000  Miscellaneous or system error occurred.
  1548.           BFFF000E  Invalid session handle.
  1549.           BFFF0015  Timeout occurred before operation could complete.
  1550.           BFFF0034  Violation of raw write protocol occurred.
  1551.           BFFF0035  Violation of raw read protocol occurred.
  1552.           BFFF0036  Device reported an output protocol error.
  1553.           BFFF0037  Device reported an input protocol error.
  1554.           BFFF0038  Bus error occurred during transfer.
  1555.           BFFF003A  Invalid setup (attributes are not consistent).
  1556.           BFFF005F  No listeners condition was detected.
  1557.           BFFF0060  This interface is not the controller in charge.
  1558.           BFFF0067  Operation is not supported on this session.
  1559.           
  1560. ________________________________________________________________________________
  1561.  
  1562.   hp5313xa_mathRes
  1563.  
  1564.       ViStatus hp5313xa_mathRes (ViSession instrumentHandle,
  1565.                                  ViReal64 *scaledOffsetData);
  1566.  
  1567.   Purpose
  1568.  
  1569.       This function returns the current scaled and offset measurement result.
  1570.       The counter has only one fixed math operation and it is as follows: Math
  1571.       = "Meas" * Scale + Offset
  1572.  
  1573.   Parameter List
  1574.  
  1575.       instrumentHandle
  1576.  
  1577.           Variable Type       ViSession
  1578.  
  1579.           This control accepts the Instrument Handle returned by the Initialize
  1580.           function to select the desired instrument driver session.
  1581.           
  1582.           Default Value:  None
  1583.  
  1584.       scaledOffsetData
  1585.  
  1586.           Variable Type       ViReal64 (passed by reference)
  1587.  
  1588.           This control returns the current scaled and offset measurement
  1589.           result.
  1590.           
  1591.           Notes:
  1592.           
  1593.           (1) The unit of the measured value is as follows: Seconds(Time),
  1594.           Hertz(Frequency), Volts(Voltage), or None.
  1595.  
  1596.   Return Value
  1597.  
  1598.           This control contains the status code returned by the function call.
  1599.           
  1600.           Status Codes:
  1601.           
  1602.           Status    Description
  1603.           -------------------------------------------------
  1604.                  0  No error (the call was successful).
  1605.           
  1606.           3FFF0005  The specified termination character was read.
  1607.           3FFF0006  The specified number of bytes was read.
  1608.           3FFF0803  Interpreting the instrument's response.
  1609.           
  1610.           BFFF0000  Miscellaneous or system error occurred.
  1611.           BFFF000E  Invalid session handle.
  1612.           BFFF0015  Timeout occurred before operation could complete.
  1613.           BFFF0034  Violation of raw write protocol occurred.
  1614.           BFFF0035  Violation of raw read protocol occurred.
  1615.           BFFF0036  Device reported an output protocol error.
  1616.           BFFF0037  Device reported an input protocol error.
  1617.           BFFF0038  Bus error occurred during transfer.
  1618.           BFFF003A  Invalid setup (attributes are not consistent).
  1619.           BFFF005F  No listeners condition was detected.
  1620.           BFFF0060  This interface is not the controller in charge.
  1621.           BFFF0067  Operation is not supported on this session.
  1622.           
  1623. ________________________________________________________________________________
  1624.  
  1625.   hp5313xa_phase
  1626.  
  1627.       ViStatus hp5313xa_phase (ViSession instrumentHandle, ViBoolean selectArming,
  1628.                                ViBoolean startSlope);
  1629.  
  1630.   Purpose
  1631.  
  1632.       This function configures the Phase function for measurement. It sets the
  1633.       start arming source.
  1634.  
  1635.   Parameter List
  1636.  
  1637.       instrumentHandle
  1638.  
  1639.           Variable Type       ViSession
  1640.  
  1641.           This control accepts the Instrument Handle returned by the Initialize
  1642.           function to select the desired instrument driver session.
  1643.           
  1644.           Default Value:  None
  1645.  
  1646.       selectArming
  1647.  
  1648.           Variable Type       ViBoolean
  1649.  
  1650.           This control selects the arming mode for the measurement process.
  1651.           
  1652.           Valid Range:
  1653.           VI_OFF (0) - Auto (Default)
  1654.           VI_ON  (1) - Extern
  1655.           
  1656.           Notes:
  1657.           Below each arming mode is followed by a brief description:
  1658.           
  1659.           VI_OFF (0) - Auto.
  1660.           Makes individual measurements as fast as possible.
  1661.           
  1662.           VI_ON  (1) - Extern.
  1663.           An external signal at Ext Arm(rear-panel) is used to start a
  1664.           measurement.
  1665.  
  1666.       startSlope
  1667.  
  1668.           Variable Type       ViBoolean
  1669.  
  1670.           This control sets the slope of the external start arm signal used in
  1671.           external arming for measurements.
  1672.           
  1673.           Valid Range:
  1674.           VI_OFF (0) - Negative (Default Value)
  1675.           Vi_ON  (1) - Positive
  1676.  
  1677.   Return Value
  1678.  
  1679.           This control contains the status code returned by the function call.
  1680.           
  1681.           Status Codes:
  1682.           
  1683.           Status    Description
  1684.           -------------------------------------------------
  1685.                  0  No error (the call was successful).
  1686.           
  1687.           3FFF0005  The specified termination character was read.
  1688.           3FFF0006  The specified number of bytes was read.
  1689.           
  1690.           BFFC0002  Parameter 2 (Select_Arming) out of range.
  1691.           BFFC0003  Parameter 3 (Start_Slope) out of range.
  1692.           
  1693.           BFFF0000  Miscellaneous or system error occurred.
  1694.           BFFF000E  Invalid session handle.
  1695.           BFFF0015  Timeout occurred before operation could complete.
  1696.           BFFF0034  Violation of raw write protocol occurred.
  1697.           BFFF0035  Violation of raw read protocol occurred.
  1698.           BFFF0036  Device reported an output protocol error.
  1699.           BFFF0037  Device reported an input protocol error.
  1700.           BFFF0038  Bus error occurred during transfer.
  1701.           BFFF003A  Invalid setup (attributes are not consistent).
  1702.           BFFF005F  No listeners condition was detected.
  1703.           BFFF0060  This interface is not the controller in charge.
  1704.           BFFF0067  Operation is not supported on this session.
  1705.           
  1706. ________________________________________________________________________________
  1707.  
  1708.   hp5313xa_postProcess
  1709.  
  1710.       ViStatus hp5313xa_postProcess (ViSession instrumentHandle, ViInt16 postProcess);
  1711.  
  1712.   Purpose
  1713.  
  1714.       This function controls the post processing of data. When enabled, the
  1715.       counter recalculates existing data without re-acquiring data.
  1716.  
  1717.   Parameter List
  1718.  
  1719.       instrumentHandle
  1720.  
  1721.           Variable Type       ViSession
  1722.  
  1723.           This control accepts the Instrument Handle returned by the Initialize
  1724.           function to select the desired instrument driver session.
  1725.           
  1726.           Default Value:  None
  1727.  
  1728.       postProcess
  1729.  
  1730.           Variable Type       ViInt16
  1731.  
  1732.           This control controls the post processing of data. When enabled, the
  1733.           counter recalculates existing data without re-acquiring data.
  1734.           
  1735.           Valid Range:
  1736.           
  1737.           0 - Immediate. Causes the counter to recalculate existing data
  1738.           without re-acquiring data. (Default Value)
  1739.           
  1740.           1 - Auto On. Recalculation will automatically occur whenever any
  1741.           changes are made by the "math" and "limit" functions.
  1742.           
  1743.           2 - Auto Off. "math" and "Limit" functions only produce new results
  1744.           when new data is acquired or when the immediate command is received.
  1745.           
  1746.           
  1747.  
  1748.   Return Value
  1749.  
  1750.           This control contains the status code returned by the function call.
  1751.           
  1752.           Status Codes:
  1753.           
  1754.           Status    Description
  1755.           -------------------------------------------------
  1756.                  0  No error (the call was successful).
  1757.           
  1758.           3FFF0005  The specified termination character was read.
  1759.           3FFF0006  The specified number of bytes was read.
  1760.           
  1761.           BFFC0002  Parameter 2 (Post_Process) out of range.
  1762.           
  1763.           BFFF0000  Miscellaneous or system error occurred.
  1764.           BFFF000E  Invalid session handle.
  1765.           BFFF0015  Timeout occurred before operation could complete.
  1766.           BFFF0034  Violation of raw write protocol occurred.
  1767.           BFFF0035  Violation of raw read protocol occurred.
  1768.           BFFF0036  Device reported an output protocol error.
  1769.           BFFF0037  Device reported an input protocol error.
  1770.           BFFF0038  Bus error occurred during transfer.
  1771.           BFFF003A  Invalid setup (attributes are not consistent).
  1772.           BFFF005F  No listeners condition was detected.
  1773.           BFFF0060  This interface is not the controller in charge.
  1774.           BFFF0067  Operation is not supported on this session.
  1775.           
  1776. ________________________________________________________________________________
  1777.  
  1778.   hp5313xa_queryChan3
  1779.  
  1780.       ViStatus hp5313xa_queryChan3 (ViSession instrumentHandle,
  1781.                                     ViBoolean *inputCoupling,
  1782.                                     ViBoolean *inputImpedance);
  1783.  
  1784.   Purpose
  1785.  
  1786.       This function queries the input channel for its input conditions
  1787.       (coupling & Impedance).
  1788.       
  1789.  
  1790.   Parameter List
  1791.  
  1792.       instrumentHandle
  1793.  
  1794.           Variable Type       ViSession
  1795.  
  1796.           This control accepts the Instrument Handle returned by the Initialize
  1797.           function to select the desired instrument driver session.
  1798.           
  1799.           Default Value:  None
  1800.  
  1801.       inputCoupling
  1802.  
  1803.           Variable Type       ViBoolean (passed by reference)
  1804.  
  1805.           This control returns the channel 3's input coupling.
  1806.           
  1807.           Valid Range:
  1808.           VI_FALSE (0) - Not Available
  1809.           VI_TRUE  (1) - AC
  1810.  
  1811.       inputImpedance
  1812.  
  1813.           Variable Type       ViBoolean (passed by reference)
  1814.  
  1815.           This control returns the channel 3's input impedance.
  1816.           
  1817.           Valid Range:
  1818.           VI_FALSE (0) - Not Available
  1819.           VI_TRUE  (1) - 50 Ohms
  1820.  
  1821.   Return Value
  1822.  
  1823.           This control contains the status code returned by the function call.
  1824.           
  1825.           Status Codes:
  1826.           
  1827.           Status    Description
  1828.           -------------------------------------------------
  1829.                  0  No error (the call was successful).
  1830.           
  1831.           3FFF0005  The specified termination character was read.
  1832.           3FFF0006  The specified number of bytes was read.
  1833.           
  1834.           BFFC0002  Parameter 2 out of range.
  1835.           BFFC0003  Parameter 3 out of range.
  1836.           BFFF0000  Miscellaneous or system error occurred.
  1837.           BFFF000E  Invalid session handle.
  1838.           BFFF0015  Timeout occurred before operation could complete.
  1839.           BFFF0034  Violation of raw write protocol occurred.
  1840.           BFFF0035  Violation of raw read protocol occurred.
  1841.           BFFF0036  Device reported an output protocol error.
  1842.           BFFF0037  Device reported an input protocol error.
  1843.           BFFF0038  Bus error occurred during transfer.
  1844.           BFFF003A  Invalid setup (attributes are not consistent).
  1845.           BFFF005F  No listeners condition was detected.
  1846.           BFFF0060  This interface is not the controller in charge.
  1847.           BFFF0067  Operation is not supported on this session.
  1848.           
  1849. ________________________________________________________________________________
  1850.  
  1851.   hp5313xa_queryMeas
  1852.  
  1853.       ViStatus hp5313xa_queryMeas (ViSession instrumentHandle, ViInt16 selectFunction,
  1854.                                    ViInt16 selectMeasMethod, ViReal64 *measuredValue);
  1855.  
  1856.   Purpose
  1857.  
  1858.       This function performs direct, read, or fetch measurement of the selected
  1859.       function at the selected channel.
  1860.  
  1861.   Parameter List
  1862.  
  1863.       instrumentHandle
  1864.  
  1865.           Variable Type       ViSession
  1866.  
  1867.           This control accepts the Instrument Handle returned by the Initialize
  1868.           function to select the desired instrument driver session.
  1869.           
  1870.           Default Value:  None
  1871.  
  1872.       selectFunction
  1873.  
  1874.           Variable Type       ViInt16
  1875.  
  1876.           This control selects the function to be measured.
  1877.           
  1878.           Valid Range:
  1879.           
  1880.           The numbers (1,2, & 3) following each quantity represent channel
  1881.           number.
  1882.           
  1883.           0 - DutyCycle 1 (Default Value)
  1884.           1 - Fall Time 1
  1885.           2 - Rise Time 1
  1886.           3 - Frequency 1
  1887.           4 - Frequency 2
  1888.           5 - Frequency 3
  1889.           6 - Freq Ratio 1 to 2
  1890.           7 - Freq Ratio 1 to 3
  1891.           8 - Max Volt 1
  1892.           9 - Min Volt 1
  1893.           10 - Max Volt 2
  1894.           11 - Min Volt 2
  1895.           12 - Negative Width 1
  1896.           13 - Positive Width 1
  1897.           14 - Period 1
  1898.           15 - Period 2
  1899.           16 - Period 3
  1900.           17 - Phase 1 to 2
  1901.           18 - Positive peak 1
  1902.           19 - Positive peak 2
  1903.           20 - Time interval 1 to 2
  1904.           21 - Totalize 1
  1905.           
  1906.           Notes:
  1907.           
  1908.           (1) Default values were used for the parameters (e.g., reference,
  1909.           resolution, etc.) of each function. To determine these default
  1910.           values, See the description of each function on the programming guide
  1911.           manual.
  1912.           
  1913.  
  1914.       selectMeasMethod
  1915.  
  1916.           Variable Type       ViInt16
  1917.  
  1918.           This control selects the measurement method.  If "Direct Meas" is
  1919.           selected the selected function is measured directly with no
  1920.           additional settings.  To perform a "Read" measurement the voltage
  1921.           function should be configured first.  To perform a "Fetch"
  1922.           measurement the selected function should be configured first and the
  1923.           "initiate Measurement" function should have been previously sent.
  1924.           Refer to the examples and note below for more details.
  1925.           
  1926.           Valid Range:
  1927.           
  1928.           0 - Direct Meas (Default)
  1929.           1 - Read
  1930.           2 - Fetch
  1931.           
  1932.           Examples:
  1933.           
  1934.           0 - Direct Measurement:
  1935.           Select "Period 1" from the "Select Function" control to directly
  1936.           measure the period of channel 1.
  1937.           
  1938.           1 - Read:
  1939.           Call the "Configure Function" function to configure for "period 1"
  1940.           measurement. In this mode, instrument settings can be modified before
  1941.           the actual "period 1" measurement is performed.
  1942.           
  1943.           2 - Fetch:
  1944.           Call the "Configure Function" function to configure for "period 1"
  1945.           measurement. In this mode, instrument settings can be modified before
  1946.           the "Initiate Measurement" function is called. Once "Initiate
  1947.           Measurement" function is called, one can fetch for the configured
  1948.           function and other functions related to it (See Note: for the related
  1949.           functions).
  1950.           
  1951.           Notes:
  1952.           
  1953.           (1) The only functions which can be derived (using Fetch) from the
  1954.           stored data are period to/from frequency, maximum to/from minimum,
  1955.           maximum to/from peak-to-peak, and minimum to/from peak-to-peak. All
  1956.           other functions require an acquisition of a new type.
  1957.           
  1958.  
  1959.       measuredValue
  1960.  
  1961.           Variable Type       ViReal64 (passed by reference)
  1962.  
  1963.           This control returns the measured function.
  1964.           
  1965.           Notes:
  1966.           
  1967.           (1) The unit of the measured value is as follows: Seconds(Time),
  1968.           Hertz(Frequency), Volts(Voltage), or None.
  1969.  
  1970.   Return Value
  1971.  
  1972.           This control contains the status code returned by the function call.
  1973.           
  1974.           Status Codes:
  1975.           
  1976.           Status    Description
  1977.           -------------------------------------------------
  1978.                  0  No error (the call was successful).
  1979.           
  1980.           3FFF0005  The specified termination character was read.
  1981.           3FFF0006  The specified number of bytes was read.
  1982.           3FFF0803  Interpreting the instrument's response.
  1983.           
  1984.           BFFC0002  Parameter 2 (Select_Function) out of range.
  1985.           BFFC0003  Parameter 3 (Select_Meas_Method) out of range.
  1986.           
  1987.           BFFF0000  Miscellaneous or system error occurred.
  1988.           BFFF000E  Invalid session handle.
  1989.           BFFF0015  Timeout occurred before operation could complete.
  1990.           BFFF0034  Violation of raw write protocol occurred.
  1991.           BFFF0035  Violation of raw read protocol occurred.
  1992.           BFFF0036  Device reported an output protocol error.
  1993.           BFFF0037  Device reported an input protocol error.
  1994.           BFFF0038  Bus error occurred during transfer.
  1995.           BFFF003A  Invalid setup (attributes are not consistent).
  1996.           BFFF005F  No listeners condition was detected.
  1997.           BFFF0060  This interface is not the controller in charge.
  1998.           BFFF0067  Operation is not supported on this session.
  1999.           
  2000. ________________________________________________________________________________
  2001.  
  2002.   hp5313xa_readInstrData
  2003.  
  2004.       ViStatus hp5313xa_readInstrData (ViSession instrumentHandle,
  2005.                                        ViInt16 numberBytesToRead, ViChar readBuffer[],
  2006.                                        ViInt32 *numBytesRead);
  2007.  
  2008.   Purpose
  2009.  
  2010.       This function reads data from the instrument's output buffer and returns
  2011.       it to the specified variable in memory.
  2012.       
  2013.       Notes:
  2014.       
  2015.       (1) Because the instrument may return both numeric and text data in
  2016.       response to queries this function returns the data in string format.
  2017.       
  2018.       (2) If valid data is not available at the instrument's output buffer when
  2019.       this function is called the instrument will hang up and the function will
  2020.       not return until it times out.  If the time-out is disabled this function
  2021.       will hang indefinitely and it may be necessary to reboot the computer to
  2022.       break out.
  2023.  
  2024.   Parameter List
  2025.  
  2026.       instrumentHandle
  2027.  
  2028.           Variable Type       ViSession
  2029.  
  2030.           This control accepts the Instrument Handle returned by the Initialize
  2031.           function to select the desired instrument driver session.
  2032.           
  2033.           Default Value:  None
  2034.  
  2035.       numberBytesToRead
  2036.  
  2037.           Variable Type       ViInt16
  2038.  
  2039.           The number of bytes specified by this control should be greater than
  2040.           or equal to the number of bytes which are to be read from the
  2041.           instrument. If the actual number of bytes to be read is greater than
  2042.           the number this control specifies then multiple reads will be
  2043.           required to empty the instrument's output buffer.
  2044.           
  2045.           If the instrument's output buffer is not emptied the instrument may
  2046.           return invalid data when future reads are performed.
  2047.           
  2048.           Default Value:  50 (See NOTE 2)
  2049.           
  2050.           Notes:
  2051.           
  2052.           (1) If NO DATA is available at the instrument's output buffer when
  2053.           this function is called the instrument will hang up and the function
  2054.           will not return until it times out.  If the time-out is disabled,
  2055.           this function will hang indefinitely and it may be necessary to
  2056.           reboot the computer.
  2057.           
  2058.           (2) If the number of bytes expected is greater than 50 the value of
  2059.           this control may be increased. If the actual number of bytes read is
  2060.           larger than the declared size of the read buffer a run-time error
  2061.           will be generated.
  2062.           
  2063.  
  2064.       readBuffer
  2065.  
  2066.           Variable Type       ViChar[]
  2067.  
  2068.           The incoming data from the instrument is placed into this variable.
  2069.           
  2070.           Notes:
  2071.           
  2072.           (1) Because the instrument may return both numeric and text data in
  2073.           response to queries this function returns the data in string format.
  2074.           
  2075.           (2) This function does not overwrite any old data left in the string
  2076.           variable from the last time the function was called. String data in
  2077.           LabWindows/CVI is terminated with an ASCII null(0x0) and string
  2078.           manipulation functions will only recognize data before the ASCII
  2079.           null.
  2080.           
  2081.           (3) The declared size of the string variable must be greater than the
  2082.           actual number of bytes read from the instrument if it is not a
  2083.           run-time error will be generated.
  2084.           
  2085.  
  2086.       numBytesRead
  2087.  
  2088.           Variable Type       ViInt32 (passed by reference)
  2089.  
  2090.           This variable contains the actual number of bytes read from the
  2091.           instrument. This is the value which is returned by the read function.
  2092.           
  2093.           Notes:
  2094.           
  2095.           (1) If the actual number of bytes read is less than the number of
  2096.           bytes specified in the Number Bytes To Read control then the output
  2097.           buffer has probably been emptied. If the read function fails and the
  2098.           number of bytes read is 0, the most probable cause for the failure is
  2099.           there was no data available at the instrument's output buffer.
  2100.  
  2101.   Return Value
  2102.  
  2103.           This control contains the status code returned by the function call.
  2104.           
  2105.           Status Codes:
  2106.           
  2107.           Status    Description
  2108.           -------------------------------------------------
  2109.                  0  No error (the call was successful).
  2110.           
  2111.           3FFF0005  The specified termination character was read.
  2112.           3FFF0006  The specified number of bytes was read.
  2113.           
  2114.           BFFF0000  Miscellaneous or system error occurred.
  2115.           BFFF000E  Invalid session handle.
  2116.           BFFF0015  Timeout occurred before operation could complete.
  2117.           BFFF0034  Violation of raw write protocol occurred.
  2118.           BFFF0035  Violation of raw read protocol occurred.
  2119.           BFFF0036  Device reported an output protocol error.
  2120.           BFFF0037  Device reported an input protocol error.
  2121.           BFFF0038  Bus error occurred during transfer.
  2122.           BFFF003A  Invalid setup (attributes are not consistent).
  2123.           BFFF005F  No listeners condition was detected.
  2124.           BFFF0060  This interface is not the controller in charge.
  2125.           BFFF0067  Operation is not supported on this session.
  2126.           
  2127. ________________________________________________________________________________
  2128.  
  2129.   hp5313xa_reset
  2130.  
  2131.       ViStatus hp5313xa_reset (ViSession instrumentHandle);
  2132.  
  2133.   Purpose
  2134.  
  2135.       This function resets the instrument to a known state and sends
  2136.       initialization commands to the instrument that set any necessary
  2137.       programmatic variables such as Headers Off, Short Command form, and Data
  2138.       Transfer Binary to the state necessary for the operation of the
  2139.       instrument driver.
  2140.       
  2141.       Notes:
  2142.       
  2143.       (1) If this instrument does not support a Reset, this function should
  2144.       return the Warning Code 0x3FFC0102 - VI_WARN_NSUP_RESET
  2145.       
  2146.  
  2147.   Parameter List
  2148.  
  2149.       instrumentHandle
  2150.  
  2151.           Variable Type       ViSession
  2152.  
  2153.           This control accepts the Instrument Handle returned by the Initialize
  2154.           function to select the desired instrument driver session.
  2155.           
  2156.           Default Value:  None
  2157.  
  2158.   Return Value
  2159.  
  2160.           This control contains the status code returned by the function call.
  2161.           
  2162.           Status Codes:
  2163.           
  2164.           Status    Description
  2165.           -------------------------------------------------
  2166.                  0  No error (the call was successful).
  2167.           
  2168.           3FFC0102  Reset not supported - VI_WARN_NSUP_RESET
  2169.           3FFF0005  The specified termination character was read.
  2170.           3FFF0006  The specified number of bytes was read.
  2171.           
  2172.           BFFF0000  Miscellaneous or system error occurred.
  2173.           BFFF000E  Invalid session handle.
  2174.           BFFF0015  Timeout occurred before operation could complete.
  2175.           BFFF0034  Violation of raw write protocol occurred.
  2176.           BFFF0035  Violation of raw read protocol occurred.
  2177.           BFFF0036  Device reported an output protocol error.
  2178.           BFFF0037  Device reported an input protocol error.
  2179.           BFFF0038  Bus error occurred during transfer.
  2180.           BFFF003A  Invalid setup (attributes are not consistent).
  2181.           BFFF005F  No listeners condition was detected.
  2182.           BFFF0060  This interface is not the controller in charge.
  2183.           BFFF0067  Operation is not supported on this session.
  2184.           
  2185. ________________________________________________________________________________
  2186.  
  2187.   hp5313xa_revisionQuery
  2188.  
  2189.       ViStatus hp5313xa_revisionQuery (ViSession instrumentHandle,
  2190.                                        ViChar instrumentDriverRevision[],
  2191.                                        ViChar firmwareRevision[]);
  2192.  
  2193.   Purpose
  2194.  
  2195.       This function returns the revision numbers of the instrument driver and
  2196.       instrument firmware, and tells the user what firmware the driver is
  2197.       compatible with, for example:
  2198.       
  2199.       This instrument driver's Revision Number is "Rev 1.0, 9/95, CVI 3.1" and
  2200.       is compatible with Instrument Firmware Revision "3.00".
  2201.       
  2202.       Notes:
  2203.       
  2204.       (1) If this instrument does not support a Firmware Revision Query, this
  2205.       function should return the Warning Code 0x3FFC0105 -
  2206.       VI_WARN_NSUP_REV_QUERY.
  2207.  
  2208.   Parameter List
  2209.  
  2210.       instrumentHandle
  2211.  
  2212.           Variable Type       ViSession
  2213.  
  2214.           This control accepts the Instrument Handle returned by the Initialize
  2215.           function to select the desired instrument driver session.
  2216.           
  2217.           Default Value:  None
  2218.  
  2219.       instrumentDriverRevision
  2220.  
  2221.           Variable Type       ViChar[]
  2222.  
  2223.           This control returns the Instrument Driver Software Revision.
  2224.           
  2225.           Notes:
  2226.           
  2227.           (1) The array must contain at least 256 elements ViChar[256].
  2228.  
  2229.       firmwareRevision
  2230.  
  2231.           Variable Type       ViChar[]
  2232.  
  2233.           This control returns the Instrument Firmware Revision.
  2234.           
  2235.           Notes:
  2236.           
  2237.           (1) The array must contain at least 256 elements ViChar[256].
  2238.  
  2239.   Return Value
  2240.  
  2241.           This control contains the status code returned by the function call.
  2242.           
  2243.           Status Codes:
  2244.           
  2245.           Status    Description
  2246.           -------------------------------------------------
  2247.                  0  No error (the call was successful).
  2248.           
  2249.           3FFC0105  Revision Query not supported - VI_WARN_NSUP_REV_QUERY
  2250.           3FFF0005  The specified termination character was read.
  2251.           3FFF0006  The specified number of bytes was read.
  2252.           
  2253.           BFFF0000  Miscellaneous or system error occurred.
  2254.           BFFF000E  Invalid session handle.
  2255.           BFFF0015  Timeout occurred before operation could complete.
  2256.           BFFF0034  Violation of raw write protocol occurred.
  2257.           BFFF0035  Violation of raw read protocol occurred.
  2258.           BFFF0036  Device reported an output protocol error.
  2259.           BFFF0037  Device reported an input protocol error.
  2260.           BFFF0038  Bus error occurred during transfer.
  2261.           BFFF003A  Invalid setup (attributes are not consistent).
  2262.           BFFF005F  No listeners condition was detected.
  2263.           BFFF0060  This interface is not the controller in charge.
  2264.           BFFF0067  Operation is not supported on this session.
  2265.           
  2266. ________________________________________________________________________________
  2267.  
  2268.   hp5313xa_savRecSet
  2269.  
  2270.       ViStatus hp5313xa_savRecSet (ViSession instrumentHandle, ViBoolean saveRecall,
  2271.                                    ViInt16 memoryLocation);
  2272.  
  2273.   Purpose
  2274.  
  2275.       This function saves/recalls instrument settings to/from the specified
  2276.       instrument memory location.
  2277.  
  2278.   Parameter List
  2279.  
  2280.       instrumentHandle
  2281.  
  2282.           Variable Type       ViSession
  2283.  
  2284.           This control accepts the Instrument Handle returned by the Initialize
  2285.           function to select the desired instrument driver session.
  2286.           
  2287.           Default Value:  None
  2288.  
  2289.       saveRecall
  2290.  
  2291.           Variable Type       ViBoolean
  2292.  
  2293.           This control saves/recalls setting to/from the instrument's local
  2294.           memory.
  2295.           
  2296.           Valid Range:
  2297.           VI_OFF (0) - Recall
  2298.           VI_ON  (1) - Save (Default Value)
  2299.  
  2300.       memoryLocation
  2301.  
  2302.           Variable Type       ViInt16
  2303.  
  2304.           This control specifies the instrument's memory location to/from which
  2305.           to save/recall the instrument's settings.
  2306.           
  2307.           Valid Range:
  2308.           Dependent upon the "Save/Recall" control setting:
  2309.           Recall:  0 - 20
  2310.           Save:    1 - 20
  2311.           
  2312.           Default Value: 1
  2313.           
  2314.           Notes:
  2315.           
  2316.           (1) The current instrument state is saved in register 0 when a
  2317.           setting is recalled from memory.
  2318.  
  2319.   Return Value
  2320.  
  2321.           This control contains the status code returned by the function call.
  2322.           
  2323.           Status Codes:
  2324.           
  2325.           Status    Description
  2326.           -------------------------------------------------
  2327.                  0  No error (the call was successful).
  2328.           
  2329.           3FFF0005  The specified termination character was read.
  2330.           3FFF0006  The specified number of bytes was read.
  2331.           
  2332.           BFFC0002  Parameter 2 (Save/Recall) out of range.
  2333.           BFFC0003  Parameter 3 (Memory_Location) out of range.
  2334.           
  2335.           BFFF0000  Miscellaneous or system error occurred.
  2336.           BFFF000E  Invalid session handle.
  2337.           BFFF0015  Timeout occurred before operation could complete.
  2338.           BFFF0034  Violation of raw write protocol occurred.
  2339.           BFFF0035  Violation of raw read protocol occurred.
  2340.           BFFF0036  Device reported an output protocol error.
  2341.           BFFF0037  Device reported an input protocol error.
  2342.           BFFF0038  Bus error occurred during transfer.
  2343.           BFFF003A  Invalid setup (attributes are not consistent).
  2344.           BFFF005F  No listeners condition was detected.
  2345.           BFFF0060  This interface is not the controller in charge.
  2346.           BFFF0067  Operation is not supported on this session.
  2347.           
  2348. ________________________________________________________________________________
  2349.  
  2350.   hp5313xa_selfTest
  2351.  
  2352.       ViStatus hp5313xa_selfTest (ViSession instrumentHandle, ViInt16 *selfTestResult,
  2353.                                   ViChar selfTestMessage[]);
  2354.  
  2355.   Purpose
  2356.  
  2357.       This function runs the instrument's self test routine and returns the
  2358.       test result(s).
  2359.       
  2360.       Notes:
  2361.       
  2362.       (1) If this instrument does not support a Self-Test, this function should
  2363.       return the Warning Code 0x3FFC0103 - VI_WARN_NSUP_SELF_TEST
  2364.  
  2365.   Parameter List
  2366.  
  2367.       instrumentHandle
  2368.  
  2369.           Variable Type       ViSession
  2370.  
  2371.           This control accepts the Instrument Handle returned by the Initialize
  2372.           function to select the desired instrument driver session.
  2373.           
  2374.           Default Value:  None
  2375.  
  2376.       selfTestResult
  2377.  
  2378.           Variable Type       ViInt16 (passed by reference)
  2379.  
  2380.           This control contains the value returned from the instrument self
  2381.           test.  Zero means success.  For any other code, see the device's
  2382.           operator's manual.
  2383.           
  2384.  
  2385.       selfTestMessage
  2386.  
  2387.           Variable Type       ViChar[]
  2388.  
  2389.           This control contains the string returned from the self test. See the
  2390.           device's operation manual for an explanation of the string's
  2391.           contents.
  2392.           
  2393.           Notes:
  2394.           
  2395.           (1) The array must contain at least 256 elements ViChar[256].
  2396.  
  2397.   Return Value
  2398.  
  2399.           This control contains the status code returned by the function call.
  2400.           
  2401.           Status Codes:
  2402.           
  2403.           Status    Description
  2404.           -------------------------------------------------
  2405.                  0  No error (the call was successful).
  2406.           
  2407.           3FFC0103  Self Test not supported - VI_WARN_NSUP_SELF_TEST
  2408.           3FFF0005  The specified termination character was read.
  2409.           3FFF0006  The specified number of bytes was read.
  2410.           
  2411.           BFFF0000  Miscellaneous or system error occurred.
  2412.           BFFF000E  Invalid session handle.
  2413.           BFFF0015  Timeout occurred before operation could complete.
  2414.           BFFF0034  Violation of raw write protocol occurred.
  2415.           BFFF0035  Violation of raw read protocol occurred.
  2416.           BFFF0036  Device reported an output protocol error.
  2417.           BFFF0037  Device reported an input protocol error.
  2418.           BFFF0038  Bus error occurred during transfer.
  2419.           BFFF003A  Invalid setup (attributes are not consistent).
  2420.           BFFF005F  No listeners condition was detected.
  2421.           BFFF0060  This interface is not the controller in charge.
  2422.           BFFF0067  Operation is not supported on this session.
  2423.           
  2424. ________________________________________________________________________________
  2425.  
  2426.   hp5313xa_setSrqCond
  2427.  
  2428.       ViStatus hp5313xa_setSrqCond (ViSession instrumentHandle, ViInt16 SRQCondition);
  2429.  
  2430.   Purpose
  2431.  
  2432.       This function sets the condition at which the service request (SRQ) bit
  2433.       will be set.
  2434.  
  2435.   Parameter List
  2436.  
  2437.       instrumentHandle
  2438.  
  2439.           Variable Type       ViSession
  2440.  
  2441.           This control accepts the Instrument Handle returned by the Initialize
  2442.           function to select the desired instrument driver session.
  2443.           
  2444.           Default Value:  None
  2445.  
  2446.       SRQCondition
  2447.  
  2448.           Variable Type       ViInt16
  2449.  
  2450.           This control sets the condition at which the service request (SRQ)
  2451.           bit will be set.
  2452.           
  2453.           Valid Range:
  2454.           0 - OPC. Operation complete. (Default Value)
  2455.           1 - Out Of Limit. Data out of Limit.
  2456.           2 - Statistics Done.
  2457.           
  2458.           
  2459.  
  2460.   Return Value
  2461.  
  2462.           This control contains the status code returned by the function call.
  2463.           
  2464.           Status Codes:
  2465.           
  2466.           Status    Description
  2467.           -------------------------------------------------
  2468.                  0  No error (the call was successful).
  2469.           
  2470.           3FFF0005  The specified termination character was read.
  2471.           3FFF0006  The specified number of bytes was read.
  2472.           
  2473.           BFFC0002  Parameter 2 (SRQ_Condition) out of range.
  2474.           
  2475.           BFFF0000  Miscellaneous or system error occurred.
  2476.           BFFF000E  Invalid session handle.
  2477.           BFFF0015  Timeout occurred before operation could complete.
  2478.           BFFF0034  Violation of raw write protocol occurred.
  2479.           BFFF0035  Violation of raw read protocol occurred.
  2480.           BFFF0036  Device reported an output protocol error.
  2481.           BFFF0037  Device reported an input protocol error.
  2482.           BFFF0038  Bus error occurred during transfer.
  2483.           BFFF003A  Invalid setup (attributes are not consistent).
  2484.           BFFF005F  No listeners condition was detected.
  2485.           BFFF0060  This interface is not the controller in charge.
  2486.           BFFF0067  Operation is not supported on this session.
  2487.           
  2488. ________________________________________________________________________________
  2489.  
  2490.   hp5313xa_statisticsRes
  2491.  
  2492.       ViStatus hp5313xa_statisticsRes (ViSession instrumentHandle, ViReal64 *mean,
  2493.                                        ViReal64 *stdDeviation, ViReal64 *maximum,
  2494.                                        ViReal64 *minimum);
  2495.  
  2496.   Purpose
  2497.  
  2498.       This function reports the statistical results of a block of measurements.
  2499.  
  2500.   Parameter List
  2501.  
  2502.       instrumentHandle
  2503.  
  2504.           Variable Type       ViSession
  2505.  
  2506.           This control accepts the Instrument Handle returned by the Initialize
  2507.           function to select the desired instrument driver session.
  2508.           
  2509.           Default Value:  None
  2510.  
  2511.       mean
  2512.  
  2513.           Variable Type       ViReal64 (passed by reference)
  2514.  
  2515.           This control returns the Mean value of the statistical results.
  2516.           
  2517.           Notes:
  2518.           
  2519.           (1) The unit of the measured value is as follows: Seconds(Time),
  2520.           Hertz(Frequency), Volts(Voltage), or None.
  2521.  
  2522.       stdDeviation
  2523.  
  2524.           Variable Type       ViReal64 (passed by reference)
  2525.  
  2526.           This control returns the Std deviation value of the statistical
  2527.           results.
  2528.           
  2529.           Notes:
  2530.           The unit of the measured value is as follows: Seconds(Time),
  2531.           Hertz(Frequency), Volts(Voltage), or None.
  2532.  
  2533.       maximum
  2534.  
  2535.           Variable Type       ViReal64 (passed by reference)
  2536.  
  2537.           This control returns the Maximum value of the statistical results.
  2538.           
  2539.           Notes:
  2540.           
  2541.           (1) The unit of the measured value is as follows: Seconds(Time),
  2542.           Hertz(Frequency), Volts(Voltage), or None.
  2543.  
  2544.       minimum
  2545.  
  2546.           Variable Type       ViReal64 (passed by reference)
  2547.  
  2548.           This control returns the Minimum value of the statistical results.
  2549.           
  2550.           Notes:
  2551.           
  2552.           (1) The unit of the measured value is as follows: Seconds(Time),
  2553.           Hertz(Frequency), Volts(Voltage), or None.
  2554.           
  2555.  
  2556.   Return Value
  2557.  
  2558.           This control contains the status code returned by the function call.
  2559.           
  2560.           Status Codes:
  2561.           
  2562.           Status    Description
  2563.           -------------------------------------------------
  2564.                  0  No error (the call was successful).
  2565.           
  2566.           3FFF0005  The specified termination character was read.
  2567.           3FFF0006  The specified number of bytes was read.
  2568.           3FFF0803  Interpreting the instrument's response.
  2569.           
  2570.           BFFF0000  Miscellaneous or system error occurred.
  2571.           BFFF000E  Invalid session handle.
  2572.           BFFF0015  Timeout occurred before operation could complete.
  2573.           BFFF0034  Violation of raw write protocol occurred.
  2574.           BFFF0035  Violation of raw read protocol occurred.
  2575.           BFFF0036  Device reported an output protocol error.
  2576.           BFFF0037  Device reported an input protocol error.
  2577.           BFFF0038  Bus error occurred during transfer.
  2578.           BFFF003A  Invalid setup (attributes are not consistent).
  2579.           BFFF005F  No listeners condition was detected.
  2580.           BFFF0060  This interface is not the controller in charge.
  2581.           BFFF0067  Operation is not supported on this session.
  2582.           
  2583. ________________________________________________________________________________
  2584.  
  2585.   hp5313xa_strStpMeas
  2586.  
  2587.       ViStatus hp5313xa_strStpMeas (ViSession instrumentHandle, ViInt16 executionMode);
  2588.  
  2589.   Purpose
  2590.  
  2591.       This function controls the initiation and termination of a measurement.
  2592.  
  2593.   Parameter List
  2594.  
  2595.       instrumentHandle
  2596.  
  2597.           Variable Type       ViSession
  2598.  
  2599.           This control accepts the Instrument Handle returned by the Initialize
  2600.           function to select the desired instrument driver session.
  2601.           
  2602.           Default Value:  None
  2603.  
  2604.       executionMode
  2605.  
  2606.           Variable Type       ViInt16
  2607.  
  2608.           This control controls the initiation and termination of a
  2609.           measurement.
  2610.           
  2611.           Valid Range:
  2612.           0 - Initiate Immediate (Default Value)
  2613.           1 - Initiate Continuous On
  2614.           2 - Initiate Continuous Off
  2615.           3 - Abort
  2616.           
  2617.           
  2618.  
  2619.   Return Value
  2620.  
  2621.           This control contains the status code returned by the function call.
  2622.           
  2623.           Status Codes:
  2624.           
  2625.           Status    Description
  2626.           -------------------------------------------------
  2627.                  0  No error (the call was successful).
  2628.           
  2629.           3FFF0005  The specified termination character was read.
  2630.           3FFF0006  The specified number of bytes was read.
  2631.           
  2632.           BFFC0002  Parameter 2 (Execution_Mode) out of range.
  2633.           
  2634.           BFFF0000  Miscellaneous or system error occurred.
  2635.           BFFF000E  Invalid session handle.
  2636.           BFFF0015  Timeout occurred before operation could complete.
  2637.           BFFF0034  Violation of raw write protocol occurred.
  2638.           BFFF0035  Violation of raw read protocol occurred.
  2639.           BFFF0036  Device reported an output protocol error.
  2640.           BFFF0037  Device reported an input protocol error.
  2641.           BFFF0038  Bus error occurred during transfer.
  2642.           BFFF003A  Invalid setup (attributes are not consistent).
  2643.           BFFF005F  No listeners condition was detected.
  2644.           BFFF0060  This interface is not the controller in charge.
  2645.           BFFF0067  Operation is not supported on this session.
  2646.           
  2647. ________________________________________________________________________________
  2648.  
  2649.   hp5313xa_timWidDuty
  2650.  
  2651.       ViStatus hp5313xa_timWidDuty (ViSession instrumentHandle,
  2652.                                     ViInt16 selectfunction, ViBoolean selectArming,
  2653.                                     ViBoolean startSlope);
  2654.  
  2655.   Purpose
  2656.  
  2657.       This function configures the selected function for measurement. It sets
  2658.       the start arming source.
  2659.  
  2660.   Parameter List
  2661.  
  2662.       instrumentHandle
  2663.  
  2664.           Variable Type       ViSession
  2665.  
  2666.           This control accepts the Instrument Handle returned by the Initialize
  2667.           function to select the desired instrument driver session.
  2668.           
  2669.           Default Value:  None
  2670.  
  2671.       selectfunction
  2672.  
  2673.           Variable Type       ViInt16
  2674.  
  2675.           This control selects the function to configure for measurement.
  2676.           
  2677.           Valid Range:
  2678.           0 - Chan 1 Rise Time. (Default Value)
  2679.           1 - Chan 1 Fall Time.
  2680.           2 - Chan 1 Positive Width.
  2681.           3 - Chan 1 Negative Width.
  2682.           4 - Chan 1 Dutycycle
  2683.           
  2684.           
  2685.  
  2686.       selectArming
  2687.  
  2688.           Variable Type       ViBoolean
  2689.  
  2690.           This control selects the arming mode for the measurement process.
  2691.           
  2692.           Valid Range:
  2693.           VI_OFF (0) - Auto (Default)
  2694.           VI_ON  (1) - Extern
  2695.           
  2696.           Notes:
  2697.           Below each arming mode is followed by a brief description:
  2698.           VI_OFF (0) - Auto.
  2699.           Makes individual measurements as fast as possible.
  2700.           
  2701.           VI_ON  (1) - Extern.
  2702.           An external signal at Ext Arm (rear-panel) is used to start a
  2703.           measurement.
  2704.  
  2705.       startSlope
  2706.  
  2707.           Variable Type       ViBoolean
  2708.  
  2709.           This control sets the slope of the external start arm signal used in
  2710.           external arming for measurements.
  2711.           
  2712.           Valid Range:
  2713.           VI_OFF (0) - Negative
  2714.           VI_ON  (1) - Positive (Default Value)
  2715.  
  2716.   Return Value
  2717.  
  2718.           This control contains the status code returned by the function call.
  2719.           
  2720.           Status Codes:
  2721.           
  2722.           Status    Description
  2723.           -------------------------------------------------
  2724.                  0  No error (the call was successful).
  2725.           
  2726.           3FFF0005  The specified termination character was read.
  2727.           3FFF0006  The specified number of bytes was read.
  2728.           
  2729.           BFFC0002  Parameter 2 (Select_function) out of range.
  2730.           BFFC0003  Parameter 3 (Select_Arming) out of range.
  2731.           BFFC0004  Parameter 4 (Start_Slope) out of range.
  2732.           
  2733.           BFFF0000  Miscellaneous or system error occurred.
  2734.           BFFF000E  Invalid session handle.
  2735.           BFFF0015  Timeout occurred before operation could complete.
  2736.           BFFF0034  Violation of raw write protocol occurred.
  2737.           BFFF0035  Violation of raw read protocol occurred.
  2738.           BFFF0036  Device reported an output protocol error.
  2739.           BFFF0037  Device reported an input protocol error.
  2740.           BFFF0038  Bus error occurred during transfer.
  2741.           BFFF003A  Invalid setup (attributes are not consistent).
  2742.           BFFF005F  No listeners condition was detected.
  2743.           BFFF0060  This interface is not the controller in charge.
  2744.           BFFF0067  Operation is not supported on this session.
  2745.           
  2746. ________________________________________________________________________________
  2747.  
  2748.   hp5313xa_timeInterval
  2749.  
  2750.       ViStatus hp5313xa_timeInterval (ViSession instrumentHandle,
  2751.                                       ViBoolean startArming, ViBoolean startSlope,
  2752.                                       ViBoolean stop, ViReal64 timeValue,
  2753.                                       ViBoolean commonMode);
  2754.  
  2755.   Purpose
  2756.  
  2757.       This function configures the Time Interval function for measurement.  It
  2758.       sets the start/stop arming sources.
  2759.       
  2760.  
  2761.   Parameter List
  2762.  
  2763.       instrumentHandle
  2764.  
  2765.           Variable Type       ViSession
  2766.  
  2767.           This control accepts the Instrument Handle returned by the Initialize
  2768.           function to select the desired instrument driver session.
  2769.           
  2770.           Default Value:  None
  2771.  
  2772.       startArming
  2773.  
  2774.           Variable Type       ViBoolean
  2775.  
  2776.           This control selects the arming mode for the measurement process.
  2777.           
  2778.           Valid Range:
  2779.           VI_OFF (0) - Immediate (Default)
  2780.           VI_ON  (1) - Extern
  2781.           
  2782.           Notes:
  2783.           Below each arming mode is followed by a brief description:
  2784.           
  2785.           VI_OFF (0) - Immediate.
  2786.           Makes individual measurements as fast as possible.
  2787.           
  2788.           VI_ON  (1) - Extern.
  2789.           An external signal at Ext Arm (rear-panel) is used to start a
  2790.           measurement.
  2791.  
  2792.       startSlope
  2793.  
  2794.           Variable Type       ViBoolean
  2795.  
  2796.           This control sets the slope of the external start arm signal used in
  2797.           external arming for measurements.
  2798.           
  2799.           Valid Range:
  2800.           VI_OFF (0) - Negative
  2801.           VI_ON  (1) - Positive (Default Value)
  2802.           
  2803.           
  2804.  
  2805.       stop
  2806.  
  2807.           Variable Type       ViBoolean
  2808.  
  2809.           This control sets the stop arm for Time Interval measurements.
  2810.           
  2811.           Valid Range:
  2812.           VI_OFF (0) - Immediate. (Default Value)
  2813.           VI_ON  (1) - Timer. Set the time value.
  2814.           
  2815.           
  2816.  
  2817.       timeValue
  2818.  
  2819.           Variable Type       ViReal64
  2820.  
  2821.           This control specifies the gate time used with
  2822.                           the stop time arming.
  2823.           
  2824.           Valid Range:
  2825.           Short gate time: 100E-5 to 999E-5 Seconds.
  2826.           Long gate time: 10E-3 to 10.000 Seconds.
  2827.           
  2828.           Default Value: 10.0
  2829.  
  2830.       commonMode
  2831.  
  2832.           Variable Type       ViBoolean
  2833.  
  2834.           This control enables or disables (separates) the common mode used in
  2835.           time interval measurements.
  2836.           
  2837.           Valid Range:
  2838.           VI_OFF (0) - Disable
  2839.           VI_ON  (1) - Enable (Default Value)
  2840.  
  2841.   Return Value
  2842.  
  2843.           This control contains the status code returned by the function call.
  2844.           
  2845.           Status Codes:
  2846.           
  2847.           Status    Description
  2848.           -------------------------------------------------
  2849.                  0  No error (the call was successful).
  2850.           
  2851.           3FFF0005  The specified termination character was read.
  2852.           3FFF0006  The specified number of bytes was read.
  2853.           
  2854.           BFFC0002  Parameter 2 (Start_Arming) out of range.
  2855.           BFFC0003  Parameter 3 (Start_Slope) out of range.
  2856.           BFFC0004  Parameter 4 (Stop) out of range.
  2857.           BFFC0005  Parameter 5 (Time_Value) out of range.
  2858.           BFFC0006  Parameter 6 (Common_Mode) out of range.
  2859.           
  2860.           BFFF0000  Miscellaneous or system error occurred.
  2861.           BFFF000E  Invalid session handle.
  2862.           BFFF0015  Timeout occurred before operation could complete.
  2863.           BFFF0034  Violation of raw write protocol occurred.
  2864.           BFFF0035  Violation of raw read protocol occurred.
  2865.           BFFF0036  Device reported an output protocol error.
  2866.           BFFF0037  Device reported an input protocol error.
  2867.           BFFF0038  Bus error occurred during transfer.
  2868.           BFFF003A  Invalid setup (attributes are not consistent).
  2869.           BFFF005F  No listeners condition was detected.
  2870.           BFFF0060  This interface is not the controller in charge.
  2871.           BFFF0067  Operation is not supported on this session.
  2872.           
  2873. ________________________________________________________________________________
  2874.  
  2875.   hp5313xa_totalize
  2876.  
  2877.       ViStatus hp5313xa_totalize (ViSession instrumentHandle, ViInt16 selectArming,
  2878.                                   ViReal64 timeValue, ViBoolean startSlope,
  2879.                                   ViInt16 stop);
  2880.  
  2881.   Purpose
  2882.  
  2883.       This function configures the Totalize function for measurement. It sets
  2884.       the start/stop arming sources.
  2885.  
  2886.   Parameter List
  2887.  
  2888.       instrumentHandle
  2889.  
  2890.           Variable Type       ViSession
  2891.  
  2892.           This control accepts the Instrument Handle returned by the Initialize
  2893.           function to select the desired instrument driver session.
  2894.           
  2895.           Default Value:  None
  2896.  
  2897.       selectArming
  2898.  
  2899.           Variable Type       ViInt16
  2900.  
  2901.           This control selects the arming mode for the measurement process.
  2902.           
  2903.           Valid Range:
  2904.           0 - Auto (Default)
  2905.           1 - Time
  2906.           2 - Extern
  2907.           
  2908.           Notes:
  2909.           Below each arming mode is followed by a brief description:
  2910.           
  2911.           0 - Auto.   Makes individual measurements as fast as possible.
  2912.           
  2913.           1 - Time.   Sets the length of time for which the signal is
  2914.                       measured.
  2915.           
  2916.           2 - Extern. An external signal at Ext Arm (rear-panel) is used
  2917.                       to start a measurement.
  2918.  
  2919.       timeValue
  2920.  
  2921.           Variable Type       ViReal64
  2922.  
  2923.           This control specifies the gate time used with time arming.
  2924.           
  2925.           Valid Range:
  2926.           100E-5 to 999E-5 Seconds.(Short gate time) or 10E-3 to 1000.000
  2927.           Seconds. (Long gate time)
  2928.           
  2929.           Default Value: 10.0  Sec
  2930.  
  2931.       startSlope
  2932.  
  2933.           Variable Type       ViBoolean
  2934.  
  2935.           This control sets the slope of the external start arm signal used in
  2936.           external arming for measurements.
  2937.           
  2938.           Valid Range:
  2939.           VI_OFF (0) - Negative
  2940.           VI_ON  (1) - Positive (Default Value)
  2941.           
  2942.           
  2943.  
  2944.       stop
  2945.  
  2946.           Variable Type       ViInt16
  2947.  
  2948.           This control sets the external stop arm signal used in external
  2949.           arming for measurements.
  2950.           
  2951.           Valid Range:
  2952.           0 - Negative Slope.(Default Value)
  2953.           1 - Positive Slope.
  2954.           2 - Timer. Set the time value.
  2955.           
  2956.           
  2957.  
  2958.   Return Value
  2959.  
  2960.           This control contains the status code returned by the function call.
  2961.           
  2962.           Status Codes:
  2963.           
  2964.           Status    Description
  2965.           -------------------------------------------------
  2966.                  0  No error (the call was successful).
  2967.           
  2968.           3FFF0005  The specified termination character was read.
  2969.           3FFF0006  The specified number of bytes was read.
  2970.           
  2971.           BFFC0002  Parameter 2 (Select_Arming) out of range.
  2972.           BFFC0003  Parameter 3 (Time_Value) out of range.
  2973.           BFFC0004  Parameter 4 (Start_Slope) out of range.
  2974.           BFFC0005  Parameter 5 (Stop) out of range.
  2975.           BFFF0000  Miscellaneous or system error occurred.
  2976.           BFFF000E  Invalid session handle.
  2977.           BFFF0015  Timeout occurred before operation could complete.
  2978.           BFFF0034  Violation of raw write protocol occurred.
  2979.           BFFF0035  Violation of raw read protocol occurred.
  2980.           BFFF0036  Device reported an output protocol error.
  2981.           BFFF0037  Device reported an input protocol error.
  2982.           BFFF0038  Bus error occurred during transfer.
  2983.           BFFF003A  Invalid setup (attributes are not consistent).
  2984.           BFFF005F  No listeners condition was detected.
  2985.           BFFF0060  This interface is not the controller in charge.
  2986.           BFFF0067  Operation is not supported on this session.
  2987.           
  2988. ________________________________________________________________________________
  2989.  
  2990.   hp5313xa_trigSens
  2991.  
  2992.       ViStatus hp5313xa_trigSens (ViSession instrumentHandle, ViInt16 channel,
  2993.                                   ViBoolean triggerLevel, ViReal64 voltageLevel,
  2994.                                   ViBoolean attenuation, ViBoolean triggerSlope,
  2995.                                   ViInt16 sensitivity);
  2996.  
  2997.   Purpose
  2998.  
  2999.       This function sets the Trigger Level/Sensitivity for the selected
  3000.       channel.
  3001.  
  3002.   Parameter List
  3003.  
  3004.       instrumentHandle
  3005.  
  3006.           Variable Type       ViSession
  3007.  
  3008.           This control accepts the Instrument Handle returned by the Initialize
  3009.           function to select the desired instrument driver session.
  3010.           
  3011.           Default Value:  None
  3012.  
  3013.       channel
  3014.  
  3015.           Variable Type       ViInt16
  3016.  
  3017.           This control selects the channel for which to set the trigger and
  3018.           sensitivity.
  3019.           
  3020.           Valid Range:
  3021.           1 - Channel 1 (Default Value)
  3022.           2 - Channel 2
  3023.  
  3024.       triggerLevel
  3025.  
  3026.           Variable Type       ViBoolean
  3027.  
  3028.           This control selects the type of triggering level for the selected
  3029.           channel.
  3030.           
  3031.           Valid Range:
  3032.           VI_OFF (0) - Relative
  3033.           VI_ON  (1) - Absolute (Default Value)
  3034.           
  3035.  
  3036.       voltageLevel
  3037.  
  3038.           Variable Type       ViReal64
  3039.  
  3040.           This control specifies the center of the hystersis window when the
  3041.           absolute triggering level is used. If relative triggering is
  3042.           selected, this control specifies the percentage of the peak-to-peak
  3043.           range of the signal at which the instrument auto triggers.
  3044.           
  3045.           Valid Range:
  3046.           Dependent upon the trigger level's type:
  3047.           (1) Absolute
  3048.           Dependent upon the attenuation:
  3049.           1X: -5.125 to +5.125 Volts
  3050.           10X: -51.25 t0 +51.25 Volts
  3051.           
  3052.           (2) Relative
  3053.           0% to 100% (Integers Only)
  3054.           
  3055.           Default Value: 0.0
  3056.  
  3057.       attenuation
  3058.  
  3059.           Variable Type       ViBoolean
  3060.  
  3061.           This control selects the input attenuation for the selected channel.
  3062.           
  3063.           Valid Range:
  3064.           VI_OFF (0) - 1X
  3065.           VI_ON  (1) - 10X (Default Value)
  3066.  
  3067.       triggerSlope
  3068.  
  3069.           Variable Type       ViBoolean
  3070.  
  3071.           This control sets which edge of the input signal will be considered
  3072.           an event for Frequency, Frequency Ratio, Time Interval, Totalize, and
  3073.           Phase measurements.
  3074.           
  3075.           Valid Range:
  3076.           VI_OFF (0) - Negative
  3077.           VI_ON  (1) - Positive (Default Value)
  3078.  
  3079.       sensitivity
  3080.  
  3081.           Variable Type       ViInt16
  3082.  
  3083.           This control sets the size of the hysteresis window as a percentage
  3084.           of allowable hysteresis.
  3085.           
  3086.           Valid Range:
  3087.           0 - Low (0%) (Default Value)
  3088.           1 - Medium (50%)
  3089.           2 - High (100%)
  3090.           
  3091.  
  3092.   Return Value
  3093.  
  3094.           This control contains the status code returned by the function call.
  3095.           
  3096.           Status Codes:
  3097.           
  3098.           Status    Description
  3099.           -------------------------------------------------
  3100.                  0  No error (the call was successful).
  3101.           
  3102.           3FFF0005  The specified termination character was read.
  3103.           3FFF0006  The specified number of bytes was read.
  3104.           
  3105.           BFFC0002  Parameter 2 (Channel) out of range.
  3106.           BFFC0003  Parameter 3 (Trigger_Level) out of range.
  3107.           BFFC0004  Parameter 4 (Voltage_Level) out of range.
  3108.           BFFC0005  Parameter 5 (Attenuation) out of range.
  3109.           BFFC0006  Parameter 6 (Trigger_Slope) out of range.
  3110.           BFFC0007  Parameter 7 (Sensitivity) out of range.
  3111.           
  3112.           BFFF0000  Miscellaneous or system error occurred.
  3113.           BFFF000E  Invalid session handle.
  3114.           BFFF0015  Timeout occurred before operation could complete.
  3115.           BFFF0034  Violation of raw write protocol occurred.
  3116.           BFFF0035  Violation of raw read protocol occurred.
  3117.           BFFF0036  Device reported an output protocol error.
  3118.           BFFF0037  Device reported an input protocol error.
  3119.           BFFF0038  Bus error occurred during transfer.
  3120.           BFFF003A  Invalid setup (attributes are not consistent).
  3121.           BFFF005F  No listeners condition was detected.
  3122.           BFFF0060  This interface is not the controller in charge.
  3123.           BFFF0067  Operation is not supported on this session.
  3124.           
  3125. ________________________________________________________________________________
  3126.  
  3127.   hp5313xa_waitSrq
  3128.  
  3129.       ViStatus hp5313xa_waitSrq (ViSession instrumentHandle);
  3130.  
  3131.   Purpose
  3132.  
  3133.       This function waits until the SRQ bit is set.
  3134.       
  3135.  
  3136.   Parameter List
  3137.  
  3138.       instrumentHandle
  3139.  
  3140.           Variable Type       ViSession
  3141.  
  3142.           This control accepts the Instrument Handle returned by the Initialize
  3143.           function to select the desired instrument driver session.
  3144.           
  3145.           Default Value:  None
  3146.  
  3147.   Return Value
  3148.  
  3149.           This control contains the status code returned by the function call.
  3150.           
  3151.           Status Codes:
  3152.           
  3153.           Status    Description
  3154.           -------------------------------------------------
  3155.                  0  No error (the call was successful).
  3156.           
  3157.           3FFF0005  The specified termination character was read.
  3158.           3FFF0006  The specified number of bytes was read.
  3159.           
  3160.           BFFF0000  Miscellaneous or system error occurred.
  3161.           BFFF000E  Invalid session handle.
  3162.           BFFF0015  Timeout occurred before operation could complete.
  3163.           BFFF0034  Violation of raw write protocol occurred.
  3164.           BFFF0035  Violation of raw read protocol occurred.
  3165.           BFFF0036  Device reported an output protocol error.
  3166.           BFFF0037  Device reported an input protocol error.
  3167.           BFFF0038  Bus error occurred during transfer.
  3168.           BFFF003A  Invalid setup (attributes are not consistent).
  3169.           BFFF005F  No listeners condition was detected.
  3170.           BFFF0060  This interface is not the controller in charge.
  3171.           BFFF0067  Operation is not supported on this session.
  3172.           
  3173. ________________________________________________________________________________
  3174.  
  3175.   hp5313xa_writeInstrData
  3176.  
  3177.       ViStatus hp5313xa_writeInstrData (ViSession instrumentHandle,
  3178.                                         ViString writeBuffer);
  3179.  
  3180.   Purpose
  3181.  
  3182.       This function writes commands and queries to the instrument to modify
  3183.       parameters and query device settings.
  3184.  
  3185.   Parameter List
  3186.  
  3187.       instrumentHandle
  3188.  
  3189.           Variable Type       ViSession
  3190.  
  3191.           This control accepts the Instrument Handle returned by the Initialize
  3192.           function to select the desired instrument driver session.
  3193.           
  3194.           Default Value:  None
  3195.  
  3196.       writeBuffer
  3197.  
  3198.           Variable Type       ViString
  3199.  
  3200.           The user can use this control to send common commands and queries to
  3201.           the instrument. This control can also be used to write any valid
  3202.           command to the instrument.
  3203.           
  3204.           Default Value:  "*RST"
  3205.           
  3206.           Notes:
  3207.           
  3208.           (1) The command or query to be sent to the instrument may be a
  3209.           literal enclosed in double quotes i.e. "*RST" or may be contained in
  3210.           a variable of type string.
  3211.           
  3212.  
  3213.   Return Value
  3214.  
  3215.           This control contains the status code returned by the function call.
  3216.           
  3217.           Status Codes:
  3218.           
  3219.           Status    Description
  3220.           -------------------------------------------------
  3221.                  0  No error (the call was successful).
  3222.           
  3223.           3FFF0005  The specified termination character was read.
  3224.           3FFF0006  The specified number of bytes was read.
  3225.           
  3226.           BFFF0000  Miscellaneous or system error occurred.
  3227.           BFFF000E  Invalid session handle.
  3228.           BFFF0015  Timeout occurred before operation could complete.
  3229.           BFFF0034  Violation of raw write protocol occurred.
  3230.           BFFF0035  Violation of raw read protocol occurred.
  3231.           BFFF0036  Device reported an output protocol error.
  3232.           BFFF0037  Device reported an input protocol error.
  3233.           BFFF0038  Bus error occurred during transfer.
  3234.           BFFF003A  Invalid setup (attributes are not consistent).
  3235.           BFFF005F  No listeners condition was detected.
  3236.           BFFF0060  This interface is not the controller in charge.
  3237.           BFFF0067  Operation is not supported on this session.
  3238.           
  3239.