Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Tektronix MDO3014 VISA *IDN? query returning a series of hex numbers

Solved!
Go to solution

peggyliu_0-1727070711375.png

Hello,

As I mentioned in the topic, after a series of self-defined function, when I try to rerun the initialize VI of Tektronix MDO3014 oscilloscope, it shows the error message. I guess that the problem is that the IDN query returned message doesn't show in the correct format, while everything works alright if I turn off and turn on the scope again. But things go on the same path when I rerun my function. 

My question is that, is there any possible function or command can change the returned value or format of IDN query?(I originally assume that it'll be no way to change the value bc it's pre-defined by the manufacturer) maybe I can try to find out where the returned massage format has been changed in my code.

 

0 Kudos
Message 1 of 5
(242 Views)

I can only imagine two reason for this. There is still data in the output buffer from an earlier command send through a different software program or your device is damaged.

Rolf Kalbermatter
My Blog
0 Kudos
Message 2 of 5
(225 Views)

Hello Rolf, thanks for reply, I just found out that in my previous write-in buffer, a command line includes Line Feed constant, it seems that all the data in the buffer turn into ASCII format! everything goes correctly after I deleted that constant.

But that's quite weird, as I know, line feed constant serve the same functionality as "/n" in a string, while it turns all the string in the buffer into ACSII. (please correct me if I got something wrong)

0 Kudos
Message 3 of 5
(218 Views)
Solution
Accepted by topic author peggyliu

It is very unclear what you mean with line feed constant.

And /n is simply a string with two characters, \n can be an escaped new line character if and only if the according string display element is set to use \ escape display mode.

 

For the command line in the NI Max Interactive Control panel this is the case, as is in C source code when typing a literal string within double quotes. But in LabVIEW it depends what you set the display mode of a string constant or control too. Default is "Normal Display" mode and in that case \n is simply a two character string. If you set the string control to "'\' Codes Display" mode, then the \n will be translated to a new line character in memory but display as \n since that is more helpful than having a non displayable character on screen.

Rolf Kalbermatter
My Blog
0 Kudos
Message 4 of 5
(210 Views)

You are right. I always get confused with the forward- and backward-slash. I meant the change line commands. After all, my problem is solved! Thanks for help!

0 Kudos
Message 5 of 5
(134 Views)