7. How to create your own Measurement routines
In this section the creation of measurement routines is being described. To create
Measurement routines, you will need a Text editor. There is a text editor on the plusoptiX
R09 installed, too. All scripts which already installed are written with this editor.
7.1 How does it work?
The measurement routines have to be stored on the USB Key. After plugged in the USB Key
it will be automatically mounted to the directory /home/plusoptix/plusoptix/Video/.
On this USB key the device looks for a special file which contain the control of the
measurement.
7.2 Using qemacs
The Editor on the system is qemacs. Here are the basic steps described which are needed to
create new files and edit existing files. But qemacs is a very powerful tool. If you need some
more help using qemacs please refer to http://bellard.org/qemacs/qe-doc.html.
Here are the basic steps:
Step 1: Press "
ALT" + "F8" simultaneously. A "Service Menu" appears
Step 2: Choose "Xterm". A command window will open. This is a linux bash shell.
Step 3: Type in cd /home/plusoptix/plusoptix/Video followed by enter to change the directory to the
plugged USB Key.
Step 4: To create a new file type in qemacs <newfile.xxx>, to edit an existing file type in qemacs
<existingfile.xxx>.
Step 5: After editing press "Ctrl-x Ctrl-s" to save the changes.
Step 6: You can close this file with "Ctrl-x Ctrl-c".
7.3 Create the command set for the measurement
The *.pox file is the control file of the measurement.
The known instructions are in the following table:
Instruction
Meaning
#<comment>
Comments
+ <button_name>
User interaction
StartCamera
Start Camera
StartMeasure
Start of the
measurement
StopGrabbing
Stop of
measurement.
Send
Send an
<command>
instruction
delay <time in
waits until the
ms>
next send
command
Notes
If a line begins with the # sign all behind this sign is a
comment and is ignored by the measurement program. Please
use it. It makes the measurement program more readable.
On this interaction the measurement program waits before it
goes on. So + StartCam waits for clicking the "Start camera"
button on the user interface.
Values for command: StartCam (Button "Start Camera");
StartMeasure (Button "Start"); StopMeasure (Button "Stop")
This command starts the camera. After that command you can
see pictures on the Monitor. But the measurement is not
started yet.
This command starts the measurement. The measured values
will be directly transferred to the logfile.
This command stops the Measurement.
This instruction sends a command directly to the motor
control. There will be no answer back or is being ignored.
This instruction changes the time between the send
commands. It has no effect for the other commands.
Page 24 of 34
Need help?
Do you have a question about the PowerRef 3 and is the answer not in the manual?