Quantum Data 881 User Manual page 554

Hide thumbs Also See for 881:
Table of Contents

Advertisement

apndflt.cpp
176
Chapter 15 Script SDK
This example shows how to add a floating point numeric value to a command string using
the Append function and also demonstrates writing to the 882 front panel display.
#include <stdio.h>
#include <QDScriptContext.h>
bool Script_apndflt( QDScriptContext& sc )
{
// For RGB: step the analog video signal swing from 0.1 volts
// to 1.0 volts in steps of 0.10 volts, pausing at each level
double aswing;
// select a safe format, VGA
sc.Exec("FMTL /tffs0/Library/Formats/DMT0660.xml");
// use this selected format
sc.Exec ("FMTU");
// select a colorful image for this example
sc.Exec("IMGL /Cache0/Images/colorbar.img");
// select RGB video out
sc.Exec("XVSI 9");
// enable RGB video
sc.Exec("AVST 2");
// apply the above image and interface selections
sc.Exec("ALLU");
// step the analog video signal swing from 0.1 volts to 1.0
// volts in steps of 0.10 volts, pausing at each level
for(aswing=0.10; aswing<1.01; aswing+=0.10)
{
// build the command to set analog video swing
sc.SetCmdName("AVSS");
sc.Append(aswing);
// write the command to the bottom of the front-panel display
sc.Write( 0,3,(char *)sc.GetCmdName() );
// issue the command to set analog video swing
sc.Exec();
// use the selected format parameters
sc.Exec("FMTU");
// pause for 10 seconds at each level
sc.Pause(10000);
// this will cause script to immediately exit if STOP is pressed
if (sc.Canceled())
return true;
}
return true;
}

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

882

Table of Contents