
1260-164AH/BH User Manual
Publication No. 980824-164AH/BH Rev. A
Module Operation 3-6
Astronics Test Systems
1260-164 Example
Code
#include <visa.h>
/* This example shows a 1260-01T at logical address 16 and a VXI/MXI */
/* interface */
#define RI1260_01_DESC
"VXI::16"
/* For a GPIB-VXI interface, and a logical address of 77 */
/* the descriptor would be: "GPIB-VXI::77" */
/* this example shows a 1260-164 with module address 7, port 1,
and write data of 0xAA */
#define MOD_ADDR_164 7
#define PORT_NUMBER 1
#define DATA_ITEM
0xAA
void example_operate_1260_164(void)
{
ViUInt8 creg_val;
ViBusAddress portA_addr, offset;
ViSession hdl1260;
/* VISA handle to the 1260-01T */
ViSession hdlRM;
/* VISA handle to the resource manager */
ViStatus error;
/* VISA error code */
/* open the resource manager */
/* this must be done once in application program */
error = viOpenDefaultRM (&hdlRM);
if (error < 0) {
/* error handling code goes here */
}
/* get a handle for the 1260-01T */
error = viOpen (hdlRM, RI1260_01_DESC, VI_NULL,VI_NULL, &hdl1260);
if (error < 0) {
/* error handling code goes here */
}
/* form the offset for control register 0 */
/* note that the base A24 Address for the 1260-01T */
/* is already accounted for by VISA calls viIn8() and */
/* viOut8() */
Summary of Contents for RACAL INSTRUMENTS 1260-164AH
Page 5: ......