There are a few things to note in this routine. First, is the ioperm() which must be run as root in order to execute properly. This is why I have created the script in /home/ingrid/obs/bin/rootfix which sets the permissions on lbc so the ioperm() call will be successful. The rootfix script needs to be run as route to work. It contains the following lines:
# cd ~obs/pdprp chown root lbc chmod 4711 lbcSecond, the Base Address for the Digital I/O board is 0x300UL. However, since we apparently blew some 82C55A chips on the I/O card, I have changed the code to make the Base 0x310UL and have re-cabled the board accordingly. We are therefore currently using different ports than we had originally. The I/O board is broken up into 8 groups of 3 ports each with 8 bits per port, for a total of 192 lines. Once we replace the defective chips and put the wiring the way it is supposed to be, we should change the definition of the BASE keyword in lbc.c. BASE is a #define'd variable defined at the top of the code.
Third, the serial ports in this routine are allocated from /dev/ttyC0 to /dev/ttyCX where X is given by the code's NUMSPORT variable. Therefore, if additional ports on the card are being assigned tasks that should not be set-up by this routine, they should be the ports starting at /dev/ttyC7 and working down, so that the ports from /dev/ttyC0 and up are all allocated in the loop in initialize_io.
The file Hardware.notes contains information on the current pin and port assignments. The documentation we received with these two hardware boards are in the computer Ingrid's documentation box.
The code keeps track of two files with settings, bench.params and bench.save. bench.params is the standard settings file that gets read automatically on start-up and saved automatically every time the cycle is Started or the program Quit. bench.save is the alternate set of parameters the observer can Save and Load on demand.
Return to PDPRP Technical Info Page
Return toPDPRP Main Page.