Automated Integrated Solutions
Call Us at (858) 486-0200
Programming

The test programs reside in tables in the AISScpiStudio.db3 locate at C:\Users\<name>\Desktop\ScpiStudio\Databases.

The associated test program scripts are located in:  C:\Users\name>\Desktop\ScpiStudio\Databases\TPScripts\ActiveScripts                                                                                in an number of descriptive subdirectories which should help you find the type of test program you want to create.

**Easy Peasy Programming::** Normally the only items you will modify in any given program are the "INSERT" statements, all the other database entries are never modified, with the exception of the Test Program Name.

So, for example, to add lines to the test program at any given position, you would simply copy the line above and insert the line where you wish.  Now you simply modify the test number and test step, and the commands you wish to add.  After the insert, you must increase the test step of the following lines (unless the next line is not the previous line + one, in other words you could have the test steps N lines apart, and thus insert would be less onerous). In any advent, modify the test step value, if necessary, until the test number changes value.

I suggest you use SqliteExpert as your editor of choice.  They have a free personal version which you can use to edit, modify, save and execute the SRQ source file to create the new test program in the database.

Each test program that is present in the database also has a source file written in SQLite SRQ format.  So to create your own test program, you would select and open a test program.srq file of your choice, from the TPScript subdirectories (as mentioned above), which is most like the test program you wish to write.  A number of SRQ files (test programs) are already present in the script subdirectories.

Thus after opening the SRQ file of your choice, you edit the file with an ascii editor (SqliteExpert) and modify and save it to the name of your test program using the "SAVE AS" menu selection (note**: the first 3 letters must be "AIS").  You normally would save the program you modified to the same directory you retrieved the original source (SRQ) file from.  You would now use the SQLiteExpert execute button to create the test program table in the associated database.  

You now use the SQLiteExpert source file editor to modify existing program contents to your liking, following the ScpiStudio programming manual..  Now press the execute button to update the database with your modifications, and then save the file so that the source file is the true representation of the database table (i.e. test program).  You have now created your first test program.

ScpiStudio creates simple to very complex test programs.  One of the simpless ones is AISHellowWorld.  The source for it follows:

HelloWorld

/****************/
/* */
/* AISHelloWorld.sql */
/* */
/****************/

/* Disable Foreign Keys */
pragma foreign_keys = off;
/* Begin Transaction */
begin transaction;

/* Database [AIScriptPure] */
pragma auto_vacuum=0;
pragma encoding='UTF-8';
pragma page_size=1024;

/* Drop table [main].[AISHelloWorld] */
drop table if exists [main].[AISHelloWorld];

/* Table structure [main].[AISHelloWorld] */
CREATE TABLE [main].[AISHelloWorld] (
[testNum] INTEGER,
[testStep] INTEGER,
[cmdStr] VARCHAR,
[Address] VARCHAR,
[ValueStr] VARCHAR,
[ReplyStr] VARCHAR,
[comment] VARCHAR(255));

/* Data [main].[AISHelloWorld] */
insert into [main].[AISHelloWorld] values(0, 1, 'TESTNAME', 'HelloWorld', '', '', '// AISHelloWorld ');
insert into [main].[AISHelloWorld] values(0, 2, 'TRACEMODE', 'VERBOSE', '', '', '// Data Log - SEQ and Trace ');
insert into [main].[AISHelloWorld] values(0, 3, 'SNGLSTEP', 'OFF', '', '', '// turn OFF single step mode');
insert into [main].[AISHelloWorld] values(0, 4, 'NOHW', 'OFF', '', '', '// HW - simulation off');
insert into [main].[AISHelloWorld] values(0, 5, 'PRINTVAL', 'HELLO WORLD!', '', '', '// output HELLO WORLD! to listbox');
insert into [main].[AISHelloWorld] values(0, 6, 'TESTPASSED', '', '', '', '// note test passed');i
insert into [main].[AISHelloWorld] values(1, 1, 'EXIT', '', '', '', '// EXIT program');
insert into [main].[AISHelloWorld] values(1, 2, 'RETURNTBL', '', '', '', '// return to calling table');


/* Commit Transaction */
commit transaction;

/* Enable Foreign Keys */
pragma foreign_keys = on;

/**************************************************************************************************************************************/

To make insertions of code easier, the following programming snippet from the above AISHelloWorld.sql program is as follows:Note**: all lines are separated by test step increases of two, instead of one as shown above.  The program will  product the same output as the original.

/* Data [main].[AISHelloWorld] */
insert into [main].[AISHelloWorld] values(0, 1, 'TESTNAME', 'HelloWorld', '', '', '// AISHelloWorld ');
insert into [main].[AISHelloWorld] values(0, 3, 'TRACEMODE', 'VERBOSE', '', '', '// Data Log - SEQ and Trace ');
insert into [main].[AISHelloWorld] values(0, 5, 'SNGLSTEP', 'OFF', '', '', '// turn OFF single step mode');
insert into [main].[AISHelloWorld] values(0, 7, 'NOHW', 'OFF', '', '', '// HW - simulation off');
insert into [main].[AISHelloWorld] values(0, 9, 'PRINTVAL', 'HELLO WORLD!', '', '', '// output HELLO WORLD! to listbox');
insert into [main].[AISHelloWorld] values(0, 11, 'TESTPASSED', '', '', '', '// note test passed');i

insert into [main].[AISHelloWorld] values(1, 1, 'EXIT', '', '', '', '// EXIT program');
insert into [main].[AISHelloWorld] values(1, 3, 'RETURNTBL', '', '', '', '// return to calling table');

With this approach, you can insert lines between any of the above lines, and not have to change the test step of the following lines, as long as only one line was added.  The SQL sequencer will execute the next step in the sequence.

All test programs are run from a SQLite database located in Desktop\ScpiStudio\Database\AISScpiStudio.db3) and the Source SRQ files are in Desktop\ScpiStudio\Database\TP\ActiveScripts subdirectories.

All data is data logged in a database table (5000-5009) associated with the IPC control table selected and resides in Desktop\ScpiStudio\Database\DataLog.db3.

The following SRQ source file is a more complex test sequence thatn AISHelloWorld and is indicative of the average complexity of most ScpiStudio test programs although this one is short in length and shows how to perform a fetch reading from a DVM connected to a voltage source.  This particular version use the NHW (noHW) command to perform simulation of the test program so you can view the test sequence and see the waveForm graph to plot the simulated data.  The simulated data stays between the HILIMIT and LOLIMIT found in the test program.  This program was run to create the waveForm image on the HOME page.

Source File of the test program shown on the HOME Page.

AISVisaDM3058ENHW.SQL

/****************/
/* */
/* AISVisaDM3058ENHW.sql */
/* */
/****************/

/* Disable foreign keys */
PRAGMA foreign_keys = 'off';

/* Begin transaction */
BEGIN;

/* Database properties */
PRAGMA auto_vacuum = 0;
PRAGMA encoding = 'UTF-8';
PRAGMA page_size = 1024;

/* Drop table [AISVisaDM3058ENHW] */
DROP TABLE IF EXISTS [main].[AISVisaDM3058ENHW];

/* Table structure [AISVisaDM3058ENHW] */
CREATE TABLE [main].[AISVisaDM3058ENHW](
[testNum] INTEGER,
[testStep] INTEGER,
[cmdStr] VARCHAR,
[Address] VARCHAR,
[ValueStr] VARCHAR,
[ReplyStr] VARCHAR DEFAULT '',
[comment] VARCHAR(255));

/* Table data [AISVisaDM3058ENHW] Record count: 45 */
INSERT INTO [AISVisaDM3058ENHW] VALUES(0, 1, 'TESTNAME', 'DM3058E', '', '', '// AISVisaDM3058ENHW ');
INSERT INTO [AISVisaDM3058ENHW] VALUES(0, 2, 'TRACEMODE', 'VERBOSE', '', '', '// logging mode');
INSERT INTO [AISVisaDM3058ENHW] VALUES(0, 3, 'WAVEFORM', '', 'OFF', '', '// waveForm OFF');
INSERT INTO [AISVisaDM3058ENHW] VALUES(0, 4, 'WAVEFORM', '', 'CLR', '', '// clear waveform data');
INSERT INTO [AISVisaDM3058ENHW] VALUES(0, 5, 'NOHW', 'ON', '', '', '// setup HW or Simulation');

INSERT INTO [AISVisaDM3058ENHW] VALUES(1, 1, 'CALLTBL', 'AIS12VOLT', '', '', '// set HP PwrSup to 12.00v');
INSERT INTO [AISVisaDM3058ENHW] VALUES(1, 3, 'CALL', '10', '', '', '// ID equipment');
INSERT INTO [AISVisaDM3058ENHW] VALUES(1, 4, 'CALL', '15', '', '', '// Setup Plotting');
INSERT INTO [AISVisaDM3058ENHW] VALUES(1, 5, 'CALL', '20', '', '', '// Fetch reading');

INSERT INTO [AISVisaDM3058ENHW] VALUES(2, 1, 'SNGLSTEP', 'OFF', '', '', '// turn off singlestep');
INSERT INTO [AISVisaDM3058ENHW] VALUES(2, 2, 'VISACLOSE', '20', '30583', '', '// close Rigol DVM');
INSERT INTO [AISVisaDM3058ENHW] VALUES(2, 3, 'EXIT', '', '', '', '// exit');
INSERT INTO [AISVisaDM3058ENHW] VALUES(2, 4, 'RETURNTBL', '', '', '', '// return to calling table');

/** Subroutines Follow **/

INSERT INTO [AISVisaDM3058ENHW] VALUES(10, 1, 'VISASSTR', '20', '3058E', '', '// Set VISAStr@20');
INSERT INTO [AISVisaDM3058ENHW] VALUES(10, 2, 'VISASSTRTYPE', '20', 'LIKE', '', '// Set Add - VISAStrType');
INSERT INTO [AISVisaDM3058ENHW] VALUES(10, 3, 'VISAOPN', '20', 'DM3058E', '', '// open VISA device at instrument index');
INSERT INTO [AISVisaDM3058ENHW] VALUES(10, 4, 'VISATIMO', '20', '4000', '', '// Set timeout for instrument index');
INSERT INTO [AISVisaDM3058ENHW] VALUES(10, 5, 'TESTPORT', 'v', '', '', '//Define VISA as the Test Port');
INSERT INTO [AISVisaDM3058ENHW] VALUES(10, 7, 'VISAWRT', '20', '*RST', '', '//send SCPI reset');
INSERT INTO [AISVisaDM3058ENHW] VALUES(10, 8, 'DELAYMS', '3000', '', '', '// wait awhile');
INSERT INTO [AISVisaDM3058ENHW] VALUES(10, 9, 'VISAWRT', '20', ':AUToscale', '', '// automatically adjust the vertical scale horizontal timebase and trigger mode according to the input signal to realize optimum waveform display.');
INSERT INTO [AISVisaDM3058ENHW] VALUES(10, 10, 'VISAWRTQRY', '20', '*IDN?', '', '// get DMV ID at instrument index');
INSERT INTO [AISVisaDM3058ENHW] VALUES(10, 11, 'VISASSTR', '20', '', '', '// set string to null');
INSERT INTO [AISVisaDM3058ENHW] VALUES(10, 12, 'RETURN', '', '', '', '// return to calling table');

INSERT INTO [AISVisaDM3058ENHW] VALUES(15, 1, 'PLOTXLOW', '0', '', '', '// Set xlim low ');
INSERT INTO [AISVisaDM3058ENHW] VALUES(15, 2, 'PLOTXHIGH', '200', '', '', '// Set xlim high ');
INSERT INTO [AISVisaDM3058ENHW] VALUES(15, 3, 'PLOTYLOW', '11.97', '', '', '// Set ylim low ');
INSERT INTO [AISVisaDM3058ENHW] VALUES(15, 4, 'PLOTYHIGH', '12.03', '', '', '// Set ylim high ');
INSERT INTO [AISVisaDM3058ENHW] VALUES(15, 5, 'PLOTXLBL', 'Measurement Count', '', '', '// Set xlabel ');
INSERT INTO [AISVisaDM3058ENHW] VALUES(15, 6, 'PLOTYLBL', 'Voltage', '', '', '// Set ylabel');
INSERT INTO [AISVisaDM3058ENHW] VALUES(15, 7, 'TESTPORT', 'V', '""', '', '//Define VISA as the Test Port');
INSERT INTO [AISVisaDM3058ENHW] VALUES(15, 8, 'WAVEFORM', '', 'ON', '', '// Turn ON Waveform display');
INSERT INTO [AISVisaDM3058ENHW] VALUES(15, 9, 'WAVEFORM', '', 'CLR', '', '// clear waveform data');
INSERT INTO [AISVisaDM3058ENHW] VALUES(15, 10, 'RETURN', '', '', '', '// return from subroutine');

INSERT INTO [AISVisaDM3058ENHW] VALUES(20, 1, 'VISAWRT', '20', 'cmdset agilent', '', '// setup for agilent');
INSERT INTO [AISVisaDM3058ENHW] VALUES(20, 2, 'TESTPORT', 'V', '', '', '//Define VISA as the Test Port');
INSERT INTO [AISVisaDM3058ENHW] VALUES(20, 3, 'VHILIMIT', '20', '12.50', '', '// Set Meas hilimit');
INSERT INTO [AISVisaDM3058ENHW] VALUES(20, 4, 'VLOLIMIT', '20', '11.50', '', '// Set Meas lolimit');
INSERT INTO [AISVisaDM3058ENHW] VALUES(20, 5, 'VISAWRT', '20', 'VOLTage:DC:NPLCycles MIN', '', '// set for fastest reads');
INSERT INTO [AISVisaDM3058ENHW] VALUES(20, 6, 'VISAWRT', '20', 'CONF:VOLT:DC 10, 0.006', '', '// configure the DVM for voltage measurement');
INSERT INTO [AISVisaDM3058ENHW] VALUES(20, 7, 'VISAWRT', '20', 'TRIG:SOUR IMM', '', '// set the source immediate upon trigger');
INSERT INTO [AISVisaDM3058ENHW] VALUES(20, 8, 'VISAWRT', '20', 'SAMPLE:COUNT 101', '', '// sample measurement count');
INSERT INTO [AISVisaDM3058ENHW] VALUES(20, 9, 'VISAWRT', '20', 'INIT', '', '// Initiate the trigger system.');
INSERT INTO [AISVisaDM3058ENHW] VALUES(20, 10, 'VISAFETCH', '20', 'FETCH?', '', '// fetch the measurement');
INSERT INTO [AISVisaDM3058ENHW] VALUES(20, 11, 'RETURN', '', '', '', '// return from subroutine');

/* Commit transaction */
COMMIT;

/* Enable foreign keys */
PRAGMA foreign_keys = 'on';

/*****************************************************************************************************************************************/

A top-level test program is shown below for clarity. Each CALL contains the actual commands and SCPI commands utilized to perform the specific setup, control, or measurement.
 

This is an example of using ScpiStudio to perform a Fetch of multiple reads of an Agilent 34401a DVM, shown on waveFrom Graph, and PASS/FAIL comparison.

 This “SQLite Table Test Program named AISVisaFetchDVM” can be run standalone or called from another more intricate “SQLite Table Test Program”.

 AISVisaFetchDVM.SQL

  1. /* the following table structure and deleting of the table is the same for all AIS test programs
  2.      The only difference is the name of the test program table “AISVisaFetchDVM”
  3. */
  4. /* Disable foreign keys */
  5. PRAGMA foreign_keys = 'off';
  6.  /* Begin transaction */
  7. BEGIN;
  8.  /* Database properties */
  9. PRAGMA auto_vacuum = 0;
  10. PRAGMA encoding = 'UTF-8';
  11. PRAGMA page_size = 1024;
  12.  /* Drop table [AISVisaFetchDVM] */
  13. DROP TABLE IF EXISTS [main].[AISVisaFetchDVM];
  14.  
  15. /****************************/
  16. /* Table structure [AISVisaFetchDVM] */
  17. CREATE TABLE [main].[AISVisaFetchDVM](
  18.     [testNum] VARCHAR NOT NULL ON CONFLICT ROLLBACK DEFAULT "",
  19.     [testStep] VARCHAR NOT NULL ON CONFLICT ROLLBACK DEFAULT "",
  20.     [cmdStr] VARCHAR NOT NULL ON CONFLICT ROLLBACK DEFAULT "",
  21.     [Address] VARCHAR DEFAULT "",
  22.     [ValueStr] VARCHAR DEFAULT "",
  23.     [ReplyStr] VARCHAR DEFAULT '',
  24.     [comment] VARCHAR DEFAULT "");
  25.  
  26. /* Empty table [AISVisaFetchDVM] */
  27. DELETE FROM
  28.     [main].[AISVisaFetchDVM];
  29.  
  30. /***************************************/
  31. /** AIS test program commands begin here **/
  32. //** This first section (test number 0) is a configuration header which is pretty much the same for all test programs **//
  33. /*** the test program information begins after the VALUES SQL command and each entry is following the table structure above.
  34. **/
  35.  
  36. /* Table data [AISVisaFetchDVM] Record count: 49 */
  37. INSERT INTO [AISVisaFetchDVM] VALUES('0', '1', 'HIPERFORM', 'ON', '', '', '//  set High Performance  mode ');
  38. INSERT INTO [AISVisaFetchDVM] VALUES('0', '2', 'TRACEMODE', 'VERBOSE', '', '', '// set log activity level ');
  39. INSERT INTO [AISVisaFetchDVM] VALUES('0', '3', 'TESTNAME', 'FETCHDVM', '', '', '// FetchDVM ');
  40. INSERT INTO [AISVisaFetchDVM] VALUES('0', '5', 'SHUTDOWN', '', '', '', '// no shutdown table ');
  41. INSERT INTO [AISVisaFetchDVM] VALUES('0', '6', 'NOHW', 'OFF', '', '', '// Hardware Active ');
  42. INSERT INTO [AISVisaFetchDVM] VALUES('0', '7', 'SNGLSTEP', 'OFF', '', '', '// turn OFF single step mode');
  43. INSERT INTO [AISVisaFetchDVM] VALUES('0', '8', 'BRANCHENB', 'ON', '', '', '// turn on branching');
  44.  
  45. /* the below section (test number 1) contains the top level calls of the routines or tables required to perform the test */
  46. INSERT INTO [AISVisaFetchDVM] VALUES('1', '1', 'CALL', '10', '', '', '// setup plotting ');
  47. INSERT INTO [AISVisaFetchDVM] VALUES('1', '2', 'CALL', '20', '', '', '// setup HP 6612C @add 05');
  48. INSERT INTO [AISVisaFetchDVM] VALUES('1', '3', 'CALL', '30', '', '', '// perform DVM fetch @add 22');
  49. INSERT INTO [AISVisaFetchDVM] VALUES('1', '4', 'CALL', '40', '', '', '// shutdown and close VISA');
  50.  
  51. /* the below section (test number 2) contains the typical exit from the test program */
  52.  
  53. INSERT INTO [AISVisaFetchDVM] VALUES('2', '1', 'HIPERFORM', 'OFF', '', '', '// Set High Performance  ');
  54. INSERT INTO [AISVisaFetchDVM] VALUES('2', '2', 'TRACEMODE', 'VERBOSE', '', '', '// set log activity level ');
  55. INSERT INTO [AISVisaFetchDVM] VALUES('2', '3', 'EXIT', '', '', '', '// Exit the Test Program');
  56. INSERT INTO [AISVisaFetchDVM] VALUES('2', '4', 'RETURNTBL', '', '', '', '// Return to the Callling Test Program');

  57.  
  58. /* this subroutine (test number 10) performs the plotting configuration */
  59.  
  60. INSERT INTO [AISVisaFetchDVM] VALUES('10', '1', 'PLOTXLOW', '0', '', '', '// Set xlim low ');
  61. INSERT INTO [AISVisaFetchDVM] VALUES('10', '2', 'PLOTXHIGH', '200', '', '', '// Set xlim high ');
  62. INSERT INTO [AISVisaFetchDVM] VALUES('10', '3', 'PLOTYLOW', '11.97', '', '', '// Set ylim low ');
  63. INSERT INTO [AISVisaFetchDVM] VALUES('10', '4', 'PLOTYHIGH', '12.03', '', '', '// Set ylim high ');
  64. INSERT INTO [AISVisaFetchDVM] VALUES('10', '5', 'PLOTXLBL', 'Measurement Count', '', '', '// Set xlabel ');
  65. INSERT INTO [AISVisaFetchDVM] VALUES('10', '6', 'PLOTYLBL', 'Voltage', '', '', '// Set ylabel');
  66. INSERT INTO [AISVisaFetchDVM] VALUES('10', '7', 'TESTPORT', 'V', '""', '', '//Define VISA as the Test Port');
  67. INSERT INTO [AISVisaFetchDVM] VALUES('10', '8', 'WAVEFORM', '', 'ON', '', '// Turn ON Waveform display');
  68. INSERT INTO [AISVisaFetchDVM] VALUES('10', '9', 'WAVEFORM', '', 'CLR', '', '// clear waveform data');
  69. INSERT INTO [AISVisaFetchDVM] VALUES('10', '10', 'RETURN', '', '', '', '// return from subroutine');
  70.  
  71. /* this subroutine (test number 20) turns on the voltage of the power supply */
  72.  
  73. INSERT INTO [AISVisaFetchDVM] VALUES('20', '1', 'VISAOPN', '05', 'PWR05', '', '//Create Instrument for Add 05');
  74. INSERT INTO [AISVisaFetchDVM] VALUES('20', '2', 'VISAWRT', '05', 'VOLT 12.00', '', '//set voltage value');
  75. INSERT INTO [AISVisaFetchDVM] VALUES('20', '3', 'VISAWRT', '05', 'OUTPUT ON', '', '//output the voltage ');
  76. INSERT INTO [AISVisaFetchDVM] VALUES('20', '4', 'RETURN', '', '', '', '// return from subroutine');
  77.  
  78. /* this subroutine performs the FETCH of data from the DVM and branches on Pass/Fail comparisons */
  79.  
  80. INSERT INTO [AISVisaFetchDVM] VALUES('30', '1', 'SNGLSTEP', 'OFF', '', '', '// set snglstep');
  81. INSERT INTO [AISVisaFetchDVM] VALUES('30', '2', 'VISAOPN', '22', 'DVM22', '', '//Open DVM @22');
  82. INSERT INTO [AISVisaFetchDVM] VALUES('30', '3', 'VISASSTR', '22', '', '', '//Define VISA Compare String');
  83. INSERT INTO [AISVisaFetchDVM] VALUES('30', '4', 'VISASSTRTYPE', '22', 'EXACT', '', '//Define VISA String Type');
  84. INSERT INTO [AISVisaFetchDVM] VALUES('30', '5', 'VHILIMIT', '22', '12.50', '', '// Set Meas hilimit');
  85. INSERT INTO [AISVisaFetchDVM] VALUES('30', '6', 'VLOLIMIT', '22', '11.50', '', '// Set Meas lolimit');
  86. INSERT INTO [AISVisaFetchDVM] VALUES('30', '7', 'VISAWRT', '22', 'VOLTage:DC:NPLCycles MIN', '', '// set fastest reads');
  87. INSERT INTO [AISVisaFetchDVM] VALUES('30', '8', 'VISAWRT' , '22', 'CONF:VOLT:DC 10, 0.006', '', '// DVM Meas voltage ');
  88. INSERT INTO [AISVisaFetchDVM] VALUES('30', '9', 'VISAWRT', '22', 'TRIG:SOUR IMM', '', '// source upon trigger');
  89. INSERT INTO [AISVisaFetchDVM] VALUES('30', '10', 'VISAWRT', '22', 'SAMPLE:COUNT 101', '', '// sample meas count');
  90. INSERT INTO [AISVisaFetchDVM] VALUES('30', '11', 'HIPERFORM', 'ON', '', '', '// Set High Performance  ');
  91. INSERT INTO [AISVisaFetchDVM] VALUES('30', '12', 'SBRAPASS', '31', '', '', '// setup pass ');
  92. INSERT INTO [AISVisaFetchDVM] VALUES('30', '13', 'SBRAFAIL', '32', '', '', '// setup fail');
  93. INSERT INTO [AISVisaFetchDVM] VALUES('30', '14', 'VISAWRT', '22', 'INIT', '', '// Initiate the trigger system.');
  94. INSERT INTO [AISVisaFetchDVM] VALUES('30', '15', 'UNITS', 'VOLTS', '', '', '// units are volts');
  95. INSERT INTO [AISVisaFetchDVM] VALUES('30', '16', 'VISAFETCH', '22', 'FETCH?', '', '// fetch the measurement');
  96. INSERT INTO [AISVisaFetchDVM] VALUES('30', '17', 'UNITS', 'UNITLESS', '', '', '// units are volts');
  97. INSERT INTO [AISVisaFetchDVM] VALUES('30', '18', 'RETURN', '', '', '', '// return from subroutine');
  98.  
  99. /* this subroutine setups up the TESTPASSED mode for the test system */
  100.  
  101. INSERT INTO [AISVisaFetchDVM] VALUES('31', '1', 'TESTPASSED', '', '', '', '// note passing');
  102. INSERT INTO [AISVisaFetchDVM] VALUES('31', '2', 'RETURN', '', '', '', '// return from subroutine');
  103.  
  104. /* this subroutine setups up the TESTFAILED mode for the test system */
  105. INSERT INTO [AISVisaFetchDVM] VALUES('32', '1', 'TESTFAILED', '', '', '', '// note failing');
  106. INSERT INTO [AISVisaFetchDVM] VALUES('32', '2', 'RETURN', '', '', '', '// return from subroutine');

  107.  
  108. /* this subroutine shutdowns the systems after completing the measurements */
  109.  
  110. INSERT INTO [AISVisaFetchDVM] VALUES('40', '1', 'VISAWRT', '05', 'VOLT 0.00', '', '// set voltage');
  111. INSERT INTO [AISVisaFetchDVM] VALUES('40', '2', 'VISAWRT', '05', 'OUTPUT OFF', '', '// disable voltage output');
  112. INSERT INTO [AISVisaFetchDVM] VALUES('40', '3', 'VISAWRT', '05', '*RST', '', '// reset HP 6612C.');
  113. INSERT INTO [AISVisaFetchDVM] VALUES('40', '4', 'VISACLOSE', '05', '', '', '//close Add 05');
  114. INSERT INTO [AISVisaFetchDVM] VALUES('40', '5', 'VISAWRT', '22', '*RST', '', '// reset Agilent 34401A.');
  115. INSERT INTO [AISVisaFetchDVM] VALUES('40', '6', 'VISACLOSE', '22', '', '', '//close Add 22');
  116. INSERT INTO [AISVisaFetchDVM] VALUES('40', '7', 'RETURN', '', '', '', '// return from subroutine');
  117.  
  118.  
  119. /* the following is found in every test program SQLite table
  120. /* Commit transaction */
  121. COMMIT;
  122.  
  123. /* Enable foreign keys */
  124. PRAGMA foreign_keys = 'on';