HP E1418A Service Manual page 21

8/16-channel d/a converter
Hide thumbs Also See for E1418A:
Table of Contents

Advertisement

Configuration Example
/** FUNCTION PROTOTYPES **/
void main (void);
void err_handler(ViSession vi, ViStatus x);
void sys_err(ViSession resource);
/** GLOBAL **/
ViStatus err;
ViSession defaultRM, cmd, dac, dmm;
int num_chan;
void main (void)
{
int i,result = {0},config [6]={0},num_chan = {0};
err=viPrintf(dac, "DIAG:CONF?\n");
if(err VI_SUCCESS) err_handler(dac, err);
err=viScanf(dac, "%,6d", &config);
if(err VI_SUCCESS) err_handler(dac, err);
sys_err (dac);
Chapter 3
For example, if the following six integers are returned, the module has the
configuration indicated.
Integer
Decimal
Value
1st
7
2nd
7
3rd
-1
4th
-1
5th
-1
6th
-1
The following program segment demonstrates how to read the module
identification string and the configuration. The configuration integers are bit
manipulated using the C operator for bit shifting
result = result <<1
(a one bit shift to the left). The code shown in this example can be obtained
from the file prftest.c on the examples disk provided with this manual.
/* VTL error routine
/* Checks for SCPI programming errors */
/* request module configuration */
/* returns six integers
/* SCPI error check
*/
Configuration
No expansion board installed
(Only channels 1 through 8)
No Terminal Module installed or
unknown terminal module installed
All channels are non-isolated
All channels are voltage output channels
All channel outputs are disabled
(all output relays are open)
All channels are output mode
programmable
Operating Information 21
*/
*/

Advertisement

Table of Contents
loading

Table of Contents