Figure 2. Y axis up button Event Code. Figure 3. Y axis max value Event Code.
another example of a single instruction Event Code
txYmin = Min textbox value
txymax = Max textbox value
‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘ Reset Y
!SPAN (txtYmin),(txtYmax)
!TMIN 0
!TMAX (txtXmax)
(!SFTU). This one is for the Y Axis “shift plot” up button.
When it’s clicked, the plot line values are shifted up by a
defined amount. These are examples of single instruction
Event Codes, but for many controls this is not enough.
Event Code Variables
As an example of a more complex Event Code, refer
to Figure 3 where we’ve right-clicked on the Y Axis Max
Textbox and brought up the Object Editor listing for it.
Instead of just stand-alone instructions, this Event Code
has variables associated with it, as well:
Notice that two other variables for the X axis (time)
are also introduced. !TMIN 0 sets the starting time of the
plot to zero seconds and !TMAX sets the maximum time
to txtXmax — which happens to be 60 — as that’s what’s
currently entered in the Max textbox. So, when the Reset
Axis button is clicked, the X and Y axes are set to these
variables.
!SPAN (txYmin), (txYmax)
!BELL
Here, tx Ymin represents the value currently in the
Min textbox (0), and tx Ymax is equal to 250 (max). You
can see the 250 value in the Object Editor; this is the
same 250 value in the Max text box in the Y axis menu.
With this particular Interface, the user can manually
adjust these values by keying them into the Min and
Every time a new value is keyed into either the Min
or Max text boxes, the Event Code for each one is
executed and the Y axis is adjusted accordingly.
Its Event Code looks like this:
Figure 4. Reset axis Event Code.