beautypg.com

Programming a script, Programming a script -2 – Measurement Computing DASYLab User Manual User Manual

Page 56

background image

Chapter 6

Programming Your Own Modules

6-2

|

dasylab.com

predefined settings. For example, you cannot load a script for an output
module into an input module later on.

In the script module you now specify the type of data to be processed.
Double-click the module and select Channel Properties. In the channel
properties dialog box you specify which data the script module accepts at its
inputs and which data the module outputs. If the module processes only
continuous time data, you do not need to make any settings. If the module
processes spectral data or histogram data, or if the data has gaps or data
blocks that differ in length, you must change the settings. The channel
properties impact all data channels of the module. Like all DASYLab
modules, the script module can contain up to 16 data channels which you can
specify in the script together with the block size and the sampling rate of the
data.

DASYLab saves the channel properties as binary data in the script module.
However, you can view and change the channel properties while you develop
your module. As soon as you export the module and include it in the
application, DASYLab closes this access.

Like all DASYLab modules, the script module has a channel bar where you
select the data channels before a measurement. The settings are on two tabs:
Channel for the channel settings and Module for the module specific
settings. The first time you open the module dialog box, you find the three
parameters

a

,

b

, and

c

on the two tabs . These parameters are placeholders

for the settings which you still have to define in the script.

Programming a Script

You program the functionality of the script module in a script. Click Edit in
the module dialog box to create a script on several tabs. Each tab represents
a specific module function which the module calls at specific events such as
the start of the measurement or opening the module dialog box. The
following overview is a list of the individual module functions:

info, pvar — These module functions provide variables which specify
the module properties. In info you initialize the variables which
DASYLab saves with the worksheet. In pvar you create temporary
variables which are only available during the measurement.

DlgInit, DlgEvent, DlgOK, DlgCancel — These module functions
specify the settings in the module dialog box. In DlgInit you specify the
settings for the module and for each channel. In DlgEvent you define

This manual is related to the following products: