Quantum Data 881 User Manual page 535

Video test instrument
Hide thumbs Also See for 881:
Table of Contents

Advertisement

timinglog.cpp
882 Video Test Instrument User Guide (Rev. A.35)
This example demonstrates the ability to output data to a file. It uses the new functions
related to file output: fopen(); fclose(); fprint().
#include <stdio.h>
#include <QDScriptContext.h>
extern int fopen();
extern int fclose();
extern int fprintf();
// set up delay between timing measurements as 5000 milliseconds
UINT32 delay = 5000;
bool Script_timinglog( QDScriptContext& sc )
{
INT32 num = 1;
// open a text file to write to
FILE* outfile = fopen("/card0/timing_log.txt","w");
fprintf( outfile, "Start of timing analyzer log\n\n" );
fprintf( outfile, "Delay between timing measurements: %d milliseconds\n", delay );
sc.Exec("DATE?");
fprintf( outfile, "Measurement start date and time: %s, ", sc.GetResponse());
sc.Exec("TIME?");
fprintf( outfile, "%s\n\n", sc.GetResponse());
fprintf( outfile,
"Number\tSCAN\tPRAT\t\t\tHRAT\tVRAT\t\tHTOT\tHRES\tHSPD\tHSPW\tHSPP\tVTOT\tV
RES\tVSPD\tVSPW\tVSPP\tHVPD\n" );
fprintf( outfile,
"====\t====\t====\t====\t====\t====\t====\t====\t====\t====\t====\t====\t====\n" );
// infinite loop until you press Stop on top right
while (true)
507

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the 881 and is the answer not in the manual?

This manual is also suitable for:

882

Table of Contents