0% found this document useful (0 votes)
32 views

MCS Protocol v3.2.1.2

The document describes an MCS protocol for communication with electronic signs. It details the protocol format, command codes for reading and writing files, and provides examples of using the protocol to send messages and variables to signs.
Copyright
© © All Rights Reserved
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
32 views

MCS Protocol v3.2.1.2

The document describes an MCS protocol for communication with electronic signs. It details the protocol format, command codes for reading and writing files, and provides examples of using the protocol to send messages and variables to signs.
Copyright
© © All Rights Reserved
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 62

MCS Protocol

MCS Protocol.......................................................................................................................... 1
1 Revision History................................................................................................................... 2
2 Introduction.......................................................................................................................... 4
3 Document Conventions....................................................................................................... 5
4 Protocol Overview............................................................................................................... 6
4.1 File Label..................................................................................................................... 6
4.2 Text Files..................................................................................................................... 6
4.3 Variable Files............................................................................................................... 6
4.4 Special Functions......................................................................................................... 8
4.5 Script Files................................................................................................................... 8
4.6 Send or Read File........................................................................................................ 9
5 Base Protocol Format........................................................................................................ 10
5.1 Standard Transmission Packet..................................................................................10
5.2 General Response..................................................................................................... 11
6 Command Code Sections.................................................................................................. 13
6.1 Write to Text File – Code “A”.....................................................................................13
6.2 Write to Variable File – Code “B”...............................................................................28
6.3 Write/Read to Special Function – Code “C”...............................................................28
6.4 Write to Text File without Restart – Code “D”............................................................37
6.5 Write to Script File – Code “E”...................................................................................37
6.6 Advance Open file-Code “F”......................................................................................38
6.7 Advance Close file-Code “G”.....................................................................................40
6.8 Advance Read file-Code “H”......................................................................................42
6.9 Advance Write file-Code “I”........................................................................................44
7 Multiple Line Sign Behavior.............................................................................................. 46
8 Protocol Examples............................................................................................................. 48
8.1 Send a message to all signs using the default text file “A”.........................................48
8.2 Send a scrolling message to all signs........................................................................48
8.3 Setup and send a text file containing a variable file...................................................48
8.3.1 Step 1 – Setup variable memory......................................................................48
8.3.2 Step 2 – Setup text file to show message plus variable file.............................49
8.3.3 Step 3 – Update the variable file with data.......................................................49
8.4 Advanced usage about text alignment.......................................................................50
Appendix A: Standard Color Names...................................................................................51
Appendix B: Script File Format........................................................................................... 52
Comment.................................................................................................................. 52
//this is a comment line............................................................................................. 52
Label......................................................................................................................... 52
Create Window......................................................................................................... 52
Sleep........................................................................................................................ 52
Close Window........................................................................................................... 53
Wait for Window Running Terminated......................................................................53
Unconditional Branch................................................................................................ 53
Set Window Border................................................................................................... 53
Set Window Background.......................................................................................... 54
Set Window Zorder................................................................................................... 54
Play Other Script File................................................................................................ 54
1 Revision History
Revision Date Notes
05/01/2023 Revision 3.2.1.2
add the special command “MS”
add World Clock

01/08/2022 Revision 3.2.1.0


Add new DoubleLine display ^W at Rotate
add the special command “SV” “VV” “VR” and “VS”.
Modify the command “RV” Respone
21/03/2021 Revision 3.2
Modify the command “CF” to “WF”.
25/8/2017 Reversion3.14
 Add new stopwatch format
28/4/2015 Reversion3.03
 General counter with thousand separator
27/1/2015 Reversion3.02
 Add new special command “BF” read the speed of the box’s fan
 Add new special command “BT” read the temperature of the box
 Add new special command “BV” read the voltage of the box
7/6/2011 Revision 3.01
 Add new command “F” to opens the file.
 Add new command “G” to closes the file.
 Add new command “H” to reads the file.
 Add new command “I” to writes the file.
23/12/2010 Revision 3.0
 Add support for new file format: script files. Refer to “4.5 Script Files” and “6.5
Write to Script File – Code E” and “Appendix B: Script File Format” for details.
25/11/2010 Revision 2.64
 Add new command “D” to writes to text file without restart.
20/7/2010 Revision 2.63
 User can specify to display any of the two temperature sensors on the wzp
controller now. Refer to control code ^R for details.
6/4/2010 Revision 2.62
 Add new display effect “SCL0” and “SCL1”. “SCL0” is exactly the same as
“SCL”. “SCL1” just like “SCL”, but will only scroll as many pixels as the
content width.
21/1/2010 Revision 2.61
 Add new command “CCF” to write configurations the sign. User can use this
command to reconfigure the sign such as adjust the display brightness.
30/12/2009 Revision 2.6
 All control codes such as effect control can be used in variable file now. The
only different now is that updating variable is faster than text.
 Add new command “CQR” to quick restart running. When variables are
updated, they will not update immediately, using this command if you need to
quickly restart running.
 Add support for absolute positioned TAB control.
 Add new command “COU” to control the external general purpose output ports,
which can be use to control other devices power for example.
 Add new display effect “SCU0” and “SCU1”. “SCU0” is exactly the same as
“SCU”. “SCU1” just like “SCU”, but will only scroll as many lines as the
content height.
 Pause time control code “^JFF” means stop permanently now. This is useful
when the display need to keep until new messages received.
27/10/2009 Revision 2.5
 Add system predefined variables: 10 stopwatches in four display formats. Refer
to “4.2 Variable Files” for all these predefined variables. All these variable files
are read only. Stopwatch variables are very suitable for time counting which
need to stop and resume, like in sport game.
 Add special command to control the 10 stopwatches which can be display as 10
system predefined variables. Refer to “6.3 Write/Read to Special Function” for
new special commands “CWI”, “CWS” and “CWT”, they tell how to initialize a
stopwatch, and how to start and stop it.
30/6/2009 Revision 2.4
 Add support for RGB color control, text color can be specified to any RGB value
now, both foreground color and background color can be set. The actual
display color is decided by the sign’s color type which is currently configured.
Refer to control code ^O.
 Add support to display humidity and dew point. Refer to control code ^R.
 Add new command to retrieve the sensors values. Refer to command “C” with
new sub command “RS”.
12/5/2009 Revision 2.3
 Add support for general counter which can count from an origin value, relative
to a given date time, increase or decrease by a given step size, at a given
interval. Refer to “^R” control for general counter.
4/3/2009 Revision 2.2
 Add support for Tri-Color display with new colors: White, Blue, Cyan, Purple,
Rainbow6.
30/8/2008 Revision 2.1
 Add support for new decounter & incounter format: hh:nn:ss, hh:nn, and nn:ss.
21/8/2007 Revision 2.0
 Add support to read and write all formats file
 Add support for full colors in E2000
 Add support for full fonts in E2000
 Add support for full display methods in E2000
 Add support to display bmp, gif and png image
 Add support to display gif animation
 Add support to display temperature
 Add support to display decounter/incounter
 Add support for Tab control
28/12/2006 Revision 1.1
 Add support to large memory size (exceed 64K bytes)
 Add support to long file label up to 8 characters.
 Add general response for communication testing.
 Add support to checksum for high reliable data transferring.
5/6/2006 Initial Revision
2 Introduction
This document has been developed to allow the users to understand the communication protocol.
The protocol can be used to display text messages, update date and time, and other useful functions.
3 Document Conventions
The following conventions are used throughout this document:
Convention/Symbol Definition
11 Number in decimal.
$0C Number in hexadecimal format.
%00110011 Number in binary format.
<STX> or ^B ASCII control character – in this case it is a Ctrl-B.
“A” ASCII character (in this case, the letter A – code $41 or 65.
4 Protocol Overview
This protocol can control a wide range LED display from 8x8 pixels to 2048x256 pixels in single-color or
bi-color.
The sign itself can contain many different types of “files”. Each file is downloaded to the sign as needed.
The maximum file count and a single file size are unlimited, but the total size can not exceed 256K
bytes.

4.1 File Label

Each file is named by a file label. Different type of files can use the same file label. File label can be
short: a single character, or long: 1-8 characters enclosed by two “$”. For example, “A” is a short label
and “$TEXT0001$” is a long label, they are both good file labels, and short label “A” can be write in long
label “$A$”. Text file “A” is initially allocated with size of 256 bytes. Other files must be allocated before
using (see special function command code section).
Only these characters can be used for file label:
 Uppercase Letters: “A” to “Z”
 Lowercase Letters: “a” to “z”
 Numbers: “0” to “9”
 Symbols: ~!@#%&_

4.2 Text Files

A text file contains ASCII message data and display control codes to display text. Text files may also
include variable files as well.

4.3 Variable Files


Variable files are files that contain frequently changing information such as number values. You can
easily change these variable files without affecting the text files that contain these. When the sign has
received a variable file, the sign will not restart (however the text file will), but keep running as if nothing
has happen, and the display will partially updated a few seconds later (the value of the variable
changed). If you need the display restart quickly, you can issue a quick restart command “CQR”.
There are some system predefined variables, they are read only and should not use the command code
“B” to write to them. Predefined variable’s name is prefixed with two underline characters “__”. Using
^N$XXXX$ control code in your text file to display them on the screen .
Predefined Variables : 10 Stop Watches
Name Description Control Code Display Hint
__t0a Stopwatch number 0, ^N$__t0a$ 23:59:59 Stopwatch variables are
display format hh:nn:ss very suitable for time
__t0b Stopwatch number 0, ^N$__t0b$ 23:59 counting which need to stop
display format hh:nn and resume, like in sport
__t0c Stopwatch number 0, ^N$__t0c$ 59:59 game.
display format nn:ss
__t0d Stopwatch number 0, ^N$__t0d$ 59:59.99 Use variable control code
display format nn:ss.cc ^N to embedded these
__t0e Stopwatch number 0, ^N$__t0e$ 99:59 variables in your text file.
display format nn:ss 0:59
__t0f Stopwatch number 0, ^N$__t0f$ 999:59 Use command codes “CWI”
display format nnn:ss 0:59 “CWS” and “CWT” to
__t1a Stopwatch number 1, ^N$__t1a$ 23:59:59 initialize, start and stop the
display format hh:nn:ss stopwatch.
__t1b Stopwatch number 1, ^N$__t1b$ 23:59
display format hh:nn
__t1c Stopwatch number 1, ^N$__t1c$ 59:59
display format nn:ss
__t1d Stopwatch number 1, ^N$__t1d$ 59:59.99
display format nn:ss.cc
__t1e Stopwatch number 1, ^N$__t1e$ 99:59
display format nn:ss 0:59
__t1f Stopwatch number 1, ^N$__t1f$ 999:59
display format nnn:ss 0:59
__t2a Stopwatch number 2, ^N$__t2a$ 23:59:59
display format hh:nn:ss
__t2b Stopwatch number 2, ^N$__t2b$ 23:59
display format hh:nn
__t2c Stopwatch number 2, ^N$__t2c$ 59:59
display format nn:ss
__t2d Stopwatch number 2, ^N$__t2d$ 59:59.99
display format nn:ss.cc
__t2e Stopwatch number 2, ^N$__t2e$ 99:59
display format nn:ss 0:59
__t2f Stopwatch number 2, ^N$__t2f$ 999:59
display format nnn:ss 0:59
__t3a Stopwatch number 3, ^N$__t3a$ 23:59:59
display format hh:nn:ss
__t3b Stopwatch number 3, ^N$__t3b$ 23:59
display format hh:nn
__t3c Stopwatch number 3, ^N$__t3c$ 59:59
display format nn:ss
__t3d Stopwatch number 3, ^N$__t3d$ 59:59.99
display format nn:ss.cc
__t3e Stopwatch number 3, ^N$__t3e$ 99:59
display format nn:ss 0:59
__t3f Stopwatch number 3, ^N$__t3f$ 999:59
display format nnn:ss 0:59
__t4a Stopwatch number 4, ^N$__t4a$ 23:59:59
display format hh:nn:ss
__t4b Stopwatch number 4, ^N$__t4b$ 23:59
display format hh:nn
__t4c Stopwatch number 4, ^N$__t4c$ 59:59
display format nn:ss
__t4d Stopwatch number 4, ^N$__t4d$ 59:59.99
display format nn:ss.cc
__t4e Stopwatch number 4, ^N$__t4e$ 99:59
display format nn:ss 0:59
__t4f Stopwatch number 4, ^N$__t4f$ 999:59
display format nnn:ss 0:59
__t5a Stopwatch number 5, ^N$__t5a$ 23:59:59
display format hh:nn:ss
__t5b Stopwatch number 5, ^N$__t5b$ 23:59
display format hh:nn
__t5c Stopwatch number 5, ^N$__t5c$ 59:59
display format nn:ss
__t5d Stopwatch number 5, ^N$__t5d$ 59:59.99
display format nn:ss.cc
__t5e Stopwatch number 5, ^N$__t5e$ 99:59
display format nn:ss 0:59
__t5f Stopwatch number 5, ^N$__t5f$ 999:59
display format nnn:ss 0:59
__t6a Stopwatch number 6, ^N$__t6a$ 23:59:59
display format hh:nn:ss
__t6b Stopwatch number 6, ^N$__t6b$ 23:59
display format hh:nn
__t6c Stopwatch number 6, ^N$__t6c$ 59:59
display format nn:ss
__t6d Stopwatch number 6, ^N$__t6d$ 59:59.99
display format nn:ss.cc
__t6e Stopwatch number 6, ^N$__t6e$ 99:59
display format nn:ss 0:59
__t6f Stopwatch number 6, ^N$__t6f$ 999:59
display format nnn:ss 0:59
__t7a Stopwatch number 7, ^N$__t7a$ 23:59:59
display format hh:nn:ss
__t7b Stopwatch number 7, ^N$__t7b$ 23:59
display format hh:nn
__t7c Stopwatch number 7, ^N$__t7c$ 59:59
display format nn:ss
__t7d Stopwatch number 7, ^N$__t7d$ 59:59.99
display format nn:ss.cc
__t7e Stopwatch number 7, ^N$__t7e$ 99:59
display format nn:ss 0:59
__t7f Stopwatch number 7, ^N$__t7f$ 999:59
display format nnn:ss 0:59
__t8a Stopwatch number 8, ^N$__t8a$ 23:59:59
display format hh:nn:ss
__t8b Stopwatch number 8, ^N$__t8b$ 23:59
display format hh:nn
__t8c Stopwatch number 8, ^N$__t8c$ 59:59
display format nn:ss
__t8d Stopwatch number 8, ^N$__t8d$ 59:59.99
display format nn:ss.cc
__t8e Stopwatch number 8, ^N$__t8e$ 99:59
display format nn:ss 0:59
__t8f Stopwatch number 8, ^N$__t8f$ 999:59
display format nnn:ss 0:59
__t9a Stopwatch number 9, ^N$__t9a$ 23:59:59
display format hh:nn:ss
__t9b Stopwatch number 9, ^N$__t9b$ 23:59
display format hh:nn
__t9c Stopwatch number 9, ^N$__t9c$ 59:59
display format nn:ss
__t9d Stopwatch number 9, ^N$__t9d$ 59:59.99
display format nn:ss.cc
__t9e Stopwatch number 9, ^N$__t9e$ 99:59
display format nn:ss 0:59
__t9f Stopwatch number 9, ^N$__t9f$ 999:59
display format nnn:ss 0:59

4.4 Special Functions

These are not really files, but a set of codes that setup the sign itself, like setting the time and date.

4.5 Script Files

Script files contain many command lines to tell the sign how to display messages, such
as create window, close window, and so on.
Some script files with special name have special meanings. The sign will search for script
file $autorun$ to execute automatically on startup. When writing to script file $cmd$, the
script file will be executed immediately without saving to disk.
Please refer to Appendix B for the script file format.
4.6 Send or Read File

The host can send or read file from the sign use advance open file
command( ‘F’) 、 advance close file command(‘G’) 、 advance read file
command(‘H’) and advance write file command(‘I’).If you want to read the
file from WZP sign, you must get the handle from the sign use advance open file
command(‘F’) first, then you can use this handle and advance read file
command(‘H’) to read the file from WZP sign, finally you must close the file
use the handle and the advance close file command(‘G’). If you want to send
the file to the WZP Sign, you must get the handle from the WZP Sign use advance
open file command (‘F’) first, then you can use this handle and advance write
file command (‘I’) to write file to WZP sign, finally you must close the file
use the handle and the advance close file command (‘G’).
The host can read the Sign Information and read the Sign file list from the WZP
sign as read file. The host can configure the WZP sign 、 turn power on 、 turn
power off and Change baud rate as write file.
How to send or read file from the sign, please 6.6、6.7、6.8、6.9 for detail.
5 Base Protocol Format
The sign responds to two different types of protocol streams. One that uses the full ASCII set (Binary)
and one that “escapes” the non-printable ASCII codes. The last one is extremely useful for PLC’s, as
only printable ASCII codes are used.
For the binary format, each code shown (i.e. ^B) is the actual ASCII code that is to be transmitted. So ^B
would send a code of $02. Due to the nature of the printable format below, if you wish to have a
“^” in your message, you MUST send “^^”.
For the printable format, each code shown (i.e. ^B) is the ACTUAL series of codes to send. So ^B would
send out two ASCII characters “^” and “B”. If you need to actually display the “^” character in your
message, use “^^”.
The protocol is flexible enough that you can mix and match codes as desired.
For serial communications, the protocol specifics are ALWAYS 8 data bits, 1 stop bit, and no
parity. 9600 baud is the factory default value.

5.1 Standard Transmission Packet

This is the base transmission packet that is needed for all communications:
Standard Transmission Packet
<STX <ETX
Sign <SOH> Command Data <EOT> <SOH> Command
> Checksum … >
Address ^A Code Area ^D ^A Code
^B ^C

Item Description
<STX> Start of transmission. ^B
Sign Address List of sign address, in hexadecimal format, separated by commas. Each address is
2 ASCII hex digits long. I.E. “01, 0A, 64” is address 1, 10 and 100. The sign will only
respond when its address is in this list. Address “00” will cause every sign that is
receives this to respond.
<SOH> Start of command. ^A
More than one command can be transferred in one transmission packet by using
<SOH> instead of <ETX>. You can restart a new command with <SOH> and need
not to match the sign address again. Otherwise if <ETX> is found, the next
command must begin with <STX> and sign address should rematch.
Command Code Command code is a single uppercase letter “A” to “Z”, represents the command to
use. Each command is documented in its own section.
Some kind of command will cause the sign restart after <ETX>, such as “A” (Write to
text file).
Command Codes
Command Code Description
“A” Write to text file.
“B” Write to variable file.
“C” Write/read to/from special function.
“D” Write to text file without restart.

Data Area Data area as required for each command. See the appropriate section for each
command
<EOT> End of text. ^D
Use <EOT> at the end of each command to append checksum. This is optional for
high reliable data transmission.
Checksum Checksum is optional and should be used with <EOT> together. They are appended
at the end of each command to provide high reliable data transferring. The
checksum is a 4 hexadecimal digits string representing a hex number “0000” to
“FFFF”, which is a word value sum up from <SOH> to <EOT> (inclusive, byte by
byte). If <EOT> and Checksum exist, If the checksum mode is Sum, the sign will
compare the value with the SUM of bytes actually received, else if the checksum
mode is Crc16, the sign will compare the value with the crc16 calculate of bytes
actually received. If a bad checksum is checked, the sign will ignore the command to
protect the sign from accident damage.
<ETX> End of transmission. ^C
Use <ETX> to end all transmission or use <SOH> to start a new command.

5.2 General Response

When the sign receive a packet ended with <ETX>, it responses some messages to tell communication
succeeded or an error occurred.
The sign do not response on these circumstances:
 The packet is broadcasting to all signs with zero address.
 The packet is sent to a group of signs with more than one address in the address list.

The following information may be responded:


 ok
Communication is good and all commands are handled successfully.
 unknown command code
An unknown command code is found. Maybe you should upgrade the software on the sign.
 bad checksum
A checksum is provided but the checksum is not equal to the calculated value.
 invalid file label
The file label includes invalid characters.
 invalid file size
You should provide a 1-8 hex digits file size when you allocate memory for a file.
 not enough memory
There is not enough memory and the memory size allocated for this file does not change.
 file does not exist
You are trying to write to a file which has no memory allocated.
 file out of allocated size
More file data than the allocated memory size are received. The file data is truncated.
 invalid hexadecimal number
A valid hex number should make up of hex digits “0” to “9”, “A” to “F” or “a” to “f”.
 invalid decimal number
A valid dec number should make up of dec digits “0” to “9”.
 invalid time format
A good time format is HHMMSS where HH is hour “00” to “23”, and MM is minute “00” to “59”,
and SS is second “00” to “59”.
 invalid date format
A good date format is MMDDYYYYX where MM is month “01” to “12”, and DD is day “01” to “31”,
and YYYY is year “2000” to “2099”, and X is day of the week “0” to “6”.
 unknown beep method
The beep method is not currently supported. Maybe you should upgrade the software on the
sign.
 invalid address
A valid address should be hex digits “01” to “FF”.
 bad command parameters
The command parameters is in bad value.
 unknown error
An error occurred but the reason is unknown. The software on the sign needs to modify to avoid
this information.
6 Command Code Sections
This area of the document describes each command code that is used and what the data area must
consist of.

6.1 Write to Text File – Code “A”

ASCII messages along with the codes to display them are stored in text files. Text files MUST be
allocated (using the special function command) before they can be used. When the sign is first used, a
single text file is automatically allocated – it is labeled “A” and has a size of 64K bytes.
There are a few items to note when transmitting text files:
 The display will continue running without disturbance during communication. Once the sign
receives a valid text file, it will reallocate memory for the file according to the last “Set Memory”
command, clear the file content first, and then copy the new file content.
 This command requires the sign restart after <ETX>. To keep the sign running without restart,
use variable file please.
 In addition to containing text, text files can contain other files, specifically variable files. See write
to variable file section for further details.
 The message in the file is a set of pairs of mode fields and data to display. Further details below.

Write To Text File – Command Code “A” – Data Area


Repeat as needed for each message
File Label Mode Field (Optional) ASCII Message
1..10 ASCII <BEL> Display Mode 1..N ASCII
Character ^G Position Code Characters
1 ASCII 1 ASCII
Character Character

Item Description
File Label A file label (i.e. “A” or “$TEXT0001$”)
Mode Set of 3 characters (optional) to define the position and effect to use for the display of
Field message following it.
(Optional) Mode Field
Code Description
<BEL> Start of mode field. ^G.
You can use ^G to set the display position and display effect at one time,
or use ^P to set the display position and use ^E to set the display effect
separately. ^P and ^E give more advanced features for expert usage.
Display Single ASCII character defining the line position on a multi-line sign. If a
Position single-line sign is used, this character is ignored but must be present.
Position Codes
Code Description
“M” Middle line – text centered vertically.
$4D
“T” Top Line - Text begins on the top line of the sign and the
$54 sign will use all its lines minus 1 in order to display the
text. For example, a 6-line sign will allow a maximum of
5 lines (6 minus 1) for the Top Position. The Top/Bottom
Line break will remain fixed until the next Middle or Fill
position is specified.
“B” Bottom Line - The starting position of the Bottom Line(s)
$42 immediately follows the last line of the Top Line. For
example, a 6-line sign with 3 lines of text associated with
the Top Line would start the Bottom Line text on the 4th
line of the sign.
“F” Fill – The sign will fill all available lines, centering them
$46 vertically.
“L” Left - Text begins on the left side of the sign and the
$4C sign will use all its lines minus 1 in order to display the
text
“R” Right - Text begins on the right side of the sign and the
$52 sign will use all its lines minus 1 in order to display the
text

Mode Code Mode Codes:


Code Name Description
“S” Scroll Message scrolls right to left.
$53
“H” Hold Message displays stationary.
$48
“F” Flash Message displays stationary and
$46 flashes.
“A” Slide Up Previous message is slide up by new
$41 message.
“B” Slide Down Previous message is slide down by new
$42 message.
“C” Slide Left Previous message is slide left by new
$43 message.
“D” Slide Right Previous message is slide right by new
$44 message.
“a” Roll Up Previous message is rolled up by new
$61 message.
“b” Roll Down Previous message is rolled down by
$62 new message.
“c” Roll Left Previous message is rolled left by new
message.
$63
“d” Roll Right Previous message is rolled right by new
$64 message.

ASCII Message to display. Can contain various codes (listed below) to affect the color, font,
Message speed, pause, embed dates and times, and display variable files. It also can contain codes
to set new lines and new pages to display.

NOTE: Most of the codes have a default – the default is used at the start of the message
when displaying. If changed, subsequently, the message will use the new changes until the
end of the message is reached. Once the message cycles and starts over, the defaults are
reset.

Message Codes
Cod Description
e
^E Set display effect. Other than ^G, ^E can set both single character and multi-
$05 characters mode codes.

a. Single character mode codes:


Code Name Description
“S” Scroll Message scrolls right to left.
$53
“H” Hold Message displays stationary.
$48
“F” Flash Message displays stationary and flashes.
$46
“A” Slide Up Previous message is slide up by new
$41 message.
“B” Slide Down Previous message is slide down by new
$42 message.
“C” Slide Left Previous message is slide left by new
$43 message.
“D” Slide Right Previous message is slide right by new
$44 message.
“a” Roll Up Previous message is rolled up by new
$61 message.
“b” Roll Down Previous message is rolled down by new
$62 message.
“c” Roll Left Previous message is rolled left by new
$63 message.
“d” Roll Right Previous message is rolled right by new
$64 message.

b. Multi-characters mode codes:


Code Name Description
“$AUT$” Auto Randomly choose a display method.
“$HLD$” Hold Message display stationary.
“$SLU$” Slide Up Previous message is slide up by new
message.
“$SLD$” Slide Down Previous message is slide down by new
message.
“$SLL$” Slide Left Previous message is slide left by new
message.
“$SLR$” Slide Right Previous message is slide right by new
message.
“$SFC$” Slide From Previous message is slide from center by
Center new message.
“$STC$” Slide To Previous message is slide to center by new
Center message.
“$CVU$” Cover Up Previous message is covered from bottom
by new message.
“$CVD$” Cover Down Previous message is covered from top by
new message.
“$CVL$” Cover Left Previous message is covered from right by
new message.
“$CVR$” Cover Right Previous message is covered from left by
new message.
“$CFC$” Cover From Previous message is covered from center
Center by new message.
“$CTC$” Cover To Previous message is covered to center by
Center new message.
“$ROU$” Roll Up Previous message is rolled up by new
message.
“$ROD$” Roll Down Previous message is rolled down by new
message.
“$ROL$” Roll Left Previous message is rolled left by new
message.
“$ROR$” Roll Right Previous message is rolled right by new
message.
“$RFC$” Roll From Previous message is rolled from center by
Center new message.
“$RTC$” Roll To Center Previous message is rolled to center by new
message.
“$INS1$” Inter-Slide 1 Message slide in with interlaced mode 1.
“$INS2$” Inter-Slide 2 Message slide in with interlaced mode 2.
“$INS3$” Inter-Slide 3 Message slide in with interlaced mode 3.
“$INS4$” Inter-Slide 4 Message slide in with interlaced mode 4.
“$INR1$” Inter-Roll 1 Message roll in with interlaced mode 1.
“$INR2$” Inter-Roll 2 Message roll in with interlaced mode 2.
“$INR3$” Inter-Roll 3 Message roll in with interlaced mode 3.
“$INR4$” Inter-Roll 4 Message roll in with interlaced mode 4.
“$INR5$” Inter-Roll 5 Message roll in with interlaced mode 5.
“$INR6$” Inter-Roll 6 Message roll in with interlaced mode 6.
“$SHU1$” Shutter 1 Message display like shutter using method
1.
“$SHU2$” Shutter 2 Message display like shutter using method
2.
“$SHU3$” Shutter 3 Message display like shutter using method
3.
“$SHU4$” Shutter 4 Message display like shutter using method
4.
“$JMP$” Jump Message blocks jump to the screen.
“$SNO$” Snow Message displays like snow fall.
“$RAN$” Random Message pixels displays on the screen in
random order.
“$SHO$” Shoot Messages shoot on the screen.
“$EXP$” Explode Message blocks explode on the screen.
“$FLS$” Flash Message display stationary and flash.
“$TWK$” Twinkle Message display stationary and twinkle.
“$PAC$” Pac Man Previous message is eat by a big mouse
and new message is drop down.
“$SCL$” Scroll Left Message continually scrolls from right to
left.
“$SCL0$” Scroll Left 0 Same as “$SCL$”.
“$SCL1$” Scroll Left 1 Just like “$SCL$”, but only as many pixels
as the content width will be scroll, no blank
pixels appended.
“$SCU$” Scroll Up Message continually scrolls from bottom to
top. Blank lines will be appended after all
content scrolled up.
“$SCU0$” Scroll Up 0 Same as “$SCU$”.
“$SCU1$” Scroll Up 1 Just like “$SCU$”, but only as many lines as
the content height will be scroll, no blank
lines appended.

^F Set font.
$06 a. Set font by index: followed by one of the following codes to change the font:
 “0” – SS7 (default)
 “1” – SF7
 “2” – SF10
 “3” – SS16
 “4” – SF16
b. Set font by name: $FONTNAME$
 “$SS5$” – SS5
 “$SS7$” – SS7
 “$SF7$” – SF7
 “$SF10$” – SF10
 “$SS16$” – SS16
 “$SF16$” – SF16
 “$TM16$” – TM16
 “$AR16$” – AR16
 “$SMA$” – SMA
NOTE: the default font SS7 is used when the font does not exist.
Warning:The index of the fonts must be follow the fonts' order set in
downloading.
^H Set character attribute (flash, wide, bold). Followed by one of the codes:
$08 Character attribute code:
 “0” – Set flashing off. (default)
 “1” – Set flashing on.
 “2” – Set wide off. (default)
 “3” – Set wide on.
 “4” – Set bold off. (default)
 “5” – Set bold on.
^I Set speed. Followed by one speed ASCII character “B” ,“A”,“0” to “8” for twelve
$09 different speeds. (default=”3”)
“B” is fastest,”8”is slowest

^J Set pause. Followed by 2 hexadecimal ASCII digits representing the amount of


$0A pause time, in seconds. When used for scrolling right to left messages – it will
immediately pause and wait for X seconds. When used for any other mode – the
pause is used for the page, before going to the next page or message.

Setting this to “00” will set no pauses for each of the pages. Once this is set for
non-scrolled pages/message, it is subsequently used for every page during
message display. (default=”02”)

Setting this to “FF” will stop running permanently, until new messages have
received and the sign restart running.
^K Display time/date. This will embed the current time and date. Followed by 2
$0B ASCII characters.
The first ASCII character describes how to display.
Time format code:
 “0” – Do NOT show leading zeroes.
 “1” – Show leading zeroes.
 “2” – Show leading zeroes as spaces.
 “5” – Show as ALL CAPS.
 “6” – Show as lowercase.
 “7” – Show as First-Letter Caps.

The second ASCII character describes what to display.


Time element code:
 “0” = Numeric day
 “1” = Numeric month
 “2” = Numeric year (last 2 digits only)
 “3” = Numeric year (all four digits)
 “4” = Month Abbreviation name.
 “5” = Month full name.
 “6” = Day of the week abbreviation.
 “7” = Day of the week full name.
 “8” = Hour in 12-hour mode.
 “9” = Hour in 24-hour mode.
 “A” = Minute
 “B” = Seconds
 “C” = AM/PM as a single character A/P
 “D” = AM/PM as two characters AM/PM
 “E” = Suffix of the day, like ‘st’, ‘nd’, ‘rd’, or ‘th’
^L New page – starts a new display page (based on mode, etc).
$0C
^M New line – starts a new line for multi-line displays.
$0D
^N Embed variable file. Followed by a file label (i.e. “A” or “$VAR01$”) representing
$0E the variable file.
^O Change color.
$0F a. Change color by index: followed by a single ASCII character representing
the color to change to:
 “0” = Red (default)
 “1” = Green
 “2” = Yellow/Amber
 “3” = Rainbow 1
b. Change color by name: $COLORNAME$
 “$ACL$” = Auto Color
 “$WHT$” = White
 “$RED$” = Red
 “$GRN$“ = Green
 “$BLU$” = Blue
 “$YEL$” = Yellow
 “$CYN$” = Cyan
 “$PUR$” = Purple
 “$RB1$” = Rainbow 1
 “$RB2$” = Rainbow 2
 “$RB3$” = Rainbow 3
 “$RB4$” = Rainbow 4
 “$RB5$” = Rainbow 5
 “$RB6$” = Rainbow 6
 “$MIX1$” = Mixture 1
 “$MIX2$” = Mixture 2
 “$MIX3$” = Mixture 3
 “$MIX4$” = Mixture 4
 “$INV1$” = Invert 1
 “$INV2$” = Invert 2
 “$INV3$” = Invert 3
 “$INV4$” = Invert 4
 “$INV5$” = Invert 5
 “$INV6$” = Invert 6
 “$INV7$” = Invert 7
 “$INV8$” = Invert 8
 “$INV9$” = Invert 9

 $[F: COLOR] [,] [ B: COLOR]$


Where “F:” indicate the text foreground color, and “B:” indicate the text
background color. “COLOR” can be tree dec value like rgb(255, 128, 0),
or a hex value like #FF8000, or a lowercase string of standard color
name like red. Please refer to Appendix A to see what standard color
names are available now.

Example 1: to set the text foreground color to Blue, and background


color to Red, usage ^O$F:blue, B:red$, or ^O$F:rgb(0,0,255),
B:rgb(255,0,0)$, or ^O$F:#0000FF, B:#FF0000$.

Example 2: to set the text foreground color to Blue, and background


color to transparent, usage ^O$F:blue$

Example 3: to set the text foreground color to transparent, and


background color to red, usage ^O$B:red$

NOTE: the default color RED is used when the color does not exist.
^P Set display position. Other than ^G, ^P can set both single character and multi-
$10 characters position codes.

a. Single character position codes:


Code Description
“M” Middle line – text centered vertically.
$4D
“T” Top Line - Text begins on the top line of the sign and the sign
$54 will use all its lines minus 1 in order to display the text. For
example, a 6-line sign will allow a maximum of 5 lines (6
minus 1) for the Top Position. The Top/Bottom Line break will
remain fixed until the next Middle or Fill position is specified.
“B” Bottom Line - The starting position of the Bottom Line(s)
$42 immediately follows the last line of the Top Line. For example,
a 6-line sign with 3 lines of text associated with the Top Line
would start the Bottom Line text on the 4th line of the sign.
“F” Fill – The sign will fill all available lines, centering them
$46 vertically.
“L” Left - Text begins on the left side of the sign and the sign will
$4C use all its lines minus 1 in order to display the text
“R” Right - Text begins on the right side of the sign and the sign
$52 will use all its lines minus 1 in order to display the text

b. Multi-characters position codes:


Format: $XXXX,YYYY,WWWW,HHHH,A$ where
 XXXX = x coordinate, 1..4 decimal digits
 YYYY = y coordinate, 1..4 decimal digits
 WWWW = width, 1..4 decimal digits
 HHHH = height, 1..4 decimal digits
 A = text alignment, 1 ASCII character
 “0” = left, top
 “1” = center, top
 “2” = right, top
 “3” = left, middle
 “4” = center, middle (default)
 “5” = right, middle
 “6” = left, bottom
 “7” = center, bottom
 “8” = right, bottom

NOTE 1: the ^Q control will affect the x and y coordinates of display position.

NOTE 2: using the expression with symbol # can specify a relational value to the
full screen size. Symbol # represent the value of screen width when setting the
window’s left and width, also represent the value of screen height when setting
the window’s top and height.
NOTE3:The with and the height can not Over the Screen With and Screen
Height.

Examples:
^P$0, 0, 128, 16, 4$ set the display position to the rectangle area (0, 0, 128,
16), and set the text alignment to center-middle.

For a 128x32 sign, ^P$32, 16, (#-32)/2, #, 3$ set the display position to the
rectangle (32, 16, 48, 16), and set the text alignment to left-middle. The width (#-
32)/2 = (128-32)/2 = 48, and height # using the maximum spacing, that is 32-16
= 16.

For a 128x32 sign, ^P$(#/4)*3, 0, #/4, #, 0$ set the display position to the
rectangle (96, 0, 32, 32), and set the text alignment to left-top. The x coordinate
is (#/4)*3 = (128/4)*3 = 96, width is #/4 = 128/4 = 32, and height # using the
maximum spacing, that is 32.
^Q Set coordinate reference. Followed by a single ASCII character.
$11
Coordinate reference code:
 “0” (default)

x
(0, 0)
y

 “1”

y
(0, 0)
x

 “2”

y
(0, 0)
x

 “3”

x
(0, 0)
y
 “4”

(0, 0)
x
y

Examples:
For a 128x32 sign, ^Q1^P$0, 0, 128, 16, 4$ set the display position to the
rectangle (0, 16, 128, 16).
^R Display embedded object such as temperature, decounter, incounter etc.
$12 Followed by two ASCII characters representing the object to embed:

Temperature
Format: followed by a single ASCII character.
 “0” = Centigrade temperature, such as 20°C
 “1” = Fahrenheit temperature, such as 68°F
 “2” = Kelvin temperature, such as 293K

The temperature will display “??°C” or “??°F” or “???K” when the temperature
sensor is not installed.

Decounter
Format: $XX, MM-DD-YYYY[ HH:NN:SS]$ where
XX is:
 “10” = decounter, count in days
 “11” = decounter, count in hours
 “12” = decounter, count in minutes
 “13” = decounter, count in seconds
 “14” = decounter, count in hh:nn:ss
 “15” = decounter, count in hh:nn
 “16” = decounter, count in nn:ss

MM is month “1” to “12”.


DD is day “1” to “31”.
YYYY is year such as “2000”.
HH:NN:SS is optional, treat as “00:00:00” if absent.
HH is hour “00” to “23”.
NN is minute “00” to “59”.
SS is second “00” to “59”.

The decounter can display number within 99999999, a larger number will be
displayed as ‘--------’. 0 will be displayed when the time passed.
Incounter
Format: $XX, MM-DD-YYYY[ HH:NN:SS]$ where
XX is:
 “20” = incounter, count in days
 “21” = incounter, count in hours
 “22” = incounter, count in minutes
 “23” = incounter, count in seconds
 “24” = incounter, count in hh:nn:ss
 “25” = incounter, count in hh:nn
 “26” = incounter, count in nn:ss

MM is month “1” to “12”.


DD is day “1” to “31”.
YYYY is year such as “2000”.
HH:NN:SS is optional, treat as “00:00:00” if absent.
HH is hour “00” to “23”.
NN is minute “00” to “59”.
SS is second “00” to “59”.

The incounter can display number within 99999999, a larger number will be
displayed as ‘--------’. 0 will be displayed when the time is not reached.

General Counter
Format: $XX, MM-DD-YYYY[ HH:NN:SS], ORIGIN, STEP, INTERVAL$ where
XX is:
 “30” = General down counter
 “31” = General up counter
 “32” = General down counter with thousand separator
 “33”= General up counter with thousand separator

MM is month “1” to “12”.


DD is day “1” to “31”.
YYYY is year such as “2000”.
HH:NN:SS is optional, treat as “00:00:00” if absent.
HH is hour “00” to “23”.
NN is minute “00” to “59”.
SS is second “00” to “59”.
ORIGIN is the origin counter value.
STEP is the step sizes the counter value should increase or decrease.
INTERVAL is the interval time between increasing or decreasing counter value,
in seconds.

General Sensors
Format: $TYPE, UNIT, WIDTH, PRECISION$ where
TYPE is:
 “40” = Temperature
 “41” = Humidity
 “42” = Dew Point
 “43” = Temperature A
 “44” = Temperature B

UNIT is:
 “C” = the temperature value should display in Celsius and should append
“°C” after the temperature value.
 “F” = the temperature value should display in Fahrenheit and should
append “°F” after the temperature value.
 “K” = the temperature value should display in Kelvin and should append
“K” after the temperature value.
 “P” = the humidity value should display in Percent and should append
“%” after the humidity value.
 “c” = the temperature value should display in Celsius but should not
append “°C” after the temperature value.
 “f” = the temperature value should display in Fahrenheit but should not
append “°F” after the temperature value.
 “k” = the temperature value should display in Kelvin but should not
append “K” after the temperature value.
 “p” = the humidity value should display in Percent but should not append
“%” after the humidity value.

WIDTH is one character “2” to “3” to indicate how many digits the integer portion
should display.

PRECISION is one character “0” to “2” to indicate how many digits the fraction
portion should display.

World Clock
Format: $TYPE, DST,ZONE$ where
TYPE is:
 “50” = 24HH:MM
 “51” = 12HH:MM
 “52” = 24HH:MM:SS
 “53” = 12HH:MM:SS
DST is:
 ‘N’ = STD
 “0” = From last sun of Mar 2:00 to last sun of Sep 1:00
 “1” = From 1st sun of Apr 2:00 to last sun of Oct 1:00
 “2” = From 1st sun of Apr 2:00 to 1st sun of Nov 2:00
 “3” = From last sun of Oct 2:00 to last sun of Mar 1:00
 “4” = From 1st sun of Oct 2:00 to 3rd sun of Mar 2:00
 “5” = From 1st sun of Oct 2:00 to 1st sun of Apr 2:00
 “6” = From 1st May 2:00 to 30th Sep 2:00
 “7” = From last sun of Mar 1:00 to last sun of Oct 1:00
 “8” = From last sun of Sep 2:00 to 1st sun of Apr 2:00
 “9” = From 2nd sun of Mar 2:00 to 1st sun of Nov 1:00
 “10” = From last sun of Oct 2:00 to last sun of Feb 1:00
 “11” = From 2nd sun of Nov 2:00 to 1st sun after 12th Jan 2:00
 “12” = From 1st sun of Oct 2:00 to last Sat of Feb 1:00
 “13” = From 1st sun of Sep 2:00 to 1st sun of Apr 1:00
 “14” = From 1st sun of Oct 2:00 to 1st sun after 5th Mar 1:00
 “15” = From 1st sun after 9th Oct 2:00 to 1st sun after 9th Mar 1:00
 “16” = From 1st sun after 8th Sep 2:00 to 1st sun after 8th Apr 1:00
 “17” = From 1st Sat of Oct 2:00 to 1st Sat after 15th Apr 1:00
 “18” = From last Fri of Apr 2:00 to last Thur of Sep 1:00
 “19” = from 22st Mar 0:00 to 21st Sep 23:00
 “20” = from 1st Apr 2:00 to 1st Oct 1:00
ZONE is:
8:00 = UTC+8,
-8:00=UTC-8
6:30=UTC+6:30
Examples:
^R0 Centigrade temperature, such as 20°C
^R$10, 1/1/2008$ display days count to 1/1/2008 00:00:00
^R$20, 1/1/2000 00:00:00$ display days count from 1/1/2000 00:00:00
$R$41, P,2,1$ display the humidity, such as 57.6%
$R$50, N, +6:30$ display world clock 24HH:MM,STD UTC+6:30
^S Display embedded object from file. The file can be a text file, image file or
$13 animation file.

Format 1: Followed by a file label (i.e. “A” or “$0001$”) representing the *.bmp
image file.

Format 2: $NAME.EXT$ where NAME is 1-8 characters file name, and EXT is
1-3 characters file extension. Both NAME and EXT are case sensitive. The EXT
must be the following values:

 “txt” = Include another text file


 “bmp” = embedded a *.bmp image
 “gif” = embedded a *.gif image or animation
 “png” = embedded a *.png image

Include another text file


Unlike the variable file, the current text stop running and text attributes (such as
font, color) are saved, and the included text will run. At last, the text attributes
restore and the previous text continue.

The inclusion depth is limit to 20, cross inclusion is inhibited.

NOTE: The default file type is *.bmp image, so “^SA” is equal to “^S$A.bmp$”,
and “^S$0001$” is equal to “^S$0001.bmp$”.
^T Tab control which makes the subsequence text align to “grids”.
$14
Relative positioned TAB control

Followed by a single ASCII character:


 “0” = left aligned Tab control
 “1” = right aligned Tab control
 “2” = center aligned Tab control
 “3” = decimal point aligned Tab control

NOTE1: the default TAB step size is 32 pixels.


NOTE2: using multiple “^T0” before other TAB control to specify different TAB
size, or using “^U$1,n$” before any TAB control.
NOTE 3: using “^U0” before to set the horizontal text alignment to left aligned, or
the TAB position may not aligned to the same position in different lines.

Absolute positioned TAB control


Format: $TYPE, POSITION$
Where TYPE is one character:
 “0” = left aligned TAB control
 “1” = right aligned TAB control
 “2” = center aligned TAB control
 “3” = decimal point aligned TAB control

Where POSITION is 1-4 decimal characters, which is the absolute coordinate in


horizontal.

^U Other settings such as text alignment.

Set text alignment


Format: followed by a single ASCII character
 “0” = left, top
 “1” = center, top
 “2” = right, top
 “3” = left, middle
 “4” = center, middle (default)
 “5” = right, middle
 “6” = left, bottom
 “7” = center, bottom
 “8” = right, bottom

Set Tab step size


Format: $1, TABSTEP$
Where TABSTEP is 1-4 decimal characters. Default value is “32”.

Set horizontal spacing between characters


Format: $2, HSPACE$
Where HSPACE is one character “0”-“9”. Default value is “0”.

Set vertical spacing between lines


Format: $3, VSPACE$
Where VSPACE is one character “0”-“9”. Default value is “0”.

Enable/disable Word-Wrap
Format: $4, WORDWRAP$
Where WORDWRAP is one character: “0” = Disable; “1” = Enable.
When disabled, a word may be divided and display in two lines.
Default value is “1”.

Enable/disable word space compressing


Format: $5, WORDCMPR$
Where WORDCMPR is one character: “0” = Disable; “1” = Enable.
When enabled, the word spacing may be compressed to fit one more word in
the line.
Default value is “1”.

Enable/disable word space expanding


Format: $6, WORDEXPD$
Where WORDEXPD is one character: “0” = Disable; “1” = Enable.
When enabled, the word spacing will expand to fill the whole line.
Default value is “1”.

^V Beep
Format: followed by a single ASCII character.
 “1” = [BEEP1]
 “2” = [BEEP2]
 “3” = [BEEP3]
“4” = [BEEP4]
^W Double Line Mode
Format: followed by a single ASCII character.
 “0” = “L” = Left
 “1” = “C” = Center
 “2” = “R” = Right
Use ^M to second line
Use ^L to end Double Line Mode
Examples: ^W0Abcdefg^MHij^L
Abcdefg
Hij
Examples: ^WLMan Utd^MLiverpool^WR 2^M 1^L
Man Utd 2
Liverpool 1

6.2 Write to Variable File – Code “B”

Variables files are used to store frequently changing information, such as measurements, short pieces
of text, and other ASCII text/numeric values.
When writing to a variable file, the sign need NOT to restart. Once the sign receives a variable file, it will
reallocate memory for the file according to the last “Set Memory” command, clear the file content first,
and then copy the new file content.
Before writing to a variable file, the file must be setup using the special function command to allocate
memory for the file. The maximum size of a variable file is unlimited.
Variable files can only be displayed by embedding codes for them in a text file. Anytime the text file goes
to show the variable file, it will pull out the last data sent to that variable file. That way, you can
continuously update the variable file without affecting the running of the current text file.
Variable files do NOT have any mode options and simply contain the ASCII message to display. They
are allowed some of the simple embedded codes to change the fonts/colors, etc.
Steps for using variable files:
1. Allocate memory in the sign for the variable file and the text file that embeds it. [Use the Set
Memory Special function to do this.
2. Write the text file that has the embedded variable file code in it.
3. Update the variable file as much as needed to change the data on the display.

Write To Variable File – Command Code “B” – Data Area


File ASCII
Label Message
1..10 ASCII 1..N ASCII
Character characters

Item Description
File Label A file label (i.e. “A” or “$VAR0001$”)
ASCII Message Message to display. Can contain all of the codes that are used for text files. Please
refer to the text file section for details on what each of the codes will do.

6.3 Write/Read to Special Function – Code “C”

This protocol packet will allow you to set certain functions, including setting up memory, setting the date
and time, etc.
In addition, some of the commands respond with data as needed. This response is sent before “General
Response” and is always in the ASCII printable protocol stream as is as follows:
Standard Response Packet
Special
Command Special
<STX> Sign <SOH> Function <EOT> <ETX>
Code Function Checksum
^B Address ^A Response ^D ^C
“C” Code
Data

Item Description
<STX> Start of transmission. ^B
Sign Address Sign address of the sign that is responding. 2 ASCII hexadecimal digits.
<SOH> Start of command. ^A
Command Code A single ASCII character representing the command response code. In this case, “C”
Special Original 2-ASCII character special function request code.
Function Code
Special 0 to N characters of special function response data. Depends on the original request.
Function Data
<EOT> End of text. ^D
Checksum 4 hex digits represent a hex word value from “0000” to “FFFF”, if the checksum
mode is Sum, which is the SUM of bytes from <SOH> to <EOT> (inclusive, byte by
byte), else if the checksum mode is Crc16,which is the crc16 calculate of bytes from
<SOH> to <EOT>(inclusive, byte by byte).
<ETX> End of transmission. ^C

Write To Special Function – Command Code “C” – Data Area


Special Special
Function Code Function Data
2 ASCII 0..N ASCII
Characters Characters

Item Description
Special Code consisting of 2 ASCII characters plus an additional 0 to N characters for the
Function Code data. Each code is described below and the data that is required.
and Data
Special Function Codes – Write Only, No response
Code Description
“ST” Set time.

Set time format: HHMMSS where:


 HH = Hour (decimal), “00” to “23”
 MM = Minute (decimal), “00” to “59”
 SS = Second (decimal), “00” to “59”.

A separator “:” is optional between HH, MM and SS like HH: MM: SS.

The sign’s time will not change until <ETX> is received. You can use
<SOH> to continue a “Set Date” command.
“CM” Clear entire memory. This will clear the entire memory and reset to
factory default.
This command will set the memory to one text file (“A”) and no variable
files.
This command will NOT reset the address.
This command requires the sign to restart after <ETX>.
“SM” Set memory. This is used to set the file memory size. Followed by sets
of ASCII characters as follows:

Set memory format: FTSSSS where:


 F = File Label (i.e. “A” or “$TEXT0001$”)
 T = File type, currently:
 “T” = Text file.
 “V” = Variable file.
 “N” = Text file without restart.
 “S” = Script file.
 SSSS = Size, 1-8 hexadecimal ASCII digits “0” to “7FFFFFFF”,
representing the size, in bytes, of the file to allocate. Set to “0”
to remove the file from the list.

NOTE1: This command only affects the next “Write to


Text/Variable/Script File” command. The file’s content will not be
changed until the “Write to Text/Variable/Script File” command has
been received.

NOTE2: When file type is “T”, the sign will restart running after <ETX>.
If you don’t want restart, use file type “N” instead.
To continue configuring the memory, using <SOH> (^A or $01) and
repeat this command.
“SD” Set date.

Set date format: MMDDYYYYX where:


 MM = Month (decimal), “01” to “12”
 DD = Day (decimal), “01” to “31”
 YYYY = Year (decimal) – 4 digits, “2000” to “2099”.
 X = Day of the week, where: “0”=Sunday to “6”=Saturday.

A separator “/” or “,” is optional between MM, DD, YYYY and X like
MM/DD/YYYY, X.

The sign’s date will not change until <ETX> is received. You can use
<SOH> to continue a “Set Time” command.
“SR” Set a run sequence. Followed by 1 to N characters representing text file
labels that are to be displayed in order. This code immediately starts the
order with the first text file label given. Once the last file is displayed, the
order starts over again. Transmitting any text file to the sign will stop the
run sequence (variable files do not do this). Only text file labels can be
used.
A separator “ “ or “,” is optional between file labels.
A good sequence example is “ABC$TEXT0001$$TEXT0002$”.
This command requires the sign to restart after <ETX>.
“SB” Set beep. Beeps the internal speaker. Followed by 1 ASCII character as
follows:
Beep code:
 “0” = Beep continuously for 1 second
 “1” = Beep continuously for 2 seconds.
 “2” = Beep on/off quickly for 2 seconds.
 “3” = A short beep
 “4” = Three short beep
 “5” = Eight short beep and one long beep
 “6” = Light beep
 “7”= Beep on
 “8”= Beep off
“SA” Set sign address. Followed by the new sign address that take effect
immediately:

Set address format: AA where AA is two ASCII hexadecimal digits


representing the new address (“01” to “FF”).

The default address from the factory is “01”.


“PF” Turn power off
“PO” Turn power on
“PR” Explicitly require the sign to restart after <ETX>. Followed by a single
ASCII character:
 “0” = Restart and show startup screen.
 “1” = Restart but do not show startup screen.

“FM” Allocate memory for any format file.

Format: NAME.EXT=SIZE where:


NAME is 1-8 characters file name, and EXT is 1-3 characters file
extension. Both NAME and EXT are case sensitive. The EXT can be
the following values:

 “txt” = Text file


 “var” = Variable file
 “sh” = Script file
 “bmp” = *.bmp image
 “gif” = *.gif image or animation
 “png” = *.png image

SIZE is 1-8 hex digits “0” to “7FFFFFFF” representing the size, in bytes,
of the file to allocate. Set to “0” to remove the file from the list.

The “FM” command is similar to “SM” command, but can allocate


memory for all format files.

It Should use with FW commnad or Write Text or Write Variable with


One Frame.

“FW” Write to any format file include text file, variable file, image file,
animation file etc.

Write file format: NAME.EXT=CONTENT where:


NAME is 1-8 characters file name, and EXT is 1-3 characters file
extension. Both NAME and EXT are case sensitive. The EXT can be
the following values:

 “txt” = Text file


 “var” = Variable file
 “sh” = Script file
 “bmp” = *.bmp image
 “gif” = *.gif image or animation
 “png” = *.png image
CONTENT is 1-N characters file content, must be encoded in Base64.

User should use this command instead of “A” and “B” to write a text or
variable file which contains 8-bits characters in 7-bits system.

“WI” There are 10 stopwatches can be use to counting time like in sport
game. You should use the variable control code ^N to display a system
predefined stopwatch variable. Refer to “4.2 Variable Files” for detail.

To display a stopwatch, you should use this command to initialize it first,


and then issue a start command.

Format: INDEX [ ENABLE DOWN VALUE ] where:


 INDEX ‘0’ to ‘9’, indicate which of the 10 stopwatches to
be initialized.
 ENABLE ‘0’ or ‘1’, indicate that the stopwatch will be
disabled or enabled. Default is ‘1’.
 DOWN ‘0’ or ‘1’, indicate that the stopwatch should count
up or count down. Default is ‘0’.
 VALUE set the stopwatch initial time value, in 0.01 seconds.
Default is zero.

Examples:
^B01^ACWI0^C initialize stopwatch 0, use all default values.
^B01^ACWI1 1 0 270000^C initialize stopwatch 1, enabled,
count up, starting from time 00:45:00.00
“WS” Start a stopwatch. This will start to count the time from the current time
value.

The stopwatch should have been initialized and enabled.

Format: INDEX where:


 INDEX ‘0’ to ‘9’, indicate which of the 10 stopwatches to
be initialized.

Examples:
^B01^ACWS0^C start stopwatch 0
“WT” Stop a stopwatch. This will stop the time counting, the current time
value will not be changed until an initialize command or start command
is issued. This is useful to control other devices power for example.

The stopwatch should have been initialized and enabled.

Format: INDEX where:


 INDEX ‘0’ to ‘9’, indicate which of the 10 stopwatches to
be initialized.

Examples:
^B01^ACWT0^C stop stopwatch 0
“QR” Quick restart. Using this command to quickly restart running when
variables are updated and display need to restart.
“OU” External Port Output Control. Using this command to control the
external port in “J15” on the WZP controller. This is

J15

J15 contain four general purpose output ports: GP0-GP3. But currently
only GP0 can be used on WZPMAIN03-D control board.

J15 External Output Ports Definition:

GP0 default output level 5.0V DC. When it output low level, it can sink
20mA current. And when it output high level, it can source 5mA current.

Format: PV[PV…] where:


 Pone digit ‘0’ to ‘3’, indicate which port will change output.
 Vone digit ‘0’ or ‘1’, indicate low or high level.
Example:
^B01^ACOU0110^C output high level to external port GP0, and output
low level to GP1.
“WF” Write configurations to the sign.

Format: KEY=VALUE<CR><LF> [ KEY=VALUE<CR><LF>


KEY=VALUE<CR><LF> ] where:

<CR> is ASCII code $0D.


<LF> is ASCII code $0A.

KEY VALUE
brightness From 0 to 255 represent the lowest
and highest brightness.
brightmode 0 represent the brightness control by
the value of brightness,
1 represent the brightness control by
auto
temperaturechar The value represent the temperature
char.

Examples:
^B01^ACWFbrightness=200<CR><LF>^C set brightness to 200.
Hex codes are:
5E 42 30 31 5E 41 43 57 46 62 72 69 67 68 74 6E 65 73 73 3D 32 30
30 0D 0A 5E 43
^B01^ACWFbrightmode=1<CR><LF>^C set brightness control by auto
Hex codes are
5E 42 30 31 5E 41 43 43 46 62 72 69 67 68 74 6D 6F 64 65 3D 31 0D
0A 5E 43

Special Function Codes – Read request with response.


Code Description
“RT” Read time of day.
Read time response format:
HHMMSS where HH is the hours (in 24-hour mode, decimal) and MM is
the minutes (decimal), and SS is the seconds (decimal).
“RM” Read memory status.
Read memory response format:
UUUU-FFFF:FTSSSS[,FTSSSS,…] where:
 UUUU is the amount of used memory overall in bytes. 1-8 ASCII
hexadecimal digits “0” to “7FFFFFFF”.
 FFFF is the amount of free space left in sign, in bytes. 1-8 ASCII
hexadecimal digits “0” to “7FFFFFFF”.
 The following is repeated for each file that is allocated:
 F = File label (as described in set memory)
 T = File type (as described in set memory)
 SSSS = Allocation size. 1-8 ASCII hexadecimal digits. “1”
to “7FFFFFFF”.
 Followed by a “,” except the last one.
“MS” Read RAM status.
Read RAM response format:
UUUU-FFFF where:
 UUUU is the amount of used RAM overall in bytes. 1-8 ASCII
hexadecimal digits “0” to “7FFFFFFF”.
 FFFF is the amount of free space, in bytes. 1-8 ASCII
hexadecimal digits “0” to “7FFFFFFF”.

“RV” Read sign size and versions.


Read version response format:
WWWWHHHHCV where:
 WWWW = Width of sign, in dots, 4 hexadecimal ASCII digits.
 HHHH = Height of sign, in dots, 4 hexadecimal ASCII digits.
 C = Color type of sign as follows:
 “1” = Single color sign.
 “2” = Bi-color (Red,Green,Amber) sign.
 “3” = RGB sign.
 V = Protocol version string. Currently responds “3.02.01.0” for
this protocol.
“RD” Read date.
Read date response format:
MMDDYYYYX where:
 MM = Month (decimal) , “01” to “12”
 DD = Day (decimal) , “01” to “31”
 YYYY = Year (decimal) – 4 digits., “2000” to “2099”
 X = Day of the week, where: “0”=Sunday to “6”=Saturday.
“RA” Read sign address. The response format is “AA” where AA is 2 ASCII
hexadecimal digits representing the address (“01” to “FF”).
Note: This command is useful for “pinging” the display or when used
with the address of “00” to find out the address of a sign.
“FR” Read file content.

Format: NAME.EXT where:


NAME is 1-8 characters file name, and EXT is 1-3 characters file
extension. Both NAME and EXT are case sensitive. The EXT can be
the following values:
 “txt” = Text file
 “var” = Variable file
 “sh” = Script file
 “bmp” = *.bmp image
 “gif” = *.gif image or animation
 “png” = *.png image

The response data is 1-N characters file content, encoded in Base64.

“FL” List files.


Format: NAME.EXT where NAME is 1-8 characters file name and EXT
is 1-3 characters file extension. Both NAME and EXT are case
sensitive.

Character “*” and “?” can be used for wide range matching. For
example, “FL*.*” will list all files, and “FLA.txt” will tell you some
information about the text file A.

The response format is =FILE; FILE; FILE; …; FILE

Files are separated by semicolon “;”.

Each file is in format NAME.EXT, SIZE, TIME, ATTR where:

NAME is 1-8 characters file name.

EXT is 1-3 characters file extension.

SIZE is 1-8 ASCII hexadecimal digits “1” to “7FFFFFFF” representing


the file size.

TIME is in format MM-DD-YYYY HH:MM:SS, representing the last


modified time.

ATTR is 1-N characters string representing the file attributes. This can
contain any combinations of the following characters:
 “S” = System file
 “R” = Read only
 “H” = Hidden

“RS” Read Sensors Values.


Read sensors response format:
KEY:VALUE, [ KEY:VALUE, … ] where:
KEY may be:
 “temperature”
 “humidity”
 “dewpoint”
VALUE is the sensor’s currently measured value. For temperature and
dewpoint, the temperatures are in Celsius only. Humidity is a relative
value between 0.1 percent and 100.0 percent.

BF Read Fan speed


Read sensors response format:
VALUE,VALUE
VALUE is the fan speed’s currently measured value.It need to convert
to Hex Value.The Fan Speed=VALUE*100
BT Read Box Temperature
Read sensors response format:
VALUE
VALUE is the Box Temperature’s currently measured value.It need to
convert to Hex Value.If the Hightest Bit is 1,the Temperature is
negative.If the value is 0x80.The Temperature .The Temperature value
is lowest 7 bits.
BV Read Box Voltage
VALUE,VALUE
VALUE is the Box Voltage’s currently measured value.It need to covert
to the Hex Value.The Box Voltage=VALUE/10
VR Read .bin File From Scan Board.
If file name is scbdef.bin. it will be save as system file.
System file will not be del.
Examples:
^B01^ACVRscb1.bin^C
It will save scan board setting to scb1.bin
And return by Com as base64 code.

VS Write .bin File to Scan Board and save


Bin File must had save in WZP.
Examples:
^B01^ACVSscb1.bin^C
Write scb1.bin to Scan Board.
5E 42 30 31 5E 41 43 56 53 73 63 62 31 2e 62 69 6e 5E 43

VV Read FPGA version


FPGA Version response
Examples:
^B01^ACVV^C
^B01^ACVVPLD31PRO23^C
Version is PLD31PRO23
SV Read OS version
^B01^ACSV^C
Normal OS return:
^B01^ACSV2.01.21.16
Page Move OS return:
^B01^ACSV2.01.21.16(P64)

6.4 Write to Text File without Restart – Code “D”

If you want to update a text file but do not restart running, you can use command “D” instead of
command “A” to write to text file.
When the sign has received a text file using the command “D”, the sign will not restart (however the
command “A” will), but keep running as if nothing has happen. If you need to restart running after all,
you can issue a quick restart command “CQR”.
Before writing to a text file, the file must be setup using the special function command to allocate
memory for the file.

6.5 Write to Script File – Code “E”

All are same with command “D”, except that command “E” is use to write to script file.
Please refer to Appendix B for script file format.

6.6 Advance Open file-Code “F”

If you want to send the file to sign or read the file from sign, you must use this command
first; you can get the handle of the file (you want to read or write) from the response data.
The handle can be identified in future operations, it has 8 hexadecimal characters.
If you want to open the file use advance open file command (‘F’), you must specify the
communication id (it should be a random integer)、filename and open mode. If the open
mode is Write (W), you must specify the file size and the file crc32 value, if you want to
set the time of file, you need specify the file time at this communication.
How to specify the configure information at this communication? You need comply with
the format of the following:
Format: KEY=VALUE<Sp> [, KEY=VALUE<Sp>] […] where:
<Sp>is space character (ASCII code 0X20)
KEY VALUE
id This must specify.
This is a communication ID, the value is 1-8 hexadecimal
characters.
This should be a random integer.
Each command has unique ID, resend the same command use the
same ID.
name This must specify.
The value is 1-12 lengths characters. It can not contain space
character.
The VALUE is the name of the file you want to read or write.
If you want to read the information of the WZP sign, the VALUE is
$INF$.
If you want to read the WZP sign file list, the VALUE is $ROOT$.
If you want to configure the WZP sign, the VALUE is $CFG$.
If you want to change the baud rate of the WZP sign, the VALUE is
$CMD$.
mode This must specify.
The value is 1 character; it is ‘R’ or ‘W’.
If you want to read the file from the sign, the value is ‘R’.
If you want to write the file to the sign, the value is ‘W’.
size This must specify if you want to write the file to the sign, otherwise
ignore.
The value is 1-8 lengths hexadecimal characters.
This is the size of the file content you want to send.
crc This must specify if you want to write the file to the WZP sign,
otherwise ignore.
The value is 1-8 lengths hexadecimal characters.
The value is crc32 calculate of the file content.
time This need specify if you want to write the file to WZP and set the
time of the file, otherwise ignore.
The value must contain this format: MM-dd-yyyy,HH:mm:ss
where
 MM = Month (decimal), “01” to “12”
 dd = Day (decimal), “01” to “31”
 yyyy= Year (decimal) – 4 digits, “2000” to “2099”.
 HH = Hour (decimal), “00” to “23”
 mm = Minute (decimal), “00” to “59”
 ss = Second (decimal), “00” to “59”.

Example:
1、 Read the file from the WZP sign (here the checksum mode is Crc16)
(1)^B01^AFid=17C59ED3 mode=R name=B.txt ^D354B^C
(2) ^B01^AFid=606525EC mode=R name=A.txt ^D2F84^C
2、 Write the file to the WZP sign(here the checksum mode is Crc16)
(1) ^B01^AFid=7FF7047C mode=W name=A.txt size=00000005
crc=F7D18982 time=06-14-2011,10:30:10 ^D72C6^ C
(2) ^B01^AFid=72CE2CB5 mode=W name=B.txt size=00000005
crc=F7D18982 time=06-14-2011, 10:47:36 ^D3E5D^C
The commands respond with data as needed. This response is sent before
“General Response” and is as follows:
Standard Response Packet
Command
<STX> <SOH> Response <EOT> <ETX>
Sign Address Code Checksum
^B ^A Data ^D ^C
“F”

Item Description
<STX> Start of transmission. ^B
Sign Address Sign address of the sign that is responding. 2 ASCII hexadecimal digits.
<SOH> Start of command. ^A
Command Code A single ASCII character representing the command response code. In this case, “F”
Response Data 0 to N characters of special function response data. The data contain the
communication id, error, handle. How to get the communication id、error、 handle
from the data, please refer “Responses Data Format” for detail.
<EOT> End of text. ^D
Checksum 4 hex digits represent a hex word value from “0000” to “FFFF”, if the checksum
mode is Sum, which is the SUM of bytes from <SOH> to <EOT> (inclusive, byte by
byte), else if the checksum mode is Crc16,which is the crc16 calculate of bytes from
<SOH> to <EOT>(inclusive, byte by byte).
<ETX> End of transmission. ^C

Response Data Format


Format: KEY=VALUE<Sp> [, KEY=VALUE<Sp>] […] where:
<Sp>is space character (ASCII code 0X20)

KEY VALUE
id This is Communication ID.
The value must exist, it is 8 hexadecimal characters.
The value must equal to the communication id you just send, If not the
communication need resend the same command.
error This is Communication error.
The value must exist, it is 8 hexadecimal characters.
The value must equal to zero, If not it means that the sign open the
file is Fail, you should end of read file or write file.
handle This is file handle.
The value exists if the error equal to zero, it is 8 hexadecimal
characters.
The file handle is very important. If you want to read file from the
sign 、 write the file to the sign and close the file, you must use this
handle.
size This is the size of the file you want to read.
The value exists if the error equal to error and the openmode is ‘W’, it
is 8 hexadecimal characters.

Example:
1、 Read the file from the WZP sign (here the checksum mode is Crc16)
(1) ^B01^AFid=17c59ed3 error=00000000 handle=1945882b
size=00000005^DD30A^C.
(2) ^B01^AFid=606525ec error=00000000 handle=188d408f
size=00000005^DF689^C.
2、Write the file to the WZP sign(here the checksum mode is Crc16)
(1) ^B01^AFid=7ff7047c error=00000000 handle=25a250f 6 ^D962A^C
(2) ^B01^AFid=72ce2cb5 error=00000000 handle=34641dba ^DDDE2^C

6.7 Advance Close file-Code “G”

When you read the file from the sign or write the file to the sign is completed, you must
close the file; otherwise the file content is not saved and the memory is not released.
If you want to close the file, the communication id (it should be a random integer) must
be specified, also the handle of the file must be required; the handle is the one get from
the open file operation.
How to specify the configure information at this communication? You need comply
with the format of the following:
Format: KEY=VALUE<Sp> [, KEY=VALUE<Sp>] […] where:
<Sp>is space character (ASCII code 0X20)

KEY VALUE
id This must specify.
This is a communication ID, the value is 1-8 hexadecimal
characters.
This should be a random integer.
Each command has unique ID, resend the same command use
the same ID.
handle This must specify
This is the handle of the file you want to read or write, The value is
1-8 hexadecimal characters.
This must be the handle that gets from the open file operation.
How to get the handle? Please refer “6.6 advance open file-Code
”F” for detail.

Example:
1、Read the file from the WZP sign (here the checksum mode is Crc16)
(1) ^B01^AGid=2597E4CE handle=1945882B ^DDCC4^C
(2) ^B01^AGid=07333C2D handle=188D408F ^DA37B^C
2、Write the file to the WZP sign(here the checksum mode is Crc16)
(1) ^B01^AGid=78D7C804 handle=25A250F6 ^D10F1^C
(2) ^B01^AGid=2E8DC569 handle=34641DBA ^D210A^C
The commands respond with data as needed. This response is sent before
“General Response” and is as follows:
Standard Response Packet
Command
<STX> <SOH> Response <EOT> <ETX>
Sign Address Code Checksum
^B ^A Data ^D ^C
“G”

Item Description
<STX> Start of transmission. ^B
Sign Address Sign address of the sign that is responding. 2 ASCII hexadecimal digits.
<SOH> Start of command. ^A
Command Code A single ASCII character representing the command response code. In this case, “G”
Response Data 0 to N characters of special function response data. The data contain the
communication id, error, handle. How to get the communication id 、 error from the
data, please refer “Responses Data Format” for detail.
<EOT> End of text. ^D
Checksum 4 hex digits represent a hex word value from “0000” to “FFFF”, if the checksum
mode is Sum, which is the SUM of bytes from <SOH> to <EOT> (inclusive, byte by
byte), else if the checksum mode is Crc16,which is the crc16 calculate of bytes from
<SOH> to <EOT>(inclusive, byte by byte).
<ETX> End of transmission. ^C

Response Data Format


Format: KEY=VALUE<Sp> [, KEY=VALUE<Sp>] […] where:
<Sp>is space character (ASCII code 0X20)

KEY VALUE
id This is Communication ID.
The value must exist, it is 8 hexadecimal characters.
The value must equal to the communication id you just send, If not the
communication need resend the same command.
error This is Communication error.
The value must exist, it is 8 hexadecimal characters.
The value must equal to zero, If not it means that the sign close the
file is Fail, you should end of read file or write file.

Example:
1、Read the file from the WZP sign (here the checksum mode is Crc16)
(1) ^B01^AGid=2597e4ce error=00000000 ^D8940^C
(2) ^B01^AGid=07333c2d error=00000000 ^D9189^C
2、Write the file to the WZP sign(here the checksum mode is Crc16)
(1) ^B01^AGid=78d7c804 error=00000000 ^D53C1^C
(2) ^B01^AGid=2e8dc569 error=00000000 ^D5F95^C

6.8 Advance Read file-Code “H”

If you want to read the file from the sign, you should open file first. How to open file from
the sign, please refer “6.6 advance open file-Code “F” “for detail. Then you could read the
file content from the sign use this command.
It should not read too many bytes at one communication, so if the content of the file is
too long, it should be read many times. At one communication, the length of the file
content should not be over 512 before encode. So it will communication many times use
advance read file command (‘H’) until the end of the file.
If the content of the file has control characters (0x00 to 0x1f); the content of the file
should be encode to base64 characters at the communication.
If you want to read the file content use advance read file command (‘H’), the
communication id must be specified, the handle of the file must be required; also the size
(before encode) of block you want to read at this communication and the position of the
file must be specified; If you want to encode the content at the response data, the encode
format should be specified.

How to specify the configure information at this communication? You need comply
with the format of the following:
Format: KEY=VALUE<Sp> [, KEY=VALUE<Sp>] […] where:
<Sp>is space character (ASCII code 0X20)

KEY VALUE
id This must specify.
This is a communication ID, the value is 1-8 hexadecimal
characters.
This should be a random integer.
Each command has unique ID, resend the same command use
the same ID.
handle This must specify
This is the handle of the file you want to read, the value is 1-8
hexadecimal characters.
This must be the handle that gets from the open file operation.
How to get the handle? Please refer “6.6 advance open file-
Code”F” for detail.
pos This must specify.
This is the position of the file, 0 is begin of the file. The value is 1-
8 hexadecimal characters.
It is a hexadecimal number.
size This must specify
This is the size of the block you want to read, the value is 1-8
hexadecimal characters.
The value should be 1 to 512, it is the size of block before encode.
It is a hexadecimal number.
format If you want to encode file content that read at this communication
to base64 characters, this must be specified.
The value must be “base64”, if it is not “base64”, the
communication error will not equal to zero.

Example:
1、 Read the file from the WZP sign (here the checksum mode is Crc16)
(1) ^B01^AHid=45B2F18B handle=1945882B pos=00000000 size=00000005 ^DD1E
A^C
(2) ^B01^AHid=3C3FCB5D handle=188D408F pos=00000000 size=00000005
format=base64 ^DD80F^C
The commands respond with data as needed. This response is sent before
“General Response” and is as follows:

Standard Response Packet


Command
<STX> <SOH> Response <EOT> <ETX>
Sign Address Code Checksum
^B ^A Data ^D ^C
“H”

Item Description
<STX> Start of transmission. ^B
Sign Address Sign address of the sign that is responding. 2 ASCII hexadecimal digits.
<SOH> Start of command. ^A
Command Code A single ASCII character representing the command response code. In this case, “H”
Response Data 0 to N characters of special function response data. The data contain the
communication id, error, handle. How to get the communication
id、error、size、content、base64content from the data, please refer “Responses Data
Format” for detail.
<EOT> End of text. ^D
Checksum 4 hex digits represent a hex word value from “0000” to “FFFF”, if the checksum
mode is Sum, which is the SUM of bytes from <SOH> to <EOT> (inclusive, byte by
byte), else if the checksum mode is Crc16,which is the crc16 calculate of bytes from
<SOH> to <EOT>(inclusive, byte by byte).
<ETX> End of transmission. ^C
Response Data Format
Format: KEY=VALUE<Sp> [, KEY=VALUE<Sp>] […] where:
<Sp>is space character (ASCII code 0X20), where if the KEY is “content” or
“base64content”, the <CR> doesn’t exist.

KEY VALUE
id This is Communication ID.
The value must exist, it is 8 hexadecimal characters.
The value must equal to the communication id you just send, If not the
communication need resend the same command.
error This is Communication error.
The value must exist, it is 8 hexadecimal characters.
The value must equal to zero, If not it means that the sign read the file
is Fail, you should end of read file
If the encodeformat is not “base64” (if you set the encodeformat); also
if the pos less and the size less zero or is not specified, also if the
handle is not get from the open file or not specified, the error will not
equal to zero.
size This is the really size of the content that read.
The value must exist if the error equal to zero, it is a hexadecimal
characters.
It is a hexadecimal number.
It is the size of block before encode, it equal to or less than the size
you want to read.
content This must exist if you don’t set the encodeformat and the error equal
to zero.
This is the block that you want to read, the value is a lot of bytes, and
it may be contain the control characters (0x00 to 0x1f).
This must be the end of the response data, if the KEY is “content”,
After the ‘=’, the rest of the data is the block that you want to read and
don’t contain the <CR> (space characters).
base64content This must exist if you set the encodeformat and the error equal to
zero.
The value is a lot of characters, and it is base64 characters.
This is the block that has been encoded. If you want to get the
content, you must decode it from base64 characters.
This must be the end of the response data, if the KEY IS
“base64content”, After the ‘=’, the rest of the data is the block that you
want to read and don’t contain the <CR> (space characters).

Example:
1、 Read the file from the WZP sign (here the checksum mode is Crc16)
( 1 ) ^B01^AHid=45b2f18b error=00000000 size=00000005
content=Hello^DE1F0^C
(2)^B01^AHid=3c3fcb5d error=00000000 size=00000005
base64content=SGVsbG8=^DD961^C
You can read the sign information or the file list from the sign; the operation is the same
as read file from the sign, you just need set the file name as $INF$ or $ROOT$, you can
refer “6.6 advance write file-code” for detail. You can get the sign information from the
content directly; However get the file list from the content, it need to handle. How to deal
with this content; please comply with the format of the following.
Format: KEY=VALUE<CR>KEY=VALUE<CR> where:
<CR>is space character (ASCII code 0X20)
KEY VALUE
filecount The value is 8 hexadecimal characters, it is a hexadecimal number.
It is the count of the file list.
diskspace The value is 8 hexadecimal characters, it is a hexadecimal number.
It is the size of the sign disk
diskfree The value is 8 hexadecimal characters, it is a hexadecimal number.
It is the size of the free of the sign disk.
fileinfo The value is a lot of bytes.
The count of fileinfo is filecount, if the value of filecount is 5, and then
there are 5 fileinfo.
It contains the name of the file, the size of the file and the filetime by
orders. The format of the time is “MM-DD-YYYY,hh:mm:ss”.

6.9 Advance Write file-Code “I”

If you want to write the file to the sign, you should open file and get the handle first. How to open file
from the sign, please refer “6.6 advance open file-Code “F” “ for detail, then you could send the file
content to the sign use this command.
It should not send too many bytes at one communication, so if the content of the file is too long, it
should be sent many times. At one communication, the length of the file content should not be over 512
before encode. So it will communication many times use advance write file command (‘I’) until the end of
the file.
If the content of the file has control characters (0x00 to 0x04 or “^A”、”^B” 、”^C” 、”^D”); the
content of the file must be encode to base64 characters at the communication.
If you want to send the file content use advance write file command (‘I”), the communication id must
be specified, the handle of the file must be required, and the position of the file must be specified. If you
want to encode the content that you want to send, you need encode it and the KEY is “base64content”,
else keep the content unchanged and the KEY is “content”. If you specify the “content” or
“base64content”, it must be the end of the block.
How to specify the configure information at this communication? You need
comply with the format of the following:
Format: KEY=VALUE<Sp> [, KEY=VALUE<Sp>] […] where:
<Sp>is space character (ASCII code 0X20), where if the KEY is “content” or
“base64content”, the <CR> don’t exist.
KEY VALUE
id This must specify.
This is a communication ID, the value is 1-8 hexadecimal characters.
This should be a random integer.
Each command has unique ID, resend the same command use the
same ID.
handle This must specify
This is the handle of the file you want to write, the value is 1-8
hexadecimal characters.
This must be the handle that gets from the open file operation. How to
get the handle? Please refer “6.6 advance open file-Code”F” for
detail.
pos This must specify.
This is the position of the file, 0 is begin of the file. The value is 1-8
hexadecimal characters.
It is a hexadecimal number.
content This must specify if you don’t encode the content to base64
characters at the communication.
The value is a lot of bytes; it is the content of the file.
The content must be the end of the data block, after the value the
<CR> will not exist
base64content This must specify if you encode the content to base characters at the
communication.
The value is a lot of base64characters, the content of the file must
encode to base64 character at the communication, and it can not
have non base64 characters.
It must be the end of the data block, after the value the <CR> will not
exist.

Example:
1、Write the file to the WZP sign(here the checksum mode is Crc16)
(1) ^B01^AIid=18F2D4C2 handle=25A250F6 pos=00000000 content=Hello^DD05C^C
(2)^B01^AIid=4EA8D226 handle=34641DBA pos=00000000
base64content=SGVsbG8=^DA235^C
The commands respond with data as needed. This response is sent before
“General Response” and is as follows:

Standard Response Packet


Command
<STX> <SOH> Response <EOT> <ETX>
Sign Address Code Checksum
^B ^A Data ^D ^C
“I”
Item Description
<STX> Start of transmission. ^B
Sign Address Sign address of the sign that is responding. 2 ASCII hexadecimal digits.
<SOH> Start of command. ^A
Command Code A single ASCII character representing the command response code. In this case, “I”
Response Data 0 to N characters of special function response data. The data contain the
communication id, error, handle. How to get the communication id 、 error from the
data, please refer “Responses Data Format” for detail.
<EOT> End of text. ^D
Checksum 4 hex digits represent a hex word value from “0000” to “FFFF”, if the checksum
mode is Sum, which is the SUM of bytes from <SOH> to <EOT> (inclusive, byte by
byte), else if the checksum mode is Crc16,which is the crc16 calculate of bytes from
<SOH> to <EOT>(inclusive, byte by byte).
<ETX> End of transmission. ^C

Response Data Format


Format: KEY=VALUE<Sp> [, KEY=VALUE<Sp>] […] where:
<Sp>is space character (ASCII code 0X20)

KEY VALUE
id This is Communication ID.
The value must exist, it is 8 hexadecimal characters.
The value must equal to the communication id you just send, If not the
communication need resend the same command.
error This is Communication error.
The value must exist, it is 8 hexadecimal characters.
The value must equal to zero, If not it means that the sign write the
file is Fail, you should end of write file.
If the handle of the file not get from advance from file; if the position of
the file less than zero; if the size of content equal to zero; if the size of
the content plus the position greater than the size of the file, the error
will not equal to zero.

Example:
1、 Write the file to the WZP sign(here the checksum mode isCrc16)
(1) ^B01^AIid=18f2d4c2 error=0000000 ^DE083^C
(2) ^B01^AIid=4ea8d226 error=00000000 ^D509F^C

You can change the baud rate of the sign; the operation is the same as write the file to the sign. How to
change the baud rate of the sign? First it need set the baud rate to the new value, and then use the new
baud rate to confirm it. How to set the baud rate to the new value, first you use advance open file
command (‘F’) to open file, here you need set the filename as “CMD”, and then you send the content
use advance write command (‘I’), here the content is “baudrate=VALUE”, the VALUE is the new baud
rate you want to set, it is a decimal number, finally you must close the file use advance close file
command. How to confirm the new baud rate, you should use the new baud rate to communication, first
you use advance open file command (‘F’) to open file, here you need set the filename as $CMD$, and
then you send the content use advance write command (‘I’), here the content is “confirm=”, finally you
must close the file use advance close file command.
You can configure the sign as write the file to the sign. First you use advance open file command ( ‘F’) to
open file, here you need set the filename as $CFG$, and then you send the content use advance write
command (‘I’), here the content is the configure information, finally you must close the file use advance
close file command. The configure information format please refer as follow:

Format: KEY=VALUE<CR><LF> [ KEY=VALUE<CR><LF> KEY=VALUE<CR><LF> ] where:

<CR> is ASCII code $0D.


<LF> is ASCII code $0A.

KEY VALUE
brightness From 0 to 255 represent the lowest and highest brightness.
poweroff If the value is 0, it means power up the sign, else if the value is
1,it means power down the sign.
7 Multiple Line Sign Behavior
This section identifies the behavior of the signs when using multiple line displays and the protocol.
Looking at the mode when writing text files, the positions are:
 Middle
 Top
 Bottom
 Fill
 Left
 Right

Normally a single line will behave as follows:


 All characters line up at the bottom of the sign and work their way up for as many dots as the
font supports:
 If a sign receives a font that is larger than the sign can display, then the sign will “size down” or
reduce the font size. For example, on a one-line sign, SS16 characters would be replaced by
SS7 characters.
 If a character font is not specified, then SS7 will be used.
 If Top, Bottom, or Fill positions are received Middle is used.
 The centerline is never placed further left than 8 pixels from the leftmost pixel of the sign.
 The centerline is never placed further right than 8 pixels from the rightmost pixel of the sign.

A two-line sign behaves as follows:


 The Top position is defined as the top 7 dots of the sign. The Top position functions in the same
manner as a one-line sign.
 The Bottom position is defined as the bottom 7 dots of the sign. The Bottom position functions in
the same manner as a one-line sign.
 The Middle position is treated as though it was a 1 line sign 16 dots high. Each line of text
presented on this line is pre-scanned to determine the largest piece of text to be displayed. For
example, if a line of SS7 text has just a single SF10 character, the line is viewed as a 10-high
line. This means that 10-high characters will be displayed with 3 dots above and below the
characters (3+10+3 = 16).
 Fill position: On a two-line sign, the Fill position indicates that you wish to use no more than 7-
high characters and that you wish to fit as much text on the screen as you can. When using the
Fill position, the sign sees itself as having two lines of 7-high characters and no means of
displaying characters larger than 7-high. Also, if the last piece of a message is just one line,
then the sign will center this line on the screen. If the sign is operating on the top row, then the
bottom of that row is assumed to be the 7 th row of dots. All text is started from there and
worked up: 7-high characters will use rows 1 to 7. If the sign is operating on the bottom row,
then the sign works its way up from row 16: 7-high characters will use rows 10 to 16.

Three or more line signs behave as follows:


 The Top and Bottom positions work in tandem with each other. There is an imaginary line
between the top and bottom half of the sign. This is called the “centerline”. The centerline
divides what is used for the Top from what is used for the Bottom positions. The location of the
centerline is usually established by the first Top command the sign receives, and the rest of the
space is used for the Bottom position. If a Bottom position command comes first, then the
centerline is placed at its highest position — row 8, allowing for a single line of 7-high
characters on the Top position. Once a centerline has been established, it remains fixed until a
Fill or Middle position command is received. The centerline can not be changed with another
Top or Bottom position command. However, if the first command specifies a Top, and not a
Bottom, position, then the centerline’s position is determined by the amount of text following the
position command. For example:
 If one 7-high line of text is received (following a Top position command), then the
centerline will be fixed at row 8.
 If one line of 10-high characters is received (following a Top position command),
then the centerline will be fixed at row 11.
 The centerline is never placed higher than 8 rows from the top of the sign.
 The centerline is never placed lower than 8 rows from the bottom of the sign.
 The Left and Right positions work in tandem with each other, much like the Top and Bottom
positions for multi-line signs. An imaginary line (called the “centerline”) divides what is used for
the Left from what is used for the Right positions. The location of the centerline is usually
established by the first Left command the sign receives, and the rest of the space is used for
the Right position. The placement of this centerline will be determined by a new line. If no new
line is given, the text will continue up to the rightmost 8 pixels, which will be reserved for the
Right position. If a Right position command comes first, then the centerline is placed at the
leftmost position — column 8, allowing for a single character in the Left position. Once a
centerline has been established, it remains fixed until a Fill or Middle position has been
received.
 The centerline is never placed further left than 8 pixels from the leftmost pixel of the sign.
 The centerline is never placed further right than 8 pixels from the rightmost pixel of the
sign.
 The Middle position is treated as though it were a one-line sign with as many rows as the sign is
tall. Each line of text on the sign is checked to determine the largest piece of text to be
displayed. The line of text is then vertically centered based on that largest piece of text. For
example, if you have a line of text which has mostly 7-high characters, but has one 10-high
character, then this line is considered a 10-high line. Assuming that this is a 24-row sign, this
would leave 14 extra rows so there would be 7 blank rows on top and 7 on the bottom
(7+10+7=24). All text is then lined up on this new virtual bottom (the 21 st line) and treated the
same as in a one-line sign.
 The Fill position indicates that you wish to fit as much text on the screen as you can. You can
select characters larger than 7-high. The sign will start from top of the screen working down. If
you select a 15-high character set, then the sign will fit as many 15 row lines of text on the
screen as possible. As soon as the sign detects that the next line will not fit, the sign will stop
creating the current page and display it. The next page will begin with the line that did not fit. If
the text does not use up the entire display, then the sign will center the text vertically, splitting
the blank space between the top and the bottom.
8 Protocol Examples
8.1 Send a message to all signs using the default text file “A”.

The following example will display “HELLO” to all attached signs.


<STX>00<SOH>AAHELLO<ETX>
Code Name Value Description
<STX> ^B or $02 Start of Transmission
Sign Address “00” Sign address of 00 – to all signs.
<SOH> ^A or $01 Start of command.
Command Code “A” Write text command code
File Label “A” Use file “A” – which is the default and is already allocated.
Message “HELLO” Actual text to be displayed.
<ETX> ^C or $03 End of Transmission.

8.2 Send a scrolling message to all signs.

The following example will display “HELLO” on the bottom line of the sign scrolling from right to left.
<STX>00<SOH>AA<BEL>BSHELLO<ETX>
Code Name Value Description
<STX> ^B or $02 Start of Transmission
Sign Address “00” Sign address of 00 – to all signs.
<SOH> ^A or $01 Start of command.
Command Code “A” Write text command code
File Label “A” Use file “A” – which is the default and is already allocated.
<BEL> ^G or $07 Start of mode field
Position “B” Bottom of sign
Mode Code “S” Scrolling from right to left
Message “HELLO” Actual text to be displayed.
<ETX> ^C or $03 End of Transmission.

8.3 Setup and send a text file containing a variable file.

This example will show you the transmission sequences to setup and update a text file containing a
variable file.
It will scroll from right to left the message “TEMP = nnnn” where nnnn is stored in a variable file that will
be updated by itself to change the displayed number.

8.3.1 Step 1 – Setup variable memory

We don’t need to setup the text file area – we will use label “A” for the text file – which is automatically
setup.
<STX>00<SOH>CSMXV0010<ETX>
Code Name Value Description
<STX> ^B or $02 Start of Transmission
Sign Address “00” Sign address of 00 – to all signs.
<SOH> ^A or $01 Start of command.
Command Code “C” Write special function command code
Special Function “SM” Set memory
Code
Special Function “X” File label to set memory for – “X”
File Label
Special Function “V” File type is variable.
File Type
Special Function “0010” Allocating 16 bytes (“0010” is in hexadecimal”)
File Size
<ETX> ^C or $03 End of Transmission.

8.3.2 Step 2 – Setup text file to show message plus variable file

This will write to the text file “A” and show it. It includes embedding the variable file “X” that was just
created. Since “X” is now empty, the display will scroll “TEMP =” and nothing else until we update the
variable file.
<STX>00<SOH>AA<BEL>BSHELLO<SO>X<ETX>
Code Name Value Description
<STX> ^B or $02 Start of Transmission
Sign Address “00” Sign address of 00 – to all signs.
<SOH> ^A or $01 Start of command.
Command Code “A” Write text command code
File Label “A” Use file “A” – which is the default and is already allocated.
<BEL> ^G or $07 Start of mode field
Position “B” Bottom of sign
Mode Code “S” Scrolling from right to left
Message “TEMP =” Actual text to be displayed.
<SO> ^N or $0E Embed variable file code
File Label “X” Embedded file label – “X”
<ETX> ^C or $03 End of Transmission.

8.3.3 Step 3 – Update the variable file with data

Now you will update only the variable file. This will then show the data when the message scrolls on
again. Notice how the sign did not blank or hesitate. It will scroll “TEMP =1234”
<STX>00<SOH>BX1234<ETX>
Code Name Value Description
<STX> ^B or $02 Start of Transmission
Sign Address “00” Sign address of 00 – to all signs.
<SOH> ^A or $01 Start of command.
Command Code “B” Write variable command code
File Label “X” Use file “X” – which is the default and is already allocated.
Message “1234” Actual text to be displayed.
<ETX> ^C or $03 End of Transmission.

8.4 Advanced usage about text alignment

^B01^AAA^U3Apple^T0^T1100^T31.23^MMeat^T0^T110^T312.345^M^C
Code Name Value Description
<STX> ^B or $02 Start of Transmission
Sign Address “01” Sign address of 01
<SOH> ^A or $01 Start of command.
Command Code “A” Write text command code
File Label “A” Use file “A” – which is the default and is already
allocated.
Messages “^U3” Set text alignment to “left, middle”
“Apple^T0^T1100^T31.23^M” The first line display: Apple 100 1.23
“Meat^T0^T110^T312.345^M” The next line display: Meat 10 12.345
<ETX> ^C or $03 End of Transmission.
Appendix A: Standard Color Names
aqua hotpink paleturquoise
aquamarine honeydew palegreen
aliceblue indigo palegoldenrod
azure ivory plum
antiquewhite indianred powderblue
black khaki papayawhip
blue lime peru
blueviolet limegreen peachpuff
beige lightgray red
blanchedalmond lightpink royalblue
burlywood lightsteelblue rosybrown
bisque lightslategray silver
brown lightskyblue skyblue
cyan lightblue slateblue
cream lightcyan slategray
crimson lightseagreen steelblue
cornflowerblue lightgreen springgreen
cornsilk lightgoldenrodyellow seagreen
cadetblue lightyellow seashell
chartreuse lightsalmon sandybrown
chocolate lightcoral saddlebrown
coral lavender sienna
darkgray lavenderblush salmon
darkmagenta lawngreen snow
darkviolet lemonchiffon teal
darkorchid linen thistle
darkslateblue magenta turquoise
darkslategray maroon tan
darkblue moneygreen tomato
darkturquoise medgray violet
darkcyan mediumvioletred white
darkseagreen mediumorchild whitesmoke
darkgreen mediumpurple wheat
darkolivegreen mediumslateblue yellow
darkkhaki mediumblue yellowgreen
darkgoldenrod mediumturquoise
darkorange mediumaquamarine
darksalmon mediumspringgreen
darkred mediumseagreen
dimgray midnightblue
deeppink mintcream
deepskyblue moccasin
dodgerblue mistyrose
fuchsia navy
forestgreen navajowhite
floralwhite olive
firebrick olivedrad
gray orchid
green oldlace
greenyellow orange
gainsboro orangered
ghostwhite purple
gold pink
goldenrod palevioletred
Appendix B: Script File Format
Script file are text file with many command lines. Lines are separated by <CR><LF> ($0D
$0A) in text file. One text line contains only one command and its parameters.

Comment

Lines begin with “//” or between “/*” and “*/” are comment lines, these lines contain no
commands and will be skipped by the command shell.
Examples:

//this is a comment line

/*these
are
comment
lines*/

Label

Lines begin with a word ending with “:” are labels, they are used to indicate the
destination for branches.
Examples:


label1:

goto label1
goto label2

label2:

Create Window

Command format:
window NAME {LEFT,TOP,WIDTH,HEIGHT} run {FILE[, FILE][…]} [once]
Please use “once” to specify the window just run once and close automatically.
Examples:
window A {0,0,32,32} run {A.txt, B.txt} once
window B {0,32,96,32} run {C.txt} once
window C {0,32,128,32} run {D.txt}

Sleep

Command format:
sleep TIME [UNIT]
Examples:
sleep 10 //Sleep 10 seconds
sleep 5 min //Sleep 5 minutes
sleep 8h //Sleep 8 hours

Close Window

Command format:
close NAME[,NAME][…]
Do not close windows just run once, use waitfor command instead.
Examples:
close A
close B,C

Wait for Window Running Terminated

Command format:
wait NAME[,NAME][…]
Do not wait for windows not run once, use close command instead.
Examples:
wait A
wait B,C

Unconditional Branch

Command format:
goto LABEL
Examples:


label1:

goto label1
goto label2

label2:

Set Window Border

This command just affects the next window command.


Command format:
set border thickness=VALUE [padding=VALUE] [color=COLOR]
“COLOR” can be tree dec value like rgb(255, 128, 0), or a hex value like #FF8000, or a
lowercase string of standard color name like red. Please refer to Appendix A to see what
standard color names are available now.
Examples:
set border thickness=1 color=red
set border thickness=1 padding=0 color=rgb(255,0,0)
set border thickness=1 color=#FF0000

Set Window Background

This command just affects the next window command.


Command format:
set background color=[COLOR] [image=FILE[,] [tile]]
set background transparent

Examples:
set background transparent
set background color=#000080
set background color=rgb(0,0,128)
set background color=navy image=b160x16.png
set background image=b16x16.png, tile

Set Window Zorder

Zorders indicate the windows cascading order. Windows with zorder 1 always display on
the top of screen, and may cover the windows with zorder 2. Zorder 0 is default value,
means the window can be coverd by any window with non-zero zorder.
This command just affects the next window command.
Command format:
set zorder VALUE
Examples:
set zorder 1
set zorder 2

Play Other Script File

Command format:
play {FILE[,FILE[,…]]} [from {TIME} to {TIME} [and from {TIME} to {TIME}] […] ]
[weekdays XXXXXXX]
Examples:
play {A.sh}
play {B.sh} from {24/8/2010 8:00} to {24/8/2010 20:00}
play {C.sh, D.sh} from {8:00} to {20:00} weekdays 0111110
play {E.sh} from {24/8/2010} to {24/8/2011} and from {8:00} to {20:00} weekdays 0111110

You might also like