Appendices by suchenfz

VIEWS: 19 PAGES: 33

									                               MENG GROUP 14




                  Appendices
    Project Symphony - Multiple Optical Camera
      and Support System for Particle Image
                  Velocimetry
           A Clark, B Falconer, S Lewis, M Olakara, M Piggott, K Singh
                                   2009-2010




1
1 Contents
1     Contents .......................................................................................................................................... 1

2     Dantec Traverse Protocol................................................................................................................ 3

    2.1      Notation: ................................................................................................................................. 3

    2.2      Variables: ................................................................................................................................ 3

    2.3      Commands .............................................................................................................................. 3

      2.3.1          Ready:.............................................................................................................................. 3

      2.3.2          Set Home position: .......................................................................................................... 4

      2.3.3          Go to Home position: ...................................................................................................... 4

      2.3.4          Move: .............................................................................................................................. 4

      2.3.5          Get Position: .................................................................................................................... 5

    2.4      Dantec Traverse Program ....................................................................................................... 5

3     RAID Computer operating instructions ......................................................................................... 10

    3.1      Installing ................................................................................................................................ 10

    3.2      Install Software ..................................................................................................................... 13

    3.3      Configuring the DHCP server ................................................................................................ 14

    3.4      Setting up Samba: ................................................................................................................. 15

    3.5      Starting up the computer...................................................................................................... 16

    3.6      Troubleshooting .................................................................................................................... 16

      3.6.1          X server using the wrong resolution ............................................................................. 16

      3.6.2          Network not working when first installed .................................................................... 17

      3.6.3          RAID Issues: ................................................................................................................... 18

4     Operating the system from the Remote Control Computer ......................................................... 20

    4.1      Starting up the computer...................................................................................................... 20

    4.2      Conducting a PIV test ............................................................................................................ 23

    4.3      Using YAPP ............................................................................................................................ 24

      4.3.1          Installing YAPP ............................................................................................................... 24

                                                        Appendices - Page 1 of 32
    4.3.2          Running YAPP ................................................................................................................ 24

    4.3.3          Opening a saved program ............................................................................................. 25

    4.3.4          Running a program........................................................................................................ 25

    4.3.5          Driving the LDA traverse with YAPP .............................................................................. 25

5   Belbin Roles ................................................................................................................................... 29

6   Design drawings ............................................................................................................................ 30

7   Works Cited ................................................................................................................................... 32




                                                      Appendices - Page 2 of 32
2 Dantec Traverse Protocol
The protocol for the Dantec Traverse was reverse engineered by using a serial port sniffer and
testing different options on the software we were provided with by Dantec.

The Dantec traverse uses serial port (RS232) communication to communicate with the machine.

       Baud Rate: 9600
       Data Bits: 8
       Parity: none
       DTR: On
       RTS: On

2.1 Notation:
All of the commands start with @0 and then a single character defining the command followed by a
comma separated list of parameters.

2.2 Variables:
       Position_x
       Position_y
       Position_z
       Calibration_x
       Calibration_y
       Calibration_z
       Speed

2.3 Commands
There are several commands that can be sent to the traverse, these will be immediately acted upon
giving remote control of the traverse.

2.3.1   Ready:
       Command: 7
       Returns 0 on no error
       This command must be run before doing any other commands with the traverse
       Example:

   01 @07



                                         Appendices - Page 3 of 32
2.3.2   Set Home position:
       Command: d
       This command seems to have something to do with setting the speeds to return to the home
        position at
       Example:
            o    Calibration_x: 10
            o    Calibration_y: 15
            o    Calibration_z: 20
            o    Speed: 20

   01 @0d200,300,400

2.3.3   Go to Home position:
       Command: R
       This command sends every axes specified in the negative direciton until it hits the limit
        switch
       Parameters:
            o    Axes: a single number which represents which axes to send home in binary (usually 7
                 to send all home)
       Example:

   01 @0R7

2.3.4   Move:
       Command: M
       Parameters:
            o    Position_x*Calibration_x
            o    Speed*Calibration_x
            o    Position_y*Calibration_y
            o    Speed*Calibration_y
            o    Position_z*Calibration_z
            o    Speed*Calibration_z
            o    Unknown (always seems to be 0)
            o    Speed*10
       Returns 0 on no error
       Example:
            o    Position_x: 100

                                       Appendices - Page 4 of 32
            o   Position_y: 150
            o   Position_z: 200
            o   Calibration_x: 10
            o   Calibration_y: 15
            o   Calibration_z: 20
            o   Speed: 20

    01 @0M1000,200,2250,300,4000,400,0,200

2.3.5   Get Position:
       Command: P
       This command returns the current position of the traverse (or what it thinks it is, this will be
        broken if it hits obstacles etc) in 6 digits of hex.
       Numbers above 80 00 00 mean that the number is negative (i.e. FE 56 32 means FE 56 32 -
        FF FF FF = -01 A9 CD = -109005)
       Example:

    01 @0P
            o   Returns 0 000BB8 000BB8 000BB8
            o   Meaning position is 3000,3000,3000

2.4 Dantec Traverse Program
The program to run the Dantec Traverse was writing in C++ using the CSerial library. The program
can be compiled with GCC from either MinGW or Cygwin by running the following on the command
line:

    01 g++ -o DantecTraverse.exe main.cpp
The source code of main.cpp is as follows:
   01 #include <windows.h>
   02 #include <iostream>
   03 #include <fstream>
   04 #include <string>
   05 #include <sstream>
   06 #include "Serial.h"
   07 using namespace std;
   08
   09 //declare the functions that will be used in the program
   10 bool doCommand(string command);
   11 bool sendCommand(string command);
   12 bool sendReady();
   13 bool sendHome(bool x, bool y, bool z);
   14 bool sendCalibrate(int cal_x, int cal_y, int cal_z);
   15 bool sendMove(int newXPos, int newYPos, int newZPos);

                                        Appendices - Page 5 of 32
16   template<class T> string toString(const T& t);
17   template<class T> T fromString(const string& s);
18
19   //declare our program variables
20   CSerial serialPort;
21   int port;
22   int baudRate;
23   string filename = "myFile.txt";
24
25   //declare the traverse related variables
26   int positionX;
27   int positionY;
28   int positionZ;
29   int calibrationX = 10;
30   int calibrationY = 10;
31   int calibrationZ = 10;
32   int speed = 250;
33
34   //start our main program function, taking command line
     arguments
35   int main(int argc, char *argv[])
36   {
37   //set default parameters and read in command line arguments
38        filename = "myFile.txt";
39        port = 5;
40        baudRate = 9600;
41        if(argc == 1)
42        {
43              cout << "No parameters specified, using defaults."
     << endl;
44              cout << "To specify use DantecTraverse.exe [port
     [filename [baudRate]]]" << endl;
45        }
46        else if(argc >= 2)
47        {
48              port = fromString<int>(argv[1]);
49        }
50        else if(argc >= 3)
51        {
52              filename = argv[2];
53        }
54        else if(argc >= 4)
55        {
56              baudRate = fromString<int>(argv[3]);
57        }
58        cout << "Parameters are: COM " << port << "; filename:
     \"" << filename << "\"; Baud Rate: " << baudRate << endl;
59
60      if(!serialPort.Open(port, baudRate))
61      {
62            cout << "Cannot open serial port " << port << " with
   Baud Rate " << baudRate << endl;
63            throw 1;
64      }
65 //enter the main program loop:


                        Appendices - Page 6 of 32
66      while(1)
67      {
68 //checks if the file ends with a full stop on a seperate line,
   this signifies that YAPP is finished writing to the file
69            ifstream iFile(filename.c_str());
70            string content((istreambuf_iterator<char>(iFile)),
   istreambuf_iterator<char>());
71            if(content.rfind("\n.") != string::npos)
72            {
73                  cout << content << endl;
74                  doCommand(content);
75                  ofstream oFile(filename.c_str(),
   fstream::trunc);
76            }
77            int waiting = serialPort.ReadDataWaiting();
78            if(waiting)
79            {
80                  char* buffer = new char[waiting];
81                  serialPort.ReadData(buffer, waiting);
82                  string incomming = buffer;
83                  cout << "Incoming: " << buffer << endl;
84                  delete buffer;
85            }
86      }
87 }
88
89 //this function sends the ready message to the traverse
90 bool sendReady()
91 {
92      string message = "@07";
93      return sendCommand(message);
94 }
95
96 //this function sends the traverse to its home position
97 bool sendHome(bool x, bool y, bool z)
98 {
99      int axes = 4*z + 2*y + x;
100     string message = "@0R" + toString<int>(axes);
101     return sendCommand(message);
102}
103
104//this function gets the current position of the traverse
105//this is only returned after the traverse has stopped moving
106bool sendGetPos()
107{
108     string message = "@0P";
109     return sendCommand(message);
110}
111
112//this function sends calibration values to the traverse
113//these are in multiples of 62.5 micrometres
114bool sendCalibrate(int newCalX, int newCalY, int newCalZ)
115{
116     string message = "@0d";
117     calibrationX = newCalX;


                      Appendices - Page 7 of 32
118      calibrationY = newCalY;
119      calibrationZ = newCalZ;
120      message.append(toString<int>(speed*newCalX) + ",");
121      message.append(toString<int>(speed*newCalY) + ",");
122      message.append(toString<int>(speed*newCalZ));
123      return sendCommand(message);
124}
125
126//this function sends movement values to the traverse
127//these are absolute positions and are multiplied by the
128//calibration values
129bool sendMove(int newXPos, int newYPos, int newZPos)
130{
131      string message = "@0M";
132      message.append(toString<int>(newXPos*calibrationX) +
   ",");
133      message.append(toString<int>(speed*calibrationX) + ",");
134      message.append(toString<int>(newYPos*calibrationY) +
   ",");
135      message.append(toString<int>(speed*calibrationY) + ",");
136      message.append(toString<int>(newZPos*calibrationZ) +
   ",");
137      message.append(toString<int>(speed*calibrationZ) + ",");
138      message += "0,";
139      message += toString(speed*10);
140      return sendCommand(message);
141}
142
143//this function sends a command to the traverse
144bool sendCommand(string command)
145{
146      cout << "Sending: " << command << endl;
147      command.append("\r");
148      if(serialPort.SendData(command.c_str(), command.size())
   == command.size())
149      {
150           return true;
151      }
152      else
153      {
154           return false;
155      }
156}
157
158//this function interprets the commands given in the file
159//and runs the equivalent in the program
160bool doCommand(string fullCommand)
161{
162      stringstream stream;
163      stream << fullCommand;
164      string firstCommand;
165      stream >> firstCommand;
166      if(firstCommand == "READY")
167      {
168           sendReady();


                       Appendices - Page 8 of 32
169     }
170     else if(firstCommand == "HOME")
171     {
172           sendHome(true, true, true);
173     }
174     else if(firstCommand == "GETPOS")
175     {
176           sendGetPos();
177     }
178     else if(firstCommand == "CALIBRATE")
179     {
180           string newCalX;
181           string newCalY;
182           string newCalZ;
183           getline(stream, newCalX, ',');
184           getline(stream, newCalY, ',');
185           getline(stream, newCalZ, ',');
186           sendCalibrate(fromString<int>(newCalX),
   fromString<int>(newCalY), fromString<int>(newCalZ));
187     }
188     else if(firstCommand == "MOVE")
189     {
190           string newXPos;
191           string newYPos;
192           string newZPos;
193           getline(stream, newXPos, ',');
194           getline(stream, newYPos, ',');
195           getline(stream, newZPos, ',');
196           sendMove(fromString<int>(newXPos),
   fromString<int>(newYPos), fromString<int>(newZPos));
197     }
198}
199
200//this function converts from an arbitrary type to a string
201template<class T> string toString(const T& t)
202{
203     ostringstream stream;
204     stream << t;
205     return stream.str();
206}
207
208//this function converts to an arbitrary type from a string
209template<class T> T fromString(const string& s)
210{
211     istringstream stream(s);
212     T t;
213     stream >> t;
214     return t;
215}




                      Appendices - Page 9 of 32
3 RAID Computer operating instructions
The following is a set of instructions for installing and operating the RAID computers. One particular
section that may be useful is 3.6.3(RAID Issues:) which contains information on how to check and
repair the RAID arrays should disk failures happen.

3.1 Installing
        Install Debian 5.0.2 i386 from usb stick. Note that other more recent versions of Debian
         should also work however the installation procedure may differ slightly from that below.
        Choose the region settings; these are very much up to personal preference.
        Region Settings:
             o   Choose language of choice (English)
             o   Choose region of choice (United Kingdom)
             o   Choose keyboard layout of choice (British English)
        We skip most of the network setup here, if you are on a network where you can get internet
         then it may be useful to let it connect as it will automatically update software for you later in
         the installation procedure.
        Network Settings:
             o   Choose primary network adapter (eth1 (the motherboard Ethernet port))
             o   Continue if DHCP autoconfiguration fails (as it isn't necessary at this point) and
                 choose "Do not configure the network at this time" at the next screen.
             o   Choose a hostname ("symphonyraid1" (increment the last number for each
                 machine))
        RAID configuration:
             o   As grub (the software that starts Linux running when you turn the PC on) can only
                 boot from RAID0 or RAID1 we have to create a small RAID1 partition to boot the
                 system from and a large RAID5 partition to store all our data on.
        Disk Partitioning:
             o   Choose "Manual" at the initial screen.

First create two RAID disk spaces on each disk, a small one for our RAID1 and a large one for our
RAID5.

             o   For each disk (lines labelled SCSI1-SCSI4):
                           Highlight the line for the current disk and press enter.
                           Choose Yes at the warning about removing all current partitions.


                                         Appendices - Page 10 of 32
                       Highlight the line under the current disk labelled "FREE SPACE" and press
                        enter.
                       Choose "Create a new partition".
                       Set the partition size to "5GB" and press continue.
                       Choose "Primary" for the new partition.
                       Choose "Beginning" for the new partition.
                       Highlight the "Use as" line and press enter.
                       Choose "physical volume for RAID".
                       Highlight "Done setting up the partition" and press enter.
                       Highlight the line under the 5GB partition just created labelled "FREE SPACE"
                        and press enter.
                       Choose "Create a new partition".
                       Leave the partition size at the default (Should be all the remaining space on
                        the disk) and continue.
                       Choose "Primary" for the new partition.
                       Highlight the "Use as" line and press enter.
                       Choose "physical volume for RAID".
                       Highlight "Done setting up the partition" and press enter.

Now we create a RAID1 that spans all the disks.

            o   After doing the above for each disk highlight the line that says "Configure software
                RAID" (above the list of hard drives) and press enter.
            o   Choose "Yes" to write the changes to the disks.
            o   Choose "Create MD device".
            o   Choose "RAID1".
            o   Set the active devices for the RAID1 array to 2.
            o   Set the number of spare devices for the RAID1 array to 2.
            o   Highlight the checkboxes by /dev/sda1 and /dev/sdb1 (should be first and third) and
                press space in each to make an asterisk (*) appear in each and then press tab to get
                to the continue button and press enter.
            o   Highlight the checkboxes by /dev/sdc1 and /dev/sdd1 (should be third and fifth) and
                press space in each to make an asterisk (*) appear in each and then press tab to get
                to the continue button and press enter.

Then we create a RAID5 that spans all the disks.

                                     Appendices - Page 11 of 32
            o   Choose "Create MD device" again.
            o   Choose "RAID5".
            o   Set the number of active devices for the RAID5 array to 3 (should be the default) and
                continue.
            o   Set the number of spare devices for the RAID5 array to 1 and continue.
            o   Highlight the checkboxes by /dev/sda2 , /dev/sdb2 and /dev/sdc2 and press space in
                each to make an asterisk (*) appear in each and then press tab to get to the
                continue button and press enter.
            o   Highlight the checkbox by /dev/sdd2 (should already be highlighted) and press space
                to make an asterisk (*) appear then press tab to get to the continue button and
                press enter.
            o   Choose "Finish".

Finally we create a partition for the root of the system ("/") and for the data partition ("/home").

            o   Highlight the line under the RAID1 device (should only say "#1      5.0GB" on it) and
                press enter.
            o   Highlight the "Use as" line and press enter.
            o   Choose "Ext3 journaling file system".
            o   Highlight the "Mount point" line and press enter.
            o   Choose "/ - the root file system".
            o   Choose "Done setting up the partition".
            o   Highlight the line under the RAID5 device (should only say "#1      3.0TB" on it) and
                press enter.
            o   Highlight the "Use as" line and press enter.
            o   Choose "Ext3 journaling file system".
            o   Highlight the "Mount point" line and press enter.
            o   Choose "/home - user home directories".
            o   Choose "Done setting up the partition".
            o   Move the highlight right to the bottom and choose "Finish partitioning and write
                changes to disk".
            o   If a warning comes up about swap space then select "No" to ignore it.
            o   Select "Yes" at the "Write the changes to disks" menu option.
            o   Select "Continue" at the warning about the kernel being unable to read the partition
                table on /dev/md0 and /dev/md1.


                                      Appendices - Page 12 of 32
Wait while the partitions format (this may take a while but don't despair).

Now we set up users Root (like an admin user account) and our initial user (which we should run
program as etc).

       Users:
             o   Type a Root password (you won't need this often but it is important, for this project
                 we use "symphony") and press enter.
             o   Confirm the root password by typing it again and pressing enter.
             o   Type the name of an initial user ("symphony") and press enter.
             o   Type the username for the account of the initial user ("symphony") and press enter.
             o   Type a password for the initial user ("symphony") and press enter.
             o   Confirm the password for the initial user and press enter.

Now we select which initial software to install. Because the USB version doesn't contain that much
software we will need to install a fair bit later too.

       Select and install software:
             o   Say No to the package usage survey question.
             o   Highlight the check boxes for "Desktop environment" and "Standard system" and
                 press space in each to make an asterisk (*) appear and make sure none of the others
                 are selected then press tab to move to the Continue button and press enter.
       Install the GRUB boot loader on a hard disk:
             o   Say Yes when asked to install the GRUB boot loader to the master boot record.
       Debian installation complete:
             o   Take the usb stick out when asked to and then press enter and the computer will
                 restart into Debian.
             o   Wait until a login screen appears asking for a username and then login with the
                 initial username and password defined above ("symphony", "symphony")

3.2 Install Software
       In a terminal run su and use the password defined for root to log in.
       Run visudo
       Find the line that says: root           ALL=(ALL) ALL
       Write on the line underneath it: symphony            ALL=(ALL) ALL


                                        Appendices - Page 13 of 32
      Press Ctrl+X to exit, press Y to save changes and press enter to confirm the filename.
      Before this step you may need to follow the trouble shooting guide for the network not
       working when the system is first installed (Appendix 3.6.2).
      Install packages:
           o   In a terminal run `sudo nano /etc/apt/sources.list`.
           o   Edit the file to say the following:

  01 deb http://ftp.uk.debian.org/debian/ lenny main non-free
     contrib
  02 deb-src http://ftp.uk.debian.org/debian/ lenny main non-free
     contrib
  03
  04 deb http://security.debian.org/ lenny/updates main
  05 deb-src http://security.debian.org/ lenny/updates main
  06
  07 deb http://volatile.debian.org/debian-volatile lenny/volatile
     main
  08 deb-src http://volatile.debian.org/debian-volatile
     lenny/volatile main
           o   Run sudo apt-get update
           o   Run sudo apt-get upgrade and press Y if asked to continue.
           o   Run sudo apt-get install dhcp3-server openssh-server samba
               network-manager-gnome and press Y when asked to continue. Press ok to the
               DHCP warning and answer Yes if samba asks about WINS servers. This may say
               something about DHCP server failing in red letters, ignore this.
           o   Optional other components to add to the install list: vim vim-scripts (text editor,
               takes some getting used to but is very powerful)

3.3 Configuring the DHCP server
      Run sudo nano /etc/dhcp3/dhcpd.conf and edit it to say:

  01   ddns-update-style interim;
  02   ignore client-updates;
  03
  04   option domain-name "symphony";
  05
  06   subnet 10.0.0.0 netmask 255.255.255.0 {
  07        server-identifier 10.0.0.1;
  08        range 10.0.0.2 10.0.0.255;
  09        default-lease-time 86400;
  10        max-lease-time 86400;
  11        authoritative;
  12
  13           host symphonysolid2 {
  14                option host-name "symphonysolid2";

                                     Appendices - Page 14 of 32
   15                  ddns-hostname symphonysolid2;
   16                  hardware ethernet 00:19:66:EB:0E:2E;
   17                  fixed-address 10.0.0.2;
   18          }
   19 }
Where symphonysolid2 is replaced by the hostname of the solid state computer you are getting
images from and the MAC address after "hardware ethernet" is its MAC address.

       Run sudo nano /etc/network/interfaces and edit it to say the following:

   01   # The loopback network interface
   02   auto lo
   03   iface lo inet loopback
   04
   05   # The primary network interface (PCI card)
   06   allow-hotplug eth0
   07   iface eth0 inet dhcp
   08
   09   # The secondary network interface (Motherboard)
   10   allow-hotplug eth1
   11   iface eth1 inet static
   12   address 10.0.0.1
   13   netmask 255.255.255.0

3.4 Setting up Samba:
       Run sudo nano /etc/samba/smb.conf and edit it to say the following:

   01 [global]
   02 # Change this to the workgroup/NT-domain name your Samba
      server will part of
   03 workgroup = WORKGROUP
   04 # server string is the equivalent of the NT Description field
   05 server string = %h server
   06 # If we receive WINS server info from DHCP, override the
      options above.
   07 include = /etc/samba/dhcp.conf
   08 # This will prevent nmbd to search for NetBIOS names through
      DNS.
   09 dns proxy = no
   10 log file = /var/log/samba/log.%m
   11 max log size = 1000
   12 syslog = 0
   13 panic action = /usr/share/samba/panic-action %d
   14 encrypt passwords = true
   15 passdb backend = tdbsam
   16 obey pam restrictions = yes
   17 unix password sync = yes
   18 passwd program = /usr/bin/passwd %u
   19 passwd chat = *Enter\snew\s*\spassword:* %n\n
      *Retype\snew\s*\spassword:* %n\n
      *password\supdated\ssuccessfully* .
   20 pam password change = yes

                                   Appendices - Page 15 of 32
   21
   22   [Symphony]
   23   comment = symphonyHome
   24   read only = no
   25   locking = no
   26   path = /home/symphony
   27   guest ok = yes
       After saving the file make the computer reload the configuration using sudo
        /etc/init.d/samba restart
       Usually the samba password will not be defined to start with so run `sudo smbpasswd -a
        symphony` and type a new password for the share (symphony) and then confirm the
        password.
       Accessing the share:
            o   You can test that this setup is working by going to the solid state Windows machine
                and typing `\\10.0.0.1` in to the run dialogue box on the Start menu and then using
                the user `symphony` and the password defined in the last step to open the share.
            o   You can make a shortcut on the desktop of the solid state Windows machine by
                opening "My Network Places" and then clicking "Add a network place" on the left
                had side.
            o   Follow the instructions using "Choose another network location" and typing
                "\\10.0.0.1\symphony" in the "Internet or network address" box, click next. You
                may need to login again with the details above if you haven't logged in for a while.
            o   Type a Name for the network place that you want to appear by the icon.

3.5 Starting up the computer
When the computer is booted up it will automatically go to a login screen; if maintenance is needed
then log in using username: symphony password: symphony; if not then it will operate correctly
without the need to log in.

3.6 Troubleshooting

3.6.1   X server using the wrong resolution
Monitor displays "Out Of Range". This is because the computer is trying to display a resolution that
the monitor cannot display, Debian will use usual resolutions but some cheap monitors (especially
widescreens) will not handle these.

       Press Ctrl+Alt+F1 to get to a text based view.
       Login as root (username: "root", password "symphony").


                                      Appendices - Page 16 of 32
       Run nano /etc/X11/xorg.conf
       Make sure that the file contains the following:

   01 Section "Screen"
   02      Identifier       "Default Screen"
   03      Monitor                "Generic Monitor"
   04      DefaultDepth     24
   05      SubSection "Display"
   06            Depth 1
   07            Modes "1280x1024" "1024x768" "640x480"
   08      EndSubSection
   09      SubSection "Display"
   10            Depth 2
   11            Modes "1280x1024" "1024x768" "640x480"
   12      EndSubSection
   13      SubSection "Display"
   14            Depth 4
   15            Modes "1280x1024" "1024x768" "640x480"
   16      EndSubSection
   17      SubSection "Display"
   18            Depth 24
   19            Modes "1280x1024" "1024x768" "640x480"
   20      EndSubSection
   21 EndSection
       Make sure that the numbers listed on the "Modes" lines are resolutions that the monitor is
        capable of displaying. These are in order of priority so it is usually best to start with the
        highest.
       Use Ctrl+X to exit and confirm that you wish to save the file.
       Press Ctrl+Alt+F7 to go back to the default terminal.
       Press Ctrl+Alt+Backspace to restart the display which should hopefully work.

3.6.2   Network not working when first installed
       I'm not sure why this happens but for some reason NetworkManager is sometimes not
        installed when Debian is installed.
       In a terminal run nano /etc/network/interfaces and make sure it has an entry for
        each network adapter as below:

   01   # The loopback network interface
   02   auto lo
   03   iface lo inet loopback
   04
   05   # The primary network interface (PCI card)
   06   allow-hotplug eth0
   07   iface eth0 inet dhcp
   08
   09   # The secondary network interface (Motherboard)
   10   allow-hotplug eth1

                                      Appendices - Page 17 of 32
   11 iface eth1 inet static
   12 address 10.0.0.1
   13 netmask 255.255.255.0
       Once these lines are in the file restart the system and (if you are plugged into an accessible
        network) you should have networking.
       Once this is done and you have installed NetworkManager in the package installation section
        you can also run sudo adduser symphony netdev which will allow you to add the
        NetworkManager applet (nm-applet) to the taskbar.

3.6.3   RAID Issues:
Each machine should have:

       A RAID1 array containing the operating system
            o   Containing 2 active disks and 2 waiting disks
            o   If one of the active disks should fail one of the waiting disks will automatically be put
                into service, keeping the system active
            o   Can cope with up to 2 disk failures
       A RAID5 array containing the data partition
            o   Containing 4 disks
            o   Should one disk fail the rest should continue to run as normal
            o   Can cope with one disk failure

You can find the status or the hard drives by running cat /proc/mdstat which will show you
the status of each of the disk arrays. A 'U' in square brackets at the end means that the disk is
healthy while an underscore means it is absent from the array.

If a hard disk should go down due to failure (from vibration or otherwise) the following commands
will create a new mirrored hard drive to replace the old one:

    1. Run cat /proc/mdstat and note which disk(s) have a (F) beside them (the disks will be
        of the form sda1[0], sdb1[1] etc) and which array they are in (the array will be of the form
        md1, md2 etc).
    2. Run mdadm /dev/md1/ -r /dev/sda1 which will remove the device from the array.
    3. If you think that the drive has actually failed rather than just had some data corrupted then
        you should replace the faulty hard drive here.
    4. Run mdadm /dev/md1/ -a /dev/sda1 which will re-add the device to the array and
        rebuild the array automatically.



                                      Appendices - Page 18 of 32
5. You can check the progress of the rebuild by running cat /proc/mdstat again. Note
   that a rebuild can take a long time (several hours).




                                Appendices - Page 19 of 32
4 Operating the system from the Remote Control Computer

4.1 Starting up the computer
1. Turn on PC. Batch file 'start.bat' will run automatically, connecting to all remote desktop
    connections in the folder on the desktop, and connecting to the remote power switch. If at any
    time you close a remote desktop and reconnect, simply reopen it from the 'Remote Desktop
    Connections' folder on the desktop, or close all windows and double-click 'start.bat'
           a. Remote Desktop connections are created using the ‘Remote Desktop Connection’
               Manager in Windows XP. Very few settings need to be changed. In the screen
               shown in Figure 1 enter the IP address of the computer you want to connect to (see
               Error! Reference source not found.Error! Reference source not found. for IP
               addresses), and the user name ‘symphony’. Figure 2 shows how to change the
               resolution of the remote desktop screen. These are the only changes required, and
               the settings can now be saved with the others in the 'Remote Desktop Connections'
               folder on the desktop.




                           Figure 1: Remote Desktop Connection Setup: General



                                     Appendices - Page 20 of 32
Figure 2: Remote Desktop Connection setup: Display




         Appendices - Page 21 of 32
2. Arrange remote desktops as required. Suggest the layout shown in Figure 3:




      Figure 3: Remote control computer layout. Top-Left, surveillance cameras; Top-Right, Camera control; Bottom-
                               Left, power switching, Bottom-Right, NTF Control Computer


3. Log in to the remote power switch, Firefox will remember the username and password, but for
    reference they are: username: admin, password: symphony
4. Start the software on the remote machines
            a. Solid state camera control computers - Double click the 'CamWare' shortcut on each
                 remote desktop.
            b. Control computer – Double click the Experiment.yapp file on the desktop which
                 should start up YAPP
                       i. See Appendix 4.3.2.1 for more information on how to create new .yapp
                          programs.
            c. Control computer – Double click the DantecTraverse.bat file which will start the
                 Dantec Traverse program.
                       i. See Appendix 4.3.5 for more information on how to run the Dantec Traverse
                          with different setup options.

The remote control computer is now ready to start PIV operations.




                                         Appendices - Page 22 of 32
4.2 Conducting a PIV test
  1. Setting up Camware
         a. If this is the first time using this camera and computer load the settings for the
             camera under the 'Camera -> Load Camera Settings' menu. The settings file,
             PCO2000.pcs is located on the desktop (see Figure 4).




                           Figure 4: Camera Settings file on camera control computers


         b. On the camera control computers, in Camware, select 'File -> Direct Record To File'
             (See Figure 5).




                               Figure 5: Camware Direct Record to File menu selection


         c. Navigate to the raid server in the 'Direct Record To File' dialog by clicking the
             'Desktop' icon, double-clicking the raid server shortcut, then double-click the
             'Images' folder.
         d. Enter the filename (e.g. test), file type (8bit Bitmap File), and No. of images to store
             (e.g. 100), then click Start.
         e. Select 'Yes' on the warning that pops up about 8bit files, and Camware is ready to
             start image acquisition.
  2. Setting up YAPP


                                     Appendices - Page 23 of 32
            a. Click the ‘Run...’ button (shown as a green triangle) and the program will start
                 running.
                     i. For more information on YAPP see Appendix 4.3.
    3.   In the event of an error
            a. Check all network leads are correctly connected in the remote control room.
            b. Close the problematic remote desktop window and reopen it from the relevant
                 shortcut in the 'Remote Desktop Connections' folder on the desktop, OR, close all
                 windows (including Firefox) and run 'start.bat', also on the desktop.
            c. If the NTF computers do not recover on reconnecting remote desktops, use the
                 IPpower controls in Firefox to power off any or all NTF computers connected to that
                 switch. On toggling the power back on the NTF computers will automatically boot
                 up. Allow them 5 minutes to do this before re-attempting remote desktop
                 connection.
            d.   If none of the above helps, then all connections and hardware in the NTF should be
                 checked for the source of the problem.

4.3 Using YAPP

4.3.1    Installing YAPP
The easiest way to install YAPP is simply to copy the entire YAPP folder to the computer one wishes
to run it from and then run the executable named YAPP.exe which will create file associations with
.yapp files. For ease of access it may be advisable to make a shortcut to YAPP on the desktop (right
click on YAPP.exe, click “Create Shortcut” and then drag the shortcut created to the desktop.

4.3.2    Running YAPP
Open YAPP by double clicking on YAPP.exe or a shortcut to it and either creating a new program or
running a saved program as described below.

4.3.2.1 Creating a new program
Use the “Experiment” menu in the top left and click “New...”

Choose the “Create a blank experiment” option and click Ok.

Three windows will appear: Hardware, Workflow and Variables.

4.3.2.1.1 Hardware
This window shows a diagram of the hardware that is used in the program. New pieces can be
added by using the buttons on the right and finding the components that one wishes to use in the


                                      Appendices - Page 24 of 32
lists of items. Double clicking on a component will bring up its properties. Each piece can be moved
around and grouped by dragging to make organisation easier.

4.3.2.1.2 Workflow
This window shows a flow chart of the program that is to be run during the experiment. The Setup
phase is run once at the start of the program, the Acquisition phase is run as many times as specified
(this can be changed by clicking the number of measurements under the loop), the Conclusion phase
is run once at the end of the program.

Click the “Add Action...” button to add more actions to each phase. One can use if statements to
make conditional statements in each of these phases. Unfortunately nested loops are not possible
with YAPP at the current time, and adding this functionality would require significant editing of the
source code.

4.3.2.1.3 Variables
This window shows a plot of each of the variables used in the program. To adjust these plots click on
the variable name on the left hand side and choose from the options, this allows for static values,
simply graded values, lookup lists and complex formulas to determine the value of the variable at
each step.

4.3.3   Opening a saved program
Use the “Experiment” menu in the top left and click “Open...”

Browse to the previously saved .yapp file and double click on it.

4.3.4   Running a program
While a program is open in YAPP there should be three windows within YAPP (Workflow, Hardware
and Variables), while these are present click the “Run” button (A green triangle on the top toolbar).

4.3.5   Driving the LDA traverse with YAPP
Due to the LDA traverse not being a registered component within YAPP, and the only available
version of the YAPP source code being very old, a work around was made which allowed the traverse
to be controlled via writing to files and a pass-through program.

The program (DantecTraverse.exe) is required on the machine running YAPP, the source code is at
[reference].

To use the traverse follow the following instructions:

       Find out which serial port the LDA Traverse is attached to

                                     Appendices - Page 25 of 32
        o   Click on the Windows start menu

        o   Click Run

        o   Type “devmgmt.msc” and press enter

        o   Click on the + beside “Ports (COM & LPT)”

        o   Find the port that the traverse is attached to (it should be something like COM5, this
            will be used in this example)

   Choose a filename that is unused in the same folder as DantecTraverse.exe, myFile.txt is the
    default and will be used in this example

   In the YAPP program commands can be written to this file and will be executed by the pass-
    through program.

        o   The commands are as follows:

                   READY

                            Tells the traverse that it will be sent commands

                            Must be sent before any other commands

                   HOME

                            Tells the traverse to move to its home position

                            Moves negative on all axes until the limit switches are pressed

                   GETPOS

                            Gets the current position from the traverse

                            This is only used for debugging, it will be shown in the output of
                             DantecTraverse.exe but cannot be read from YAPP

                   CALIBRATE x,y,z

                            This calibrates the speed of each axis of the traverse

                            Using CALIBRATE 16,16,16 has been found to make the traverse
                             move 1mm when told to move a distance of 10

                                 Appendices - Page 26 of 32
                  MOVE x,y,z

                          This tells the traverse to move to this position

                          This is an absolute position measured from the home position

     o     Each command must be followed by a line with ONLY a full stop on it

     o     Each command may take some time to be sent over the serial interface, a pause of
           around 200ms is recommended even for commands that don’t involve movement.

     o     CAUTION: YAPP has no way of determining whether the traverse has finished
           moving or whether it has encountered any errors on the way. The traverse has limit
           switches at the ends so it should not go off the end however it may end up in a
           different location from expected if not given time to complete each movement.

     o     Example program:

                  In this example we use the program’s default file of “myFile.txt” and briefly
                   set up the traverse, send it to its home position and then visit each position
                   in YAPP’s variables list.

                  Setup phase:

                          Write to myFile.txt:

14 READY
15 .
                          Pause for 200ms

                          Write to myFile.txt:

01 CALIBRATE 16,16,16
02 .
                          Pause for 200ms

                          Write to myFile.txt:

01 HOME
02 .
                          Pause for 10s

                  Acquisition phase:


                                 Appendices - Page 27 of 32
                          Write to myFile.txt:

01 MOVE <!x!>,<!y!>,<!z!>
02 .
                          The variables are signified by “<!x!>” and will produce the variable
                           at the current cycle in YAPP’s Variables panel.

   Run DantecTraverse.exe

       o   The defaults for DantecTraverse.exe are:

                  Port: COM5

                  File: myFile.txt

                  Baud Rate: 9600

       o   If these defaults are different to what the traverse is set up with these can be
           changed by running DantecTraverse.exe with parameters as follows:

                  Click on the Windows start menu

                  Click Run

                  Type “cmd” and press enter

                  Type “cd ” and then the path to the directory where DantecTraverse.exe is
                   (probably something like “F:\Symphony\YAPP\Dantec”) and then press
                   enter

                  Type “DantecTraverse.exe 5 myFile.txt 9600” and press enter

                          Replace 5 with the port (5 means COM5)

                          Replace myFile.txt with the file

                          Replace 9600 with the baud rate (this is unlikely to need changing)

   Run the YAPP program by clicking the green “run” button.




                                 Appendices - Page 28 of 32
5 Belbin Roles
                        Table 1: Belbin roles (Belbin Associates, 2007)

Belbin roles              Description
Implementer              Well-organized and predictable. Takes basic ideas and
                         makes them work in practice. Can be slow.
Shaper                   Lots of energy and action, challenging others to move
                         forwards. Can be insensitive.
Completer/Finisher       Reliably sees things through to the end, ironing out the
                         wrinkles and ensuring everything works well. Can worry too
                         much and not trust others.
Plant                    Solves difficult problems with original and creative ideas.
                         Can be poor communicator and may ignore the details.
Monitor/Evaluator        Sees the big picture. Thinks carefully and accurately about
                         things. May lack energy or ability to inspire others.
Specialist               Has expert knowledge/skills in key areas and will solve
                         many problems here. Can be disinterested in all other
                         areas.
Coordinator              Respected leader who helps everyone focus on their task.
                         Can be seen as excessively controlling.
Team worker              Cares for individuals and the team. Good listener and
                         works to resolve social problems. Can have problems
                         making difficult decisions.
Resource/investigator    Explores new ideas and possibilities with energy and with
                         others. Good networker. Can be too optimistic and lose
                         energy after the initial flush.




                              Appendices - Page 29 of 32
6 Design drawings




                    Appendices - Page 30 of 32
Appendices - Page 31 of 32
7 Works Cited
Archer, T. &. (1999, 08 07). CSerial - A C++ Class for Serial Communications. Retrieved from Code
Guru: http://www.codeguru.com/cpp/i-n/network/serialcommunications/article.php/c2503

Belbin Associates. (2007). Belbin Team Role Theory. Retrieved April 2010, from Belbin.com:
http://www.belbin.com/rte.asp?id=8




                                     Appendices - Page 32 of 32

								
To top