12-02-2020 06:58 AM
I have been trying to communicate with my new Instec mk2000 temperature controller through a simple self wrote LABView program ( i am beginner) but getting Timeout error in VISA read.
I tried communicating in MAX. Write and Query work fine. But read shows error ( but works fine when called after write or query)
Here are some screenshots
ThanksBlock
MAX
Front
Timeout
12-02-2020 07:58 AM
Hi kharkhua,
@kharkhua wrote:
I tried communicating in MAX. Write and Query work fine. But read shows error ( but works fine when called after write or query)
Do you know the meaing of those "\n" chars in MAX?
Do you know the difference between default display mode of a string control/constant and the "\-code"-display mode?
Do you know you can set the display mode indicator visible for a string control in its options?
Please make that display mode indicator visible. Switch to \-code display. Then write "*IDN?\n" into the string control. Then run the VI: most probably your device is expecting the LF char (aka NL aka newline aka "\n") as a TermChar and will only answer after receiving it…
12-02-2020 01:22 PM - edited 12-02-2020 01:23 PM
To elaborate a bit on GerdW's reply:
The \n in the VISA test panel represents a "newline" character. The VISA panel shows control characters as "backslash codes". It isn't helpful that the only way to know this is by someone telling you!
So when you send the *IDN?\n in the VISA test panel, it is actually sending the text *IDN? followed by a newline character.
So what does this mean for you? In your code, you can either: use a text constant with its default settings and type in *IDN? followed by a newline character - the Enter key will do this for you - or you can set the constant's display mode to \ and type in the command exactly as it was displayed in the VISA test panel.
One very good habit to develop is, if you are displaying a constant, control, or indicator in a non-default way, make sure to make the display mode (for strings) or the radix (for numerics) so that people who look at the code - including yourself at a later date - know what they are looking at.
12-02-2020 10:36 PM
Thanks gred for the response.
I know what '\n' means but i am not familiar with the things that you have mentioned in second and third questions.
Anyways I did change somethings ( not sure if correct ) but the error persists.
Thank you
12-02-2020 11:43 PM
You need to set the Write string control to \display mode. Then fix the string that you are sending.