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.

Cannot send commands to my Oscilloscope

Post Reply
Jaspan
Posts: 4
Joined: July 5th, 2016, 9:09 am
Country: United Kingdom

Cannot send commands to my Oscilloscope

Post by Jaspan » July 22nd, 2016, 2:37 am

Hi,

I'm trying to send commands to my DPO 2024B, however, it will only respond to queries. for instance, when i send;

Code: Select all

cout << scope.sendCommand("DATa:SOUrce?");
it will tell me its reading from Channel 1, however, if i send;

Code: Select all

scope.sendCommand("DATa:SOUrce CH1");
It takes this as a bad command, and crashes the USB, giving "nothing returned" for all queries and needs the USB to be physically re-set.

This happens with every command that i send, although sometimes when it crashes, it stores the command, and then runs it next time. For instance, the command;

Code: Select all

scope.sendCommand("HEADer ON");


Crashes it, but if i subsequently run;

Code: Select all

scope.sendCommand("HEADer?");
It will place headers by all my outputted queries.

Any help or comments would be greatly appreciated, I've only been doing this for a couple of weeks.

Many thanks,
Adam

Jaspan
Posts: 4
Joined: July 5th, 2016, 9:09 am
Country: United Kingdom

Re: Cannot send commands to my Oscilloscope

Post by Jaspan » July 22nd, 2016, 8:43 am

I think the problem is in the object 'scope', the manual states that i need to send an EOM (End of Message) command after the line. so i'm trying to terminate each line at the end of 'sendCommand'.

To do this, i need the ascii command for end of line; i've tried 04 (End of Transmission), 25 (End of medium) and 13 - 10 (CR - LF) but none of these seem to work.

does anyone know the ascii command for EOM?

David N
Tektronix Applications
Tektronix Applications
Posts: 525
Joined: July 31st, 2008, 8:26 am

Re: Cannot send commands to my Oscilloscope

Post by David N » July 27th, 2016, 1:38 pm

Not sure of your exact programming environment. Appears that you are writing code in C++. If you are using a Visa library, you may want to look at some example remote instrument examples we have in the “Remote Instrument Communications Examples” forum group. They are at: viewtopic.php?f=580&t=133570.

Post Reply

Return to “Programming Support”

Who is online

Users browsing this forum: No registered users and 6 guests