AnsweredAssumed Answered

Cannot acquire data from channels 2-4 & math!!! please help!

Question asked by shtubi on Dec 23, 2012
Latest reply on Jan 6, 2013 by shtubi
When i'm trying to use parts of the example of VISA on C, acquiring data from channel 1 is ok but when im trying to get the preambles from channels 2-4 or Math, i get a "Query Unterminated" pop up on the scope, and all the values are 0!!

the relevant part of the code i use is:

viOpen(defaultRM, sco, VI_NULL,VI_NULL, &vi);


viPrintf(vi, ":MEASURE: CHANnel2\n");

viPrintf(vi, ":DIGITIZE CHAN2\n");
viPrintf(vi, ":WAVEFORM:POINTS 100\n");
viQueryf(vi, ":WAVEFORM:PREAMBLE?\n", "%,10lf\n", preamble);

printf("Preamble FORMAT: %e\n", preamble[0]);
printf("Preamble TYPE: %e\n", preamble[1]);
printf("Preamble POINTS: %e\n", preamble[2]);
printf("Preamble COUNT: %e\n", preamble[3]);
printf("Preamble XINCREMENT: %e\n", preamble[4]);
printf("Preamble XORIGIN: %e\n", preamble[5]);
printf("Preamble XREFERENCE: %e\n", preamble[6]);
printf("Preamble YINCREMENT: %e\n", preamble[7]);
printf("Preamble YORIGIN: %e\n", preamble[8]);
printf("Preamble YREFERENCE: %e\n", preamble[9]);