Project

General

Profile

Flight simulator board

Documentation

Setting up the Flight Simulator Board

The BU Flight Simulator Board (FSB) documented here and more extensively here is used to send test pulses into the ASDQ for testing purposes.

It is an FPGA that is communicated to via USB using python.

To set this up you need to:
  • Add the python serial module to your PYTHONPATH.
    1. Download pyserial from here and unpack into /tmp
    2. cd /tmp/pyserial-2.7
    3. python setup.py install --home=XXXX
      where XXX is the directory you want to install it e.g. $GM2_ROOT/python
    4. edit gm2-tracker-daq/software/trackerDaq-setup.sh and add
      export PYTHONPATH=XXXX/lib/python/
    5. source ./trackerDaq-setup.sh
  • if this works then the simple command should work:
    python
    >>> import serial
  • Update the protection on the /dev/ttyUSB0
    1. Plug and unplug the USB and check using "dmesg" for the vendor and product ID of the device. You should see something like
      usb 2-1.2: New USB device found, idVendor=0403, idProduct=6001
    2. As root create a new file: /etc/udev/rules.d/99-usbtty.rules which has the line:
      ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", MODE=“666"
      This sets the ownership of /dev/ttyUSB0 to 666 for this device based on above vendor and product ID.
    3. Then plug and unplug the USB and you should see the correct permissions i.e. 666 for the device.
      crw-rw-rw-. 1 root dialout 188, 0 Sep 8 16:01 /dev/ttyUSB0
  • Run the code
    1. cd gm2-tracker-daq/software/bin/flightSim
    2. python loadtimes.py
      You should see something like (using the default trackersim.conf)

p=2
p 000fa
d 0fff
d 1fff
d 2fff
d 3fff
c 0 00271
c 1 00271
c 2 00271
c 3 00271
c 4 0003e
c 5 00271
c 6 0003e
c 7 00271
c 8 00271
c 9 00271
c a 00271
c b 00271
c c 00271
c d 00271
c e 00271
c f 00271
p 000fa
auto = on
(cont on)
$