summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTimothy Pearson <tpearson@raptorengineering.com>2019-05-08 19:56:41 -0500
committerTimothy Pearson <tpearson@raptorengineering.com>2019-05-08 19:56:41 -0500
commit256facf7d34b09ba5da23af652a3bccd69ffe8f1 (patch)
treea472358d4fd2aee06881c6fce0ebaada314c616e
parentfebfc4d4a05bd4ed06510a8fb8d62c8fc65b6f1e (diff)
downloadulab-256facf7d34b09ba5da23af652a3bccd69ffe8f1.zip
ulab-256facf7d34b09ba5da23af652a3bccd69ffe8f1.tar.gz
Properly configured headers on TDS744A scopes before trying to establish communications
-rw-r--r--servers/gpib_server_lin/src/scope_functions.cpp19
1 files changed, 14 insertions, 5 deletions
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;