Test controller, commands page
This is the initial page when starting the software, it is the main control center for configuring devices, controlling scripts and logging.
What is on the screen
Log & program editor window
General control buttons
Load and run
Clean & Clear
What is on the screen
In the above picture I have labelled the different areas of this page, in the following I will go more into details about each area. There are functions hidden everywhere.
This is used to select different pages, many of them will present the data read from the devices, other is used for different types of configuration for TestController.
When starting the program not all pages are accessible, this is because they are for presenting logged data and no logged data are present when starting TestController. Either some data must be logged or loaded on the Table page, then all the pages will be enabled.
Log & program editor window
This window will show information, this is found devices when connecting, it is a log of commands issues from the command line and answers from devices, output from other parts of the program and it is possible to edit in the window.
All output will start with two semicolons ;;, this allows the program to remove them. This is useful if the commands must be reissued. Pressing the "Run" button will do that. The commands can also be saved with the "Save" button, again the lines starting with ;; will be removed first.
When writing scripts use a single ; for comments and they will not be removed.
If the cursor is placed at the bottom of the log windows data, it will scroll when new data arrives.
Another way to reuse commands is to store them as a hot key, mark one or more command and right click to do that. Hot keys are automatic saved and will also work next time the program is started. Pressing a hot key will perform the assigned commands directly through the command processor, they are not typed on the command line, but will be shown in the log window.
The popup menu has a option to generate scripts.
To make a layout script first open all the desired popups and place everything on the screen as desired. The select one of the "Generate Script, Layout" options to generate the actual script.
The generated script will recreate the same layout again.
A layout script contains loaded devices, math channels, scales and popups. It is possible to edit it and only use some part of it. Missing devices will not be loaded and Mode/Setup for them will not be shown (Some serial port devices are assumed to be present if the serial port exist).
When saving a generated script to menu it is possible to use ; for submenus.
The script files are saved in ...\Documents\TestController\ScriptLibrary and can be edited, but that will first be used from next restart of TestController.
Before a layout script is run.
After the layout script is run (A right click and a left click).
Using the #alignGrid command before saving the layout can get a pixel perfect placement.
When using the Mode and Setup popups to control devices all the used commands are recorded in a list, use the "Generate Script, Mode & Setup" to convert that list into a script that will automatic do the configuration.
It is possible to edit in the generated script.
A script saved as menu may look like this:
The #scriptMenu defines the menu title of the script, use ; between items to get submenus.
#scriptHandles K34470 KEL103 QPX1200
The #autorun means the script will run directly when selected, if removed the script will be loaded into the log window.
The #scriptHandles is a filter, i.e. this script will only be shown in the popupmenu when the 3 listed handles are present (The script would not work without these devices loaded).
The #InitColumns forces a check of current mode on all devices with mode selection.
The #SyncPopups will secure that all open popups reflect the current state of the devices.
Each loaded device is assigned a handle that is used as label and when accessing it. The handle for the currently selected device is shown here. SCPI Commands on the command line goes to this device as default.
There are two ways to change the selected device:
Right clicking on the area will show a list of currently loaded devices and a new one can be selected.
Typing the handle followed by a colon on the command line will select that device.
After loading devices the handle will always point to a valid device.
The command line is one way to control devices and activate functions, but most can be done without using it.
The command line handles 3 groups of commands:
It is also possible to change the selected device by writing the handle followed by a :, this can be placed before a SCPI command, then the command will go to that device and the selected device will change.
- SCPI commands to the loaded devices
- System commands, they all starts with #
- Calculations, starting a line with = will pass the rest of the line to the calculator (The calculator can do more than calculations).
Pressing INS or right clicking the mouse will show possible commands for system commands and some devices. It is possible to select one and press Enter. If there is only one possibility it will directly be entered on the command line, without waiting for Enter.
The command line has a history buffer, it can be access with up/down arrows and it can be searched by type part of a old command and then using Shift up/down arrow. A search term will be active until the command line is modified.
Down is from oldest entry, up is from newest entry in the history.
All SCPI devices have their own set of SCPI commands and they can be typed here (In many cases the Mode and Setup buttons are easier ways to do it).
For non-SCPI devices there will be a simplified SCPI drive in TestController, it will process the command and translate it to something the device understands. These commands are nearly always documented in the help window below the command line.
The typed commands will mostly be transmitted literally to the connected SCPI device (or driver), but it is possible to use parentheses () to invoke the calculator. I.e. "xxx (2*5)" will be translated to "xxx 10" before being transmitted. The expressions in the brackets can contain function calls and variables.
After using a #calc command these command will go to the calculations until the next # is encountered.
These commands all starts with a # sign, there is a variety of commands, see the help window for specific documentation (Type a # sign at the start of the command line).
This group also contains script constructs (Conditional, loops and delays), these will be ignore when given from the command line.
Some of these commands may require the device handle as parameter, using Ctrl-INS will insert the handle for the currently selected device.
The number of parameters is important for these command because the function varies with the number of parameters. Spaces are used as delimiter between parameters, but it is possible to include a space in a parameter by using quotes around it, i.e. "a a" is one parameter.
Using parentheses around a parameter will usually invoke the calculator for that parameter.
Starting the command line with a = sign will pass the rest of the line to the calculators. It works in a similar way to the calculator window, but there is one significant difference: Before calculating an expression all devices are enquired for there current value and variables are created (Same name as used on "Current values" page). These can be used in the expression.
The result from the expression is shown in the default format, that may be decimal number, integer or string format, depending on the result, this is similar to the Str format in the calculator.
The help window will show help for the command line, it has help for all commands that starts with # and for most non-SCPI devices. It can also show help for SCPI devices, but I have not made any help files for them.
Help files are not included with the software, but is downloaded from my web server, when a help file has been used once a local backup will be create and used if the computer is offline.
The help text is dynamically adjusted when typing on the command line. Double clicking a command in the help window will copy the command to the command line.
General control buttons
These buttons is for general control, that is running scripts, saving/cleaning the log window, logging data and shut everything off.
This button will use the commands in the log window as a program and run them. When running scripts it is possible to use loops, conditional and waits.
In many cases it will change to a Restore button when doing this. Pressing this button will restore the log window to the contents from before run was pressed. Using Clean or Clear will cancel the restore and change the button to Run again.
Load and run
Load a file and optionally run it as a program. This can be used to configure TestController for a specific task and/or to control a test.
Usually the file is loaded into the log window, but if it start with "#autorun" it is not loaded into the log window, but is directly run and the output will be shown in the log window.
Save the log window. This can save in 3 different formats:
- Log: Exactly what is in the log window, file will be saved with .log extension.
- Script: Remove all ;; comments before saving in a .txt file.
- Menu: Remove all ;; comments then save in script library directory and add to popup menu in log window.
Clean & Clear
The clean function removes any lines starting with ;; this means any output of commands, but not the commands.
The clear function clears the log window for any contents.
When a program is running the abort button is red and pressing it will cancel the program.
Start logging data to the table, this will also enable Chart, Histogram and Range pages. Each time a logging is started it will clear the table and start a new data set. To save a data set it must be saved from the Table page before a new log is started.
The "Direct to disk" option will open a window where the time interval can be typed and a save file selected. While saving to disk the table is still updated with the same data. When logging for a long time a memory optimizer will kick in and remove some samples from the table (The table will contain between 10000 and 30000 samples), this will not affect the logging to disk.
When pressing the button a menu of time intervals is shown, usually "1 sec" is a good value (Not all devices will work at the faster rates).
TestController will reduce the logging speed if the devices has problems keeping up.
While logging the button is used to stop logging again.
This button is a fast way to stop all devices. It will not affect logging, but will stop running programs.
The stop means:
- Power supplies turns output power off
- Electronic load stops loading.
- Generators turns output off.
- Multimeters are not affected.
This button hides a menu to control a variety of popups and functions related to popups. When right clicking on the button all Mode and Setup popups are brought to the front.
Here is the menu, the 3 first entries is for opening the Mode & Setup menus for all loaded devices at once.
It is also possible to lock or unlock a "on top" state that forces the windows to always be in front.
In addition there are a couple of popups with other functions:
- List all connected devices: A list of the currently connected devices including serial number and software version, it can easily be copied to a report.
- Calculator: A general purpose calculator, it is similar to using "=" on the command line, but do not fetch data from connected devices and it can show the result in a couple of numeric formats.
- Timer: A general purpose timer for manually timing events. It has a mark button that will list time in the log window.
- Test interface: For testing the scripting interface defined for a device, it can also generate a script that will configure the device to its current settings (This will depend on how complete the interface is implemented).
- Readout: Large digit readout with more or less transparent background, can be placed anywhere on the screen.
These buttons control the selected device (I.e. the device shown in front of the command line). These buttons are only available if they are defined in the device definition.
This button is typically used on bench multimeters to change mode. It can only be used when not logging.
The popup shown will depend on the actual meters and how it is defined.
This popup is for configuring devices, it is defined in the definition file. There are very large variations on the look of this popup.
The general idea is that this popup, at least, covers the most common configurations on the device.
These settings can be used while logging.