Overhead lights demo MWP


This script demonstrates how to use the overhead lights and the commands needed for the seven lights available - red, green, blue, yellow, cyan, magenta, white - in the MWP unit.

Top

Script explanation

Refer to this script when programming different colours for the overhead lights in the MWP unit.

First part and Action Main:

INCLUDE ZSYS
 
DEFINE NUM_TIMES 2
DEFINE WT 3 
 
ACTION MAIN 
 
 INVOKE(COLOURS,NUM_TIMES)
 
COMPLETE

Action Colours

This is split up into sections to illustrate the code for each colour:

ACTION COLOURS 
 
#RED
 SET(GPO6,1) #RED LED 
 SET(GPO7,0) #GREEN LED 
 SET(GPO8,0) #BLUE LED 
 WAIT(WT) 
 
#GREEN
 SET(GPO6,0)
 SET(GPO7,1)
 SET(GPO8,0)
 WAIT(WT)
 
#BLUE
 SET(GPO6,0)
 SET(GPO7,0)
 SET(GPO8,1)
 WAIT(WT)
 
#YELLOW
 SET(GPO6,1) 
 SET(GPO7,1) 
 SET(GPO8,0) 
 WAIT(WT) 
 
#MAGENTA
 SET(GPO6,1)
 SET(GPO7,0)
 SET(GPO8,1) 
 WAIT(WT)
 
#CYAN
 SET(GPO6,0)
 SET(GPO7,1)
 SET(GPO8,1) 
 WAIT(WT) 
 
#WHITE 
 SET(GPO6,1) 
 SET(GPO7,1) 
 SET(GPO8,1) 
 WAIT(WT) 
 
#OFF 
 SET(GPO6,0)
 SET(GPO7,0)
 SET(GPO8,0) 
 WAIT(WT) 
 
COMPLETE

In the commands above you can see:

  • The command SET(GP06,1) turns the red overhead LED on, and SET(GP06,0) turns the red overhead LED on.
  • The SET commands work similarly for the colours green (GP07) and blue (GP08).
  • Please note that the unit will not read any line of code after #.
Top

Script download

To download the lights_demo_mwp demo script as a .zs file (file type Zantiks software reads), choose the Save File As option in the right-click dialogue box. Clicking on the script name hyperlink will open a read-only version of the script.

Script download: overhead_lights_demo_mwp.zs

Top

Video

The video below demonstrates the overhead lights in a variety of colours as per the demo script outlined on this page.

Video illustrating the overhead light settings on the MWP.