Tektronix Technical Forums are maintained by community involvement. Feel free to post questions or respond to questions by other members. Should you require a time-sensitive answer, please contact your local Tektronix support center here.

it takes me 300milliseconds to read pk2pk value.can it be faster?

Post Reply
kenash
Posts: 1
Joined: September 10th, 2021, 1:41 am
Country: Russian Federation

it takes me 300milliseconds to read pk2pk value.can it be faster?

Post by kenash » September 10th, 2021, 1:49 am

it takes me 300milliseconds to read pk2pk value from tds2024c. can it be faster?say,30milliseconds?
Am i doing it right? below is my c++ code

Code: Select all

        status = viWrite(vi, (ViBuf) "MEASUREMENT:IMMED:VALUE?", 24, &retCnt);
	if (status < VI_SUCCESS) {
		HandleError();
		return 1;
	}
	t = std::chrono::system_clock::now();
	// Clear the buffer and read the response
	memset(buffer, 0, sizeof(buffer));
	status = viRead(vi, (ViBuf)buffer, sizeof(buffer), &retCnt);
	if (status < VI_SUCCESS) {
		HandleError();
		return 1;
	}
	return 0;

Dave W
Tektronix Applications
Tektronix Applications
Posts: 333
Joined: April 26th, 2010, 12:01 pm
Country: United States

Re: it takes me 300milliseconds to read pk2pk value.can it be faster?

Post by Dave W » September 23rd, 2021, 8:34 am

Hi Kenash,

That's not too surprising that it would take that long on a TDS2024C. When you do an immediate measurement ("MEASURMENT:IMMED") the instrument will calculate the value upon receiving that command and does not use a cached value (for example any value seen on screen). The TDS2000C series doesn't have the beefiest processor in the world so it can take a little time to recalc that measurement, especially if the scope is still in run mode and acquiring new data.
To speed it up you can try stopping the acquisitions if you haven't already. You can also try just reading back on-screen measurement values, although do note that there is a slight delay from the point of an acquisition completing and the on-screen measurement updating so this works best if the scope is just in free-run acquisition mode rather than in single sequence acq. mode.

Post Reply

Return to “Programming Support”

Who is online

Users browsing this forum: No registered users and 2 guests