System information

Section 3. The CR200 Datalogger
3-7
Use the File Control Command with a FileCmd parameter of 0x08 to stop the
program currently running on the datalogger.
Check the File Control Response. If the RespCode returns a zero, determine
the amount of time to wait as declared in the HoldOff parameter before
continue the process. Otherwise, report and act on the error result.
Use the File Download Command message to send the new program file to the
datalogger. The new program file must have the “.BIN” file extension.
Usually the new program is larger than the 100-byte MaxPktSize of the CR200
datalogger so it should be separated into packets that will fit into the
MaxPktSize. After sending each packet, the application should check the
RespCode and FileOffset parameters for errors. The file download operation
should stop immediately if an error occurs and the error should be handled. If
a response is not received, the application can retry the same packet. If there
are no problems, the packets should be sent in sequential order to the
datalogger.
Use the File Control Command with the FileCmd parameter set to 1 to run the
new program on the datalogger. Since the CR200 series datalogger does not
contain a file system that allows storage of old programs or files, the only
option really available at this step is to run the current program.
Check the File Control Response. If the RespCode returns a zero, determine
the amount of time to wait as declared in the HoldOff parameter before
continuing the process. Otherwise, report and act on the error message.
Finally, use the Get Programming Statistics transaction and obtain compile
results to verify the new datalogger program information.
3.7.3 Interpreting the Response
After the compiled datalogger program has been sent, the application should
receive a File Download Response message. The response code within this
message indicates what action the application should attempt next. Possible
response codes include: complete (0x00), permission denied (0x01),
insufficient resources or memory full (0x02), invalid fragment number (0x09),
invalid file name (0x0d), and file is not currently accessible (0x0e).
3.7.4 Handling Rejection
When everything goes as planned, the datalogger indicates the program was
sent successfully with a response code of complete (0x00). However, if a
problem occurs when sending a program, the datalogger will indicate the
nature of the problem with the appropriate response code.
There have been cases where a “permission denied” message has been received
from the CR200. Since security can not be enabled on the CR200, this
message actually indicates that the Swath parameter of the requested packet
exceeds the maximum PakBus packet size of 1000 bytes. The application
should not request a packet size larger than the maximum from the datalogger
in the Swath parameter of the File Upload Command message.
Finally, the application must determine how long to wait before discarding a
transaction and retrying the packet with a new transaction number when a
command has been sent but a response hasn’t been received. The expected