Command line options for the Multi Channel oscilloscope software

The Multi Channel oscilloscope software can be started with command line parameters. This allows to let the Multi Channel oscilloscope software perform additional tasks when started, like setting a window size and position or opening a specific setfile. When specific measurements are often performed, for each specific measurement a shortcut can be made with the required command line parameters.

When Allow multiple instances is turned on in the settings, each launch of the Multi Channel oscilloscope software will open a new instance. Any command line parameter is used in that instance. When Allow multiple instances is turned off (default), the first launch will start the Multi Channel oscilloscope software. While this instance of the Multi Channel oscilloscope software is running, any next launch will result in the command line parameters being passed to it and executed there. Several command line options work best when Allow multiple instances is turned off.

The following applies to the command line parameters:

  • command line options are case-insensitive
  • values between ( ) are mandatory
  • values between [ ] are optional
  • values after = are the defaults.
  • if the option string contains spaces, it must be escaped with quotes
  • multiple command line options can be used in a single call.

Below is a list of the available command line options for the Multi Channel oscilloscope software.

Batch converting multiple saved measurements

When batch converting multiple saved measurements to other file formats or creating images from them, each time starting the Multi Channel oscilloscope software and after the conversion/creation closing the Multi Channel oscilloscope software again, can be time consuming. A command is added that will start the Multi Channel oscilloscope software without creating the user interface, perform the required task and then close the Multi Channel oscilloscope software again.

Command Description
-console run the Multi Channel oscilloscope software without showing its user interface

Loading setfiles

Command Description
-d setfile.tps Load desktop from setfile
-sa setfile.tps Load first scope settings from setfile into all scopes
-sn setfile.tps Load first scope settings from setfile into the nth scope
-ga setfile.tps Load first function generator settings from setfile into all function generators
-gn setfile.tps Load first function generator settings from setfile into the nth function generator
-l setfile.tps Load setfile. Auto detect file type
-l objectfile.tpo Load objects from objectfile.

When loading object files (.tpo), the objects in the file are added to the current setup. If the setup already contained objects, the existing objects remain present, the new objects are added at the bottom of the list. To clear the existing object prior to loading the new objects, add the command -ClearObjects to the command line parameters. That will first remove all objects prior to loading the new ones.

Saving data and/or settings

Command Description
-SaveAll setfile[.tps][,NoData] Save desktop to setfile
-SaveScp setfile[.tps][,Index=1][,NoData] Save scope number index to setfile
-SaveObj setfile[.tps][,Index=1][,NoData] Save object number index to setfile
-SaveGen setfile[.tps][,Index=1][,NoData] Save generator number index to setfile
-SaveImg filename(.png|.bmp|.gif|.emf|.jpg)[,Index=1][,w=800][,h=600][,Scheme=Image standard] Save screenshot of graph number index to filename

Exporting instrument or object data

It is possible to export the data contained in scope channels to several data types. To identify the scope to export from, its index in the object tree is used. The first scope has index number 1.

It is also possible to export the data contained in objects other than scope channels to several data types. To identify the object to export from, its index in the object tree is used. The first object has index number 1.

The resulting file will be the same as when the instrument or object data would have been exported from within the user interface.

Exporting to a binary file

-SaveScp datafile.bin[,option=value][,option=value]
-SaveObj datafile.bin[,option=value][,option=value]

Option Values Description
Index integer number > 0 Scope/Object number, default = 1
DataType INT8|INT16|INT32|INT64|
UINT8|UINT16|UINT32|UINT64|
FLOAT32|FLOAT64
Data type to be used

For more details on exporting to the binary file format and the available options, refer to the binary file description.

Exporting to an ASCII file

-SaveScp datafile.csv[,option=value][,option=value]...
-SaveObj datafile.csv[,option=value][,option=value]...

Option Values Description
Index integer number > 0 Scope/Object number, default = 1
ColumnSeparator SemiColon|Comma|Tab|Space Column separator to use
DecimalSeparator Dot|Comma Decimal separator to use
SampleNumber 0|1 Boolean indicating if sample number is stored
RelativeTime 0|1 Boolean indicating if relative time is stored
NumberFormat General|Fixed|Exponent Number format to be used
Precision 1|2|...|8|...|14|15 Number of significant digits
Digits 0|1|2|...|14|15 (Minimum) number of digits in fraction or exponent

For more details on exporting to the ASCII CSV file format and the available options, refer to the ASCII CSV file description.

Exporting to a JSON file

-SaveScp datafile.json[,option=value][,option=value]...
-SaveObj datafile.json[,option=value][,option=value]...

Option Values Description
Index integer number > 0 Scope/Object number, default = 1
Settings 0|1 Boolean indicating if settings are stored
Data 0|1 Boolean indicating if data is stored

For more details on exporting to the JSON file format and the available options, refer to the JSON file description.

Exporting to a Matlab file

-SaveScp datafile.mat[,option=value]
-SaveObj datafile.mat[,option=value]

Option Values Description
Index integer number > 0 Scope/Object number, default = 1

For more details on exporting to the Matlab file format, refer to the Matlab file description.

Exporting to a WAVE audio file

-SaveScp datafile.wav[,option=value][,option=value]...
-SaveObj datafile.wav[,option=value][,option=value]...

Option Values Description
Index integer number > 0 Scope/Object number, default = 1
MaxResolution 8|16|32|64 Maximum resolution to be used
MaxChannelCount 1|2|3|...|31|32 Maximum number of channels to be saved
SampleFrequency -2|-1|n > 0 Sample frequency to be used:
-2 : use the nearest standard sample frequency
      (11025, 22050, 44100, 48000 or 96000)
-1 : use the original sample frequency of the data
 n : use sample frequency n

For more details on exporting to the WAVE audio file format and the available options, refer to the WAVE audio file description.

Window size and position

Command Description
-MWS FULL Maximize main window
-MWS width,height Set main window width1 and height1
-MWS left,top,width,height Set main window at position left1, top1 with width1 and height1

1. This value may be specified in pixels or percent (add a % sign to the value).

Examples

MultiChannel -d d:\source.tps
Load desktop from d:\source.tps

MultiChannel -SaveAll d:\dest
Save desktop to d:\dest.tps, including data

MultiChannel -SaveScp d:\scope1,Index=1,nodata
Save scope number 1 to d:\scope1.tps, without data

MultiChannel.exe -ClearObjects -l d:\source.tpo -SaveObj d:\dest.csv
Clear the current objects, load object(s) from d:\source.tpo and export the first object to d:\dest.csv

MultiChannel -console -l d:\source.tps -SaveScp d:\dest.mat
Convert scope data from first scope in d:\source.tps to d:\dest.mat without showing the user interface

MultiChannel -SaveImg "d:\with space.png,Index=2"
Save graph number 2 to d:\with space.png, with default color scheme, 800 pixels wide, 600 pixels high

MultiChannel -d d:\source.tps -SaveAll d:\dest_nodata,nodata -SaveImg d:\dest.png -SaveImg "d:\with space.png,Index=2"
Load desktop from d:\source.tps, then save the desktop to d:\dest_nodata.tps without data, save an image of graph 1 in d:\dest.png with default color scheme and default dimensions and save an image of graph 2 in d:\with space.png.

Batch processing multiple files

When multiple TPS files need to be processed, e.g. convert them to CSV files to use them in third party software, using two batch files can perform this task.

The first batch file, ConvertOne.bat, does the actual processing. In this example it will convert a TPS file to a CSV file, using the default CSV options. You can adapt this batch file to meet your requirements.

@echo off

echo Converting %1.tps to %1.csv

MultiChannel.exe -console -l %1.tps -SaveScp %1.csv

The second batch file, ConvertAll.bat will call the first batch file for each TPS file found in the current drectory.

@echo off

rem Loop through all files in this directory and process the .TPS files

for /f %%a IN ('dir /b *.tps') do call ConvertOne.bat %%~na %%~xa

pause