next up previous contents
Next: CUBES.INI example Up: Operation Previous: Using Commands   Contents


Initializing the ZY

After the client program has verified the connection, it is ready to make measurements. At this point, though not absolutely necessary, the client program should initialize the ZY program, by sending the INITZY command. When the ZY receives this command, it will retrieve (via binary ftp) three initialization files from the ZIY host: CUBES.INI, ZYnnn.INI (where nnn is the ZY number, a 3 digit number with leading zeroes if necessary; for example: ZY001.INI for ZY1), and finally zpname.INI.

Figure 3.1: ZY Initialization Flowchart.
\begin{figure}
\setlength{\unitlength}{2em}
\begin{picture}(18.000000,28.500...
...6667}}
\put(8.6667,-5.0000){\line(1,3){0.6667}}
\end{picture}
\end{figure}

CUBES.INI contain commands that are used by every ZY, ZYnnn.INI contains commands that are specific to a particular ZY (monument coordinates etc)., so that there will be one ZYnnn.INI for each ZY in the system, and zpname.INI contains commands specific to the laser/mirror assembly (ZP). See appendix A, section A.4 for the location of these files. The ZY program saves these locally to A:CUBES.INI, A:ZY.INI, and A:ZP.INI, renaming any previous copies to A:CUBES.BAK, A:ZY.BAK and A:ZP.BAK. As shown in figure 3.1, the ZY first retrieves and executes (``runs'') CUBES.INI and ZY.INI. From an entry in ZY.INI, the ZY learns the name of the ZP that is attached to it (zpname), and can then retrieve the correct zpname.INI file, save it to ZP.INI and execute the commands in it. When the ZY executes commands found in these files, it sends it's responses to these commands back to the client program, as if the client program had sent these commands itself. This will allow the client program to initialize any of its own data structures as necessary. Finally, when all the commands contained in these initialization files have all been executed, the ZY will acknowledge the INITZY command by sending the string `INITZY 1' back to the client, if the ftp get was successful, or `INITZY 0, <error msg>' if the ftp failed. In the case where the `ftp get' failed, the ZY program will have restored CUBES.INI, ZY.INI and ZP.INI from the backup files CUBES.BAK, ZY.BAK and ZP.BAK, and executed the commands from these older initialization files. It is the client program's responsibility to decide how to proceed in the event of an INITZY failure. Note that if this is the first time that the ZY was initialized, there may be no old copies of CUBES.INI, ZY.INI and ZP.INI, and that even if old copies exist, the information contained within them may be out of date, so it is highly recommended that the client program terminate in the event of an INITZY failure and that the cause of the problem be determined.

Subsections
next up previous contents
Next: CUBES.INI example Up: Operation Previous: Using Commands   Contents
Ramon E. Creager 2002-03-11