Download NorthTek
Transcript
The content of this document is proprietary. No part of this document shall be reproduced nor shall any use or disclosure of the information contained herein
be made without written authorization from Sparton Electronics.
In this example, whitespace is represented by the literal b character. The cr at the end of the line prints
a carriage return.
5.1.2.6 Dealing with Arrays
NPL allows setting of arrays. The syntax is
arrayVariable array[ {starting_index} {ending_index} {vstarting vs+1 .. vending}
]array set
5.1.2.7 Advanced Applications
This section describes several advanced applications. To run these programs:
1) Copy the text below to a plain text editor (i.e. Notepad, do NOT use Word,etc.).
2) Save the file to some known location on the computer.
3) Start a terminal program such as Hyperterminal or TeraTerm. (TeraTerm is recommended if
technical support is needed.)
4) Configure the terminal program for 115200,8N1. Add 5 milliseconds line delay to the serial port
configuration (Hyperterminal : >File->Properties->Settings Tab->ASCII Setup, TeraTerm: Setup>SerialPort). Make sure the new lines are setup for CR.
5) Use the file transfer option to send the text file to the compass. (HyperTerminal: Transfer->Send
Text File, TeraTerm: File->SendFile.)
6) Scroll back through the download and look for “Huh?”. This is NorthTek’s response to something
it can’t parse or execute. Not having the 5 msec line delay is a common cause. The “Huh?”
response is generally on the offending line and often prints out the offending command.
7) Run the program according to the instructions for each program.
8) When done, unload the program according to the instructions for each program.
5.1.2.7.1
Game
This application plays a simple game. Make sure that the terminal program is set to VT100 mode. After
downloading, to run this program enter “go<CR>”, and follow the commands. To unload this program
enter “forget signon<CR>”.
// War games
forget signon
: signon
cr
." _
_ _
"
." | |__
___| | | ___ "
." | '_ \ / _ \ | |/ _ \ "
." | | | | __/ | | (_) |"
." |_| |_|\___|_|_|\___/ "
;
cr
cr
cr
cr
cr
: game?
." Would you like to play a game?" cr
." 1) Marketing Bingo " cr
." 2) Development Sorry " cr
130-7546-001, Rev A
23