Quantum Data 881 User Manual page 532

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

Advertisement

Chapter 15 Script SDK
504
return true;
}
double test2 = sc.InputFloat( "Test Float:" );
printf("\nThe input of Test Float is: %f\n", test2);
// =========================================================
// Demonstration of QDLcd associated APIs, WaitForButtonPress()
// =========================================================
if (sc.Canceled()) {
return true;
}
sc.ClearLCD();
sc.Write(1, 1, "Test WaitForButtonPress()");
sc.Write(0, 3, "<-Yes4");
sc.Write(16, 3, "No->");
QDKeyId pressedKey = sc.WaitForKeyPress(5000);
if ( pressedKey == QD_KEY_LEFT_4 ) {
printf("\nUser pressed \"Yes\"\n");
}
else if ( pressedKey == QD_KEY_RIGHT_4 ) {
printf("\nUser pressed \"No\"\n");
}
else
{
printf("\nPressed Invalid Key\n");
}
// =========================================================
// Demonstration of GetUIntResponse()
// =========================================================
if (sc.Canceled()) {
return true;
}
sc.SetCmdName("DPTR?");
//sc.ClearScreen();
sc.Exec();
if (sc.Succeed()) {
printf("\nTest GetUIntResponse(): The return value of command
\"%s\" is %d\n", sc.GetCmdName(), sc.GetUIntResponse());
}
else
printf("\nCommand execution failed.\n");
// =========================================================
// Demonstration of GetIntResponse()
// =========================================================
if (sc.Canceled()) {
return true;
}
sc.SetCmdName("HRES?");
//sc.ClearScreen();
sc.Exec();
if (sc.Succeed()) {
printf("\nTest GetIntResponse(): The return value of command
\"%s\" is %d\n", sc.GetCmdName(), sc.GetIntResponse());
}

Advertisement

Table of Contents
loading

This manual is also suitable for:

882

Table of Contents