9Programming Examples
iprintf(id, "*RST\n");
/* Write the *IDN? string and send an EOI indicator, then read
*the response into buf. ipromptf(id, "*IDN?\n", "%t", buf); printf("%s\n", buf);
*/
/* AUTOSCALE - This command evaluates all the input signals and
*sets the correct conditions to display all of the active signals.
*/
iprintf(id, ":AUTOSCALE\n");
/* CHANNEL_PROBE - Sets the probe attenuation factor for the
*selected channel. The probe attenuation factor may be from
*0.1 to 1000.
*/
iprintf(id, ":CHAN1:PROBE 10\n");
/* CHANNEL_RANGE - Sets the full scale vertical range in volts.
*The range value is eight times the volts per division.
*/
iprintf(id, ":CHANNEL1:RANGE 8\n");
/* TIME_RANGE - Sets the full scale horizontal time in seconds.
*The range value is ten times the time per division.
*/
iprintf(id, ":TIM:RANG
/* TIME_REFERENCE - Possible values are LEFT and CENTER:
*- LEFT sets the display reference one time division from the
*left.
*- CENTER sets the display reference to the center of the screen.
*/
iprintf(id, ":TIMEBASE:REFERENCE CENTER\n");
/* TRIGGER_SOURCE - Selects the channel that actually produces the
*TV trigger. Any channel can be selected.
*/
iprintf(id, ":TRIGGER:TV:SOURCE CHANNEL1\n");
/* TRIGGER_MODE - Set the trigger mode to, EDGE, GLITch, PATTern,
*CAN, DURation, IIC, LIN, SEQuence, SPI, TV, or USB.
*/
iprintf(id, ":TRIGGER:MODE EDGE\n");
/* TRIGGER_EDGE_SLOPE - Set the slope of the edge for the trigger
*to either POSITIVE or NEGATIVE.
*/
iprintf(id, ":TRIGGER:EDGE:SLOPE POSITIVE\n");
}
/*
*extra
*
*The commands in this function are not executed and are shown for
*reference purposes only. To execute these commands, call this
552 | Agilent InfiniiVision 5000 Series Oscilloscopes Programmer's Reference |