Figure 5. Y axis adj Event Code. Figure 6. Meter alarm control Event Code.
Linking Event Code in One Control
to Affect Another Control
Event Code and the related actions. This one is simpler in
that it only has one instruction:
Now, let’s get to the controls that are on our custom
!POBJ gau_53.max = (AMAX)
!POBJ gau_53.min = (AMIN)
!POBJ gau_53.alarm = (hsw_57)
Interface — My_Interface.spm — to show you how they
work. Right-clicking on the top meter’s Y Axis Adj button
brings up the following Event Code:
• !POBJ is the MakerPlot plot object instruction.
• gau_ 53 is the name of the top meter.
• gau_53.alarm is the name of the top meter’s alarm
state (ON or OFF, 1 or 0) which is set equal to the
value of hsw_ 57 as defined by the parenthesis ( ).
• hsw_ 57 is the horizontal switch in question that has
an ON or OFF state.
Let’s break this down. Refer to Figure 5 for illustration.
• !POBJ is the MakerPlot “plot object” instruction.
• gau_ 53 is the name of the top meter.
• gau_53.max is the meter’s maximum range scale
setting.
• gau_ 53.min is the meter’s minimum range scale
setting
• AMAX is the current Y scale maximum set in the Y
axis Max textbox.
These are just a few Event Code examples as each
control is different. However, it’s all logical once you get
the hang of how MakerPlot creates and parses the Event
Codes. The full Event Code instruction set is at
www.makerplot.com at the menu item Control
Instructions. There are many more examples in the
MakerPlot Guide which is also a menu item. Finally, there
is a MakerPlot Video Tutorial in the Maker series entitled
Event Codes, so check this out as well (Maker Videos ➔
• AMIN is the current Y scale minimum set in the Y
axis Min textbox.
Event Codes).
Object Properties
So, when the Y Axis Adj button is clicked, this Event
Code sets the meter range to the AMIN and AMAX values,
which are 0 and 500 in this example. Just as important,
what we’re doing is linking one control (the Y Axis Adj) to
affect another control (the top meter).
Dropdown Menus
If you right-click on nearly any control object, it
will bring up a menu for that control as in Figure 7.
Now, let’s look at how the alarm slider switch controls
the meter’s audio alarm condition. Figure 6 illustrates the
This is for LED 7. Nearly every property for this control
is listed in the dropdown menu, and state 0 is highlighted
52 June 2014