Example 4

Example 4

This example demonstrates a WML menu structure that creates two menu screens and a link to a command file – “config.nrd” – that contains a ZPL command that will cause the unit to print a configuration label.
1→
2→
3→
4→
5→
6→
7→
8→
9→
10→
11→
12→
13→
14→
15→
16→
17→
18→
19→
20→
21→
22→
23→
24→
25→
26→
27→
28→
29→
30→
<wml>
<display>
<card id="main" title="" ontimer="#main" alerts="on">
<timer value="50"></timer>
<p>Baud: $(comm.baud)</p>
<br/>
<p>AP: $(wlan.essid)</p>
<p> </p><br/>
<p> </p><br/>
<p> <a href="#system">Firmware</a></p>
</card>
<card id="system" title="" ontimer="#main" alerts="on">
<timer value="50"></timer>
<p>Firmware:</p><br/>
<p>$(appl.name)</p><br/>
<p>ZBI State:</p><br/>
<p>$(zbi.
key)</p><br/>
<p><a href="#main">Main</a>
<a href="#config">Config</a></p>
</card>
<card id="config" title="" ontimer="#main" alerts="on">
<timer value="50"></timer>
<p>Printing </p><br/>
<p> Config Label...</p><br/>
<p></p><br/>
<p>Please wait...</p><br/>
<setvar name="file.run" value="e:config.nrd"/>
</card>
</display>
</wml>
18
19
<p><a href="#main">Main</a>
<a href="#config">Config</a></p>
  • Defines two links, positioned next to each other - to the "main" and "config" WML cards
27
<setvar name="file.run" value="e:config.nrd"/>
  • Defines that the SGD command
    "file.run"
    should be used on the
    "e:config.nrd"
    file.
  • In this instance, the
    "e:config.nrd"
    file contains a single ZPL command -
    "~wc"
    .
In use, these WML menus look similar to this:
GX series printers can display four lines of text. If you are using a GX series printer, remove one line of text from each “card” to use this example.