09-23-2024 01:01 AM - edited 09-23-2024 01:05 AM
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.
Solved! Go to Solution.
09-23-2024 02:48 AM
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.
09-23-2024 03:00 AM
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)
09-23-2024 03:13 AM
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.
10-16-2024 04:55 AM
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!