diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2012-07-14 21:08:12 -0500 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2012-07-14 21:08:12 -0500 |
commit | 47f193b7dea740d95b0827855d0d4d3faefe3b72 (patch) | |
tree | f352d6bd7a680919a388cc6596c8b1189431790e /servers/gpib_server_lin | |
parent | 663e2f7a3d1ae0a40f45e760c3ae6998d79c1a2f (diff) | |
download | ulab-47f193b7dea740d95b0827855d0d4d3faefe3b72.tar.gz ulab-47f193b7dea740d95b0827855d0d4d3faefe3b72.zip |
Fix scope
Diffstat (limited to 'servers/gpib_server_lin')
-rw-r--r-- | servers/gpib_server_lin/src/scope_functions.cpp | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/servers/gpib_server_lin/src/scope_functions.cpp b/servers/gpib_server_lin/src/scope_functions.cpp index deda671..fb7d9a1 100644 --- a/servers/gpib_server_lin/src/scope_functions.cpp +++ b/servers/gpib_server_lin/src/scope_functions.cpp @@ -632,6 +632,13 @@ clock_gettime(CLOCK_REALTIME, &tp1); #ifdef ENABLE_EXTRA_DEBUGGING printf("[DEBG] Writing: %s\n\r", falpha); #endif + if (gpib_write(gpibDevice, falpha) != 0) { + return -1; + } + sprintf(falpha,"DATA:STOP 65535"); + #ifdef ENABLE_EXTRA_DEBUGGING + printf("[DEBG] Writing: %s\n\r", falpha); + #endif if (gpib_write(gpibDevice, falpha) == 0) { #ifdef ENABLE_PROFILING clock_gettime(CLOCK_REALTIME, &tp2); @@ -662,7 +669,7 @@ printf("[PROFILE] %f s\n\r", ((tp3.tv_nsec+(tp3.tv_sec*1e9))-(tp2.tv_nsec+(tp2.t clock_gettime(CLOCK_REALTIME, &tp4); printf("[PROFILE] %f s\n\r", ((tp4.tv_nsec+(tp4.tv_sec*1e9))-(tp3.tv_nsec+(tp3.tv_sec*1e9)))/1e9); #endif - TQString preamble(segarray); // RAJA UNCOMMENT ME + TQString preamble(segarray); TQStringList resultPairs = TQStringList::split(";", preamble, FALSE); // Find/initialize critical data values double ymult; @@ -858,6 +865,14 @@ int scope_get_channel_seconds_div(double * retval, int desired_channel, const ch return 2; } + sprintf(falpha,"DATA:STOP 65535"); + #ifdef ENABLE_EXTRA_DEBUGGING + printf("[DEBG] Writing: %s\n\r", falpha); + #endif + if (gpib_write(gpibDevice, falpha) != 0) { + return 2; + } + sprintf(falpha,"WFMPRE:CH%d:XINCR?",desired_channel); #ifdef ENABLE_EXTRA_DEBUGGING printf("[DEBG] Writing: %s\n\r", falpha); @@ -910,6 +925,7 @@ int scope_get_channel_seconds_div(double * retval, int desired_channel, const ch else { floatstring[ai]=0; *retval = ((atof(floatstring)*xincr)/scope_get_number_of_vertical_divisions(scopeType, gpibDevice)); +printf("[RAJA DEBUG 650.0] nr_p: %f, xincr: %E, vert_divs: %d, s/div: %f\n\r", atof(floatstring), xincr, scope_get_number_of_vertical_divisions(scopeType, gpibDevice), *retval); fflush(stdout); } #ifdef ENABLE_EXTRA_DEBUGGING @@ -944,6 +960,14 @@ int scope_get_channel_sample_count(unsigned long * retval, int desired_channel, return 2; } + sprintf(falpha,"DATA:STOP 65535"); + #ifdef ENABLE_EXTRA_DEBUGGING + printf("[DEBG] Writing: %s\n\r", falpha); + #endif + if (gpib_write(gpibDevice, falpha) != 0) { + return 2; + } + sprintf(falpha,"WFMPRE:CH%d:NR_P?", desired_channel); #ifdef ENABLE_EXTRA_DEBUGGING printf("[DEBG] Writing: %s\n\r", falpha); |