User`s manual
// Call routine to check for AFG errors
check_error("gen_seg (out_commands)");
// Free the allocated memory
free (Wave_seg);
}
//**********************************************************************
void cmd_exe(char *commands[], int length, char *func_tion)
{
int loop;
for (loop = 0; loop < length; loop++)
if(!iprintf(addr, "%s\n", commands[loop]))
time_out(func_tion);
}
//**********************************************************************
void run_query(void)
{
char mem_size[21];
// Query segment memory
if(!ipromptf(addr, "SOUR:LIST1:SEGM:FREE?\n", "%t", mem_size))
time_out("run_query - seg memory");
printf("\nSegment Memory Available/Used: %s", mem_size);
// Query sequence memory
if(!ipromptf(addr, "SOUR:LIST1:SSEQ:FREE?\n", "%t", mem_size))
time_out("run_query - seq memory");
printf("\nSequence Memory Available/Used: %s", mem_size);
}
//**********************************************************************
void rst_clr(void)
{
int into;
// Executes the commands that resets the AFG and clears its error register
if(!ipromptf(addr, "*RST;*OPC?\n", "%i", &into))
time_out("rst_clr - send *RST command");
if(!ipromptf(addr, "*CLS;*OPC?\n", "%i", &into))
time_out("rst_clr - send *CLS command");
}
//**********************************************************************
void check_error(char *func_tion)
{
char into[257];
Continued on Next Page
44 Getting Started Chapter 1