command line functions

Command Line Interface for running LabWindows software

Up to now, we have used the LabWindows graphical user interface, written by Bernd, to run our MCM tests. It is a handy pushbutton-style program which has served us very well so far. However, for upcoming tests, where we have to collect large amounts of data with different running modes, sitting in front of the screen pushing buttons for hours is no longer feasible.

I have therefore written a parser so that all the functions which appear on the various pushbutton menus are accessible via a command line. Command files can be executed with the EXEC command. In this way, we can write long kumac-style command files to run our tests.

The command line interface is itself a LabWindows program which accepts the commands listed below. It communicates to other programs via 3 16-bit registers, which are polled by the other programs. The first register contains the command code number, and the other two are used for (optional) arguments.

The table below lists the commands available to the command line interface of the MCM control software.

Eventually, this command line interface will be extended to cover all other LabWindows programs used for the MCM tests and the full chain test.

table 1: MCM commands
code command arguments function, comments
1 xilinx-receive port channel set xil port number and channel
2 serial-receive port set serial in port
3 serial-send port set serial out port
4 xilinx-file filename define xilinx file name
5

download [n] download n times, default 1
10 data-pattern 1/0 force data packet to be 1,2,3,...
11 reset-enable 1/0 enable internal reset
12 select1 1/0 -
13 select0 1/0 -
14 raw-mode 1/0 1 or 2 packets
15 cal-enable 1/0 internal cal pulse (should be tied to all AMU corr_sel bits)
16 ir1 1/0 reset frequency
17 ir0 1/0 reset frequency
18

sstring-file filename load string from file. Files can include 'all-0', 'all-1', 'test-1010' etc
22 vthresh voltage these are passed as int(V*1000 ) for example 4.234V is passed as 4234
23 vmid voltage
24 vgate voltage
25 vfb voltage
26

vcal voltage
30 sum-disable bit pattern the 32-bit argument is split over 2 16-bit words
31 disc-tweak-a bit pattern
32 disc-tweak-b bit pattern
33 preamp-disable bit pattern
34

cal-channel bit pattern
40 spy channel this sets MUX-OE, MUX-HIZ, and addresses for both spy lines simultaneously. 0=off.
41 amu-vref voltage same as for AMU-ADC voltages
42 amu-vcorr voltage
43

amu-iref current
50 send [n] save, send and latch the serial string n times. Default 1
51 lvl1 [n] send n triggers, default 1
52 run-mode 1/0 set in run mode
53 mcm-reset - -
54 integr-reset - -
55 resynch-reset - -
56 init-reset - -
57 bench-cal - -
58 phenix-cal - -
59

extra - -
63 exit - -
64 dump-string - write out the serial string to the log/data file(s)
65 exec filename process commands in the given file

Last update 17 Aug 98 Hubert van Hecke