Allow GPIB server to read full storage of TDS744A scopes

master
Timothy Pearson 6 years ago
parent c866f91716
commit 6630bb1a18

@ -36,10 +36,12 @@
#include <tqimage.h>
#define SCOPE_TRACE_MAX_POINTS 131072
extern char falpha[1024];
unsigned char scope_raw_screenshot_data[4194304];
double scope_raw_trace_data[65535];
double scope_raw_position_data[65535];
double scope_raw_trace_data[SCOPE_TRACE_MAX_POINTS];
double scope_raw_position_data[SCOPE_TRACE_MAX_POINTS];
char scope_segarray[4194304];
@ -788,7 +790,7 @@ int scope_perform_initial_setup(const char * scopeType, int gpibDevice) {
printf("[DEBG] Writing: %s\n\r", falpha);
#endif
if (gpib_write(gpibDevice, falpha) == 0) {
sprintf(falpha,"DATA:STOP 65535");
sprintf(falpha,"DATA:STOP %d", SCOPE_TRACE_MAX_POINTS-1);
#ifdef ENABLE_EXTRA_DEBUGGING
printf("[DEBG] Writing: %s\n\r", falpha);
#endif
@ -841,7 +843,7 @@ clock_gettime(CLOCK_REALTIME, &tp1);
if (gpib_write(gpibDevice, falpha) != 0) {
return -1;
}
sprintf(falpha,"DATA:STOP 65535");
sprintf(falpha,"DATA:STOP %d", SCOPE_TRACE_MAX_POINTS-1);
#ifdef ENABLE_EXTRA_DEBUGGING
printf("[DEBG] Writing: %s\n\r", falpha);
#endif
@ -915,9 +917,9 @@ clock_gettime(CLOCK_REALTIME, &tp5);
printf("[PROFILE] %f s\n\r", ((tp5.tv_nsec+(tp5.tv_sec*1e9))-(tp4.tv_nsec+(tp4.tv_sec*1e9)))/1e9);
#endif
#ifdef ENABLE_EXTRA_DEBUGGING
printf("[DEBG] Trying to read %i bytes from GPIB device...\n", 65535*2);
printf("[DEBG] Trying to read %i bytes from GPIB device...\n", (SCOPE_TRACE_MAX_POINTS-1)*2);
#endif
ai = gpib_read_array(gpibDevice, 65535*2, scope_segarray);
ai = gpib_read_array(gpibDevice, (SCOPE_TRACE_MAX_POINTS-1)*2, scope_segarray);
if (ai == -1) {
return -1;
}
@ -1083,7 +1085,7 @@ int scope_get_channel_seconds_div(double * retval, int desired_channel, const ch
return 2;
}
sprintf(falpha,"DATA:STOP 65535");
sprintf(falpha,"DATA:STOP %d", SCOPE_TRACE_MAX_POINTS-1);
#ifdef ENABLE_EXTRA_DEBUGGING
printf("[DEBG] Writing: %s\n\r", falpha);
#endif
@ -1177,7 +1179,7 @@ int scope_get_channel_sample_count(unsigned long * retval, int desired_channel,
return 2;
}
sprintf(falpha,"DATA:STOP 65535");
sprintf(falpha,"DATA:STOP %d", SCOPE_TRACE_MAX_POINTS-1);
#ifdef ENABLE_EXTRA_DEBUGGING
printf("[DEBG] Writing: %s\n\r", falpha);
#endif

Loading…
Cancel
Save