diff --git a/servers/gpib_server_lin/src/scope_functions.cpp b/servers/gpib_server_lin/src/scope_functions.cpp index a60ce3f..96030c4 100644 --- a/servers/gpib_server_lin/src/scope_functions.cpp +++ b/servers/gpib_server_lin/src/scope_functions.cpp @@ -775,26 +775,35 @@ int scope_perform_initial_setup(const char * scopeType, int gpibDevice) { return -1; } else if (strcmp("TDS744AOS", scopeType) == 0) { - sprintf(falpha,"DATA:ENCDG RIBINARY"); + sprintf(falpha,"HEAD OFF"); #ifdef ENABLE_EXTRA_DEBUGGING printf("[DEBG] Writing: %s\n\r", falpha); #endif if (gpib_write(gpibDevice, falpha) == 0) { - sprintf(falpha,"DATA:WIDTH 2"); + sprintf(falpha,"DATA:ENCDG RIBINARY"); #ifdef ENABLE_EXTRA_DEBUGGING printf("[DEBG] Writing: %s\n\r", falpha); #endif if (gpib_write(gpibDevice, falpha) == 0) { - sprintf(falpha,"DATA:START 1"); + sprintf(falpha,"DATA:WIDTH 2"); #ifdef ENABLE_EXTRA_DEBUGGING printf("[DEBG] Writing: %s\n\r", falpha); #endif if (gpib_write(gpibDevice, falpha) == 0) { - sprintf(falpha,"DATA:STOP %d", SCOPE_TRACE_MAX_POINTS-1); + sprintf(falpha,"DATA:START 1"); #ifdef ENABLE_EXTRA_DEBUGGING printf("[DEBG] Writing: %s\n\r", falpha); #endif - return 0; + if (gpib_write(gpibDevice, falpha) == 0) { + sprintf(falpha,"DATA:STOP %d", SCOPE_TRACE_MAX_POINTS-1); + #ifdef ENABLE_EXTRA_DEBUGGING + printf("[DEBG] Writing: %s\n\r", falpha); + #endif + return 0; + } + else { + return -2; + } } else { return -2;