PWLDialog

Opens the dialog box shown below allowing the entry of X-Y pairs intended for the definition of piece-wise linear devices.

Arguments

Number Type Compulsory Default Description

1

string

Yes

X-Y Pairs

2

string

No

Options

3

real array

No

Initial conidtion / value states

Argument 1

X-Y Pairs to initialise box. The above example would be displayed after a call to:

Show pwldialog(['0','0.5','1','1.5','2','2.5'])

Argument 2

Up to seven element string array to define box labels:

Index Description
0 Box caption. Default: 'Define PWL Source'
1 Label for X-Values column. Default: 'Time'
2 Label for Y-Values column. Default: 'Value'
3 Initial condition mode. May be:
'none' Default setting. No initial condition displayed
'segment' Initial segment. Initial condition value is an integer with a minimum value of 1 and a maximum value equal to the number of rows. (Used for some SIMPLIS PWL devices). Use initial condition check box will not be shown.
'continuous' Initial condition is a non-integral number. Use initial condition check box will be shown.
4 Help context id. Default: '-1' (no help button shown)
5 Minimum number of segments. Default = '1'
6 Maximum number of segments. Default = '255'
7 Symmetric definition flag. '1' enables symmetric definition mode. Default '0'.

Argument 3

Real array with two elements. First element is the initial state of the 'Use initial condition' check box. Second element is the initial value of the initial condition edit box.

This argument is ignored if initial condition mode is set to 'none'.

Returns

Return type: string array

The function returns the X-Y Pairs entered by the user in the same format as for argument 1. If initial conditions were enabled on input, there will be two additional elements at the end. The first will be either 'true' or 'false' to indicate whether 'Use initial condition' was checked and the second is the value of the initial condition.