
22
Digitizer Module Set-up
Initial Operation
To program the Digitizer using SCPI, you must select the interface address
and SCPI commands to be used. General information about using SCPI
commands is presented at the beginning of Chapter 3. See the HP 75000
Series C Installation and Getting Started Guide for interface addressing.
Note
This discussion applies only to SCPI (Standard Commands for
Programmable Instruments) programming. The program is written using
VISA (Virtual Instrument Software Architecture) function calls. VISA
allows you to execute on VXI Plug&Play system frameworks that have the
VISA I/O layer installed (visa.h “include” file).
Programming the
Digitizer
Example: Query the Digitizer for its ID and for system errors.
Programming the digitizer using Standard Commands for Programmable
Instruments (SCPI) requires that you select the controller language (e.g., C,
C++, Basic, Visual Basic, etc.), interface address and SCPI commands to be
used. See the “C-Size Installation and Getting Started Guide” (or
equivalent) for interfacing, addressing and controller information.
The following C program verifies communication between the controller,
mainframe and digitizer. It resets the module (*RST), queries the identity
of the module (*IDN?) and queries the module for system errors.
#include <stdio.h>
#include <visa.h>
/*** FUNCTION PROTOTYPE ***/
void err_handler (ViSession vi, ViStatus x);
void main(void)
{
char buf[512] = {0};
#if defined(_BORLANDC_) && !defined(_WIN32_)
_InitEasyWin();
#endif
ViStatus err;
ViSession defaultRM;
ViSession digitizer;
/* Open resource manager and digitizer sessions */
viOpenDefaultRM (&defaultRM);
viOpen(defaultRM, “
GPIB-VXI0::9::40
”,
VI_NULL
,
VI_NULL
, &digitizer);
/* Set the timeout value to 10 seconds. */
viSetAttribute (digitizer, VI_ATTR_TMO_VALUE, 10000);
/* Reset the module. */
err = viPrintf(digitizer, “*RST\n”);
if (err<VI_SUCCESS) err_handler (digitizer, err);
Содержание E1563A
Страница 8: ......
Страница 24: ...24 Digitizer Module Set up ...
Страница 84: ...84 Digitizer Command Reference ...
Страница 110: ...110 ...
Страница 138: ...138 HP E1563A and E1564A Register Based Programming Appendix B ...
Страница 156: ...156 HP E1563A and E1564A Verification Tests ...