beautypg.com

Kipp&Zonen 2AP Sun Tracker User Manual

Page 95

background image


REFERENCE

INFORMATION

94


6.4

GENERATING THE FED CHECK SEQUENCE


On receipt of a message, one simply adds up the binary representations of all printable characters.
That sum must be zero (modulo 256). Generating a check sequence of printable characters is not
quite that simple. The following C code shows one way of accomplishing the task:

checkSum = 0;
end = 0;
while (command[end]) // calculate sum so far
checkSum += command[end++];
checkSum += command[end++] = ' '; // separate check bytes
while (checkSum <130 || checkSum> 223) // make all printable
checkSum += command[end++] = '^';


6.5 EVENT

LOGS


All messages from the Win2AP software and the 2AP itself are recorded in two event logs. Events
can be a variety of things including reset and instrument status messages, communication errors,
program error codes, etc. Two event logs exist for Win2AP; one for messages downloaded from
the 2AP placed in a file called TWOAP.LOG and another for program-related messages placed in a
file called Win2AP.LOG.

To view the 2AP log, it must first be downloaded to the PC using FILE|DOWNLOAD 2AP LOG. The
log can then be viewed by selecting FILE|VIEW 2AP LOG. This log is generally used for diagnostic
purposes only if instrument malfunctions occur. The Win2AP.log for the current session can be
viewed at any time by selecting FILE|VIEW EVENT LOG. This log is generally used for solving
communication problems with the 2AP. The complete Win2AP log file is stored in the same
directory as the Win2AP program.

6.6 LOG

ITEMS


The character strings returned by the LOg command are described below. Some messages refer
to motors 0 and 1, which correspond to the azimuth and zenith motors respectively. While each
message is fairly self-explanatory the additional information may be helpful:

all log items reported

All items in the log have been reported. If a LO 1 command is executed this command is normally
the response to the next LO command.

analogue initialisation timed out

During initialisation the analogue inputs could not be read in the time allotted. This indicates a
problem with either the hardware or the firmware.

could not interpret/execute the following input command

A command was received by the 2AP that generated a NO response. The next log item is the
offending message. See section 6.3, and possibly previous log items, for an explanation of why the
command was unacceptable.