From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
11-27-2019 07:48 AM
Hi all
i am trying to write driver for Vitrek 4700 HV DMM, this DMM communicate through RS232.
When i send commands from NI max test panel i get respond from DMM but, when i try to
communicate from labview VI i get visa read error -1073807339 to *idn queryfor same communication settings
my question is are any hidden setup in ni max test panel ?
Solved! Go to Solution.
11-27-2019 07:54 AM
Most likely you need to init visa with enabled end characters.
Hard to say without any code...
It might be that max and LV are opened at the same time.
11-27-2019 08:00 AM
here is my code
11-27-2019 08:14 AM
@idans wrote:
here is my code
It is in fact (just) an image of your code... "ceci n’est pas une vi".
you might have better luck simply sending \n in the string. IIRC, visa uses the end characters for reading, but doesn't automatically attach the end character when sending data. Rational is probably that it doesn't know when you're message is complete. You could use multiple sends to send parts of one message.
I'd use "VISA Configure Serial Port.vi", as it's a bit less verbose...
11-27-2019 08:33 AM
I attached my vi after adding configure serial port and a /n char after *idn, but no good
11-27-2019 08:42 AM
@idans wrote:
I attached my vi after adding configure serial port and a /n char after *idn, but no good
There's no "/n" after "*IDN?" in that VI. And it should be "\n". And that will only work if the string is set to '\' code display mode. If not (normal display mode), simply add an enter.
11-27-2019 08:44 AM
my typo \n after idn?
11-27-2019 08:58 AM
@idans wrote:
my typo \n after idn?
You programmed the Serial port to use \r as an end character. Carriage Return (\r) should be Line Feed (\n). Probably, I didn't read the manual.
\r could be correct, but then you should also send \r. I think it should be \n though.
11-27-2019 08:59 AM
ok i got some advancment ' i added a for loop around *idn? query and i let run twice, at first iteration i get read error but in second loop i get a respons from instrument.
could someone explain me what is the problem? because i give the read vi long timeout ,5sec, but only at second attempt i get response
11-27-2019 09:22 AM
I'd remove the buffer flushing and changing the buffer size. This might be lagging (taking some time), spoiling the first send. I've never needed those.
A wait between the flushing\init and the send might fix the problem, but I'd avoid waits.
In general, I'd use the serial init VI.