By way of example, Figure 11 shows the MakerPlot
instructions for two horizontal meters. These instructions
were automatically created in the Macro Builder as the
meters were being built. Notice how each instruction sets
itself equal to a variable for the meter’s characteristics:
Top Meter
‘ gau_53 — POCX:MP_GAUGE_HORIZ_OBJ *****
!POBJ MP_GAUGE_HORIZ_OBJ.gau_53=
81.,77.,18.,13., 0, 500,Channel 0,Lt Blue,0,1
!POBJ gau_53.AMin=75
!POBJ gau_53.AMax=200
!POBJ gau_53.Alarm= 0
!POBJ gau_53.Sound=sounds\wwatchalarm.wav
!POBJ gau_53.Value=133
!POBJ gau_53.Decimals=2
Figure 11. Macro Builder listing.
Bottom Meter
‘ gau_53_54 — POCX:MP_GAUGE_HORIZ_OBJ *****
!POBJ MP_GAUGE_HORIZ_OBJ.gau_53_54=
81.,52.,18.,13., 0, 500,Channel 1,Green,1,1
!POBJ gau_53_54.AMin=50
!POBJ gau_53_54.AMax=150
!POBJ gau_53_54.Alarm= 0
!POBJ gau_53.Sound=sounds\beep.wav
!POBJ gau_53_54.Value=51
!POBJ gau_53_54.Decimals=2
Also notice that the meters have no Event Codes
associated with them. The reason is that the meters do
not respond to any external stimulus like a mouse click;
instead, they are affected by the slider switches below
them that change the alarm states from 0 to 1 or vice
versa, depending on the state of the slider switch.
Figure 12. Macro Builder listing for alarm
switches.
Figure 12 shows their Macro Builder listing. I’ve repeated
it here for clarity, highlighting the Event Code that sets the
alarm logic state to equal the logic state of the slider
switch — which are hsw_ 57 (top) and hsw_ 58 (bottom).
most of its functions. There’s also the 200+ page guide.
The Macro Builder
The job of building controls falls to the Object Editor,
and it creates the individual instructions and Events Codes
for each object. In MakerPlot speak, we call these Macros,
which are really nothing more than instruction lists for all
controls on the Interface. It’s the Macro Builder that
organizes and maintains these instruction lists, including all
relevant variables under the Interface’s file name. The
Therefore, when the Alarm slider switch is clicked, it
changes state from 1 to 0 or vice versa, and the
corresponding meter alarm variable is changed
accordingly. Hopefully, it’s making a bit more sense now
as far as how the Event Code in one control affects the
operation of another control:
Top Meter Alarm ON-OFF Switch
Macro Builder is also where changes to an Interface
control — like adding a Text Tip — can occur and be saved.
‘ hsw_57 — POCX:MP_IMGBTN_OBJ *****
!POBJ MP_IMGBTN_OBJ.hsw_57=91.,63.,7.7,6.6,
,0,dev\slide-sw\b_slider_blu_h_0.gif,dev\
slide-sw\b_slider_blu_h_1.gif,ON-OFF,1
!POBJ hsw_57.Sound=sw_slide2.wav
54 June 2014