Changeset 9905 for fact/tools/FAD/simple_daq/simple_daq.cpp
- Timestamp:
- 08/30/10 11:27:07 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
fact/tools/FAD/simple_daq/simple_daq.cpp
r261 r9905 20 20 #include "../SocketFunctions/SocketFunctions.h" 21 21 22 22 #include "iostream" 23 24 int init_fad(); 23 25 int *SocketDescriptor; 26 using namespace std; 24 27 25 28 int main(int argc, char *argv[]) … … 72 75 } 73 76 } 77 init_fad(); 74 78 75 79 … … 77 81 signal (SIGINT, int_handler); // Cleanup after SIGINT (CTRL-C) 78 82 83 // init_fad(); 84 // fflush (stdin); 79 85 // Main loop 80 86 while (true) … … 97 103 98 104 memset (Buffer, 0, sizeof (Buffer)); 105 106 107 // init board -- should be switchable 108 // with a commandline switch, but ... 109 // TODO 110 99 111 100 112 // Data from STDIN … … 146 158 } 147 159 printf (" done\n"); 160 161 148 162 149 163 exit (exit_status); … … 178 192 return conf; 179 193 } 194 195 int init_fad(){ 196 197 cmd_send ("sra 10\n", SocketDescriptor[0]); 198 cmd_send ("sa 44 29\n", SocketDescriptor[0]); 199 cmd_send ("t\n", SocketDescriptor[0]); 200 cmd_send ("sa 44 30\n", SocketDescriptor[0]); 201 cmd_send ("t\n", SocketDescriptor[0]); 202 cmd_send ("sa 44 0\n", SocketDescriptor[0]); 203 cmd_send ("t\n", SocketDescriptor[0]); 204 cmd_send ("sclkoff\n", SocketDescriptor[0]); 205 cmd_send ("de\n", SocketDescriptor[0]); 206 cmd_send ("dr\n", SocketDescriptor[0]); 207 cmd_send ("sra 1024\n", SocketDescriptor[0]); 208 EmptySockets(SocketDescriptor, 8, 750000L); 209 210 printf ( "\n\n FAD initialised. \n " 211 "ROI is 1024. \n" 212 "DRS shift registers are initialised.\n" 213 "DRS is up and running.\n"); 214 215 return 0; 216 } 217
Note:
See TracChangeset
for help on using the changeset viewer.