HP VXI manual Chapter Programming the Status System

Page 21

/* send command */ iprintf(id, "%s\n", cmd);

/* check cmd for a ’?’, if found assume it is a query */ for(idx=0; idx<strlen(cmd); idx++)

if( ’?’ == cmd[idx])

{

/* wait up to 1 minute for srq handler */ if( 0 != iwaithdlr(60000))

{

printf("ERROR: Failed to process Query\n");

}

break;

}

}/* while - there are commands to send */ /* remove the handler */

ionsrq( id, 0);

/* close the session */

printf("\nClosing Instrument at %s\n", addr); iclose(id);

}

Chapter 2

Programming the Status System 21

Image 21
Contents Contents Comments Example QUEStionableEVENt? Printing History This Page Intentionally Left Blank Introduction Introduction Chapter General Status Register Model About this ChapterAn Example Sequence Condition Register Transition Filter Event RegisterPage Required Status Groups Status Byte Register Status Byte Bit Definitions Standard Event GroupStandard Operation Status Group Questionable Data Group Status System Programming Examples Handling SRQs Using MAV to Determine When Data is AvailableExample Program SRQ Icloseid Example Program Deverrmask Qryerrmask Chapter Programming the Status System Programming the Status System Chapter Command Reference OPERationENABle STATusOPERation CONDition? PRESet OPERationENABle?OPERationEVENt? QUEStionable CONDition?QUEStionableENABle QUEStionableENABle?QUEStionableEVENt? STATQUESEVEN? CLS Common Command ReferenceESE mask EMC?ESE? ESR?IDN? LMC?LRN? OPC? OPCPMC RSTSRE? SRE maskSTB? TST?WAI Command Reference Chapter