02-06-2022 09:15 PM - edited 02-06-2022 10:06 PM
Equipment: Agilent E4440A Spectrum Analyzer
i connect laptop to this instrument via GPIB-USB-HS, when i do visa test panel in NI MAX, i encounter error during Read ( Write, Query works OK).
screenshot of the error message below
screenshot of setting of my visa test panel
Also, i tried the sample code inside Labview GPIB with VISA function.vi, and error appears when it reaches VISA read part, as shown as screenshot below
initialize OK, write OK, read ERR
Do reply to my post if you have a slight idea what might be the problem
THANK YOUUU 😉
02-06-2022 09:44 PM
While using ni max you are using termination character "\n" in the query, while in the labview code you are not using it. Concatenate the query with a linefeed constant and check the result.
02-06-2022 09:53 PM - edited 02-06-2022 09:58 PM
hi thank you for replying,
although i used "\n" in Ni MAX visa test panel, i still got time out error. when i testing READ.
no problem when i WRITE, QUERY.
i not sure what is the reason.
and i am very new inn\ labview, do you mind explaining how i can do this?
"Concatenate the query with a linefeed constant and check the result."
i dont really understand what this sentence means 😥
02-06-2022 10:27 PM
You were getting error in ni max because you were trying to read 1024 bytes of data when the actual data size is around 40-50 bytes only.
the above image shows how to concatenate 2 strings.
just add a line feed constant with your query
02-07-2022 01:17 AM - edited 02-07-2022 01:27 AM
i tried reducing bytes to read to 40 and 50... TimeOut error still exist 😩
i understand timeout error means, nothing is read from the instrument i connected to.
02-07-2022 01:23 AM - edited 02-07-2022 01:29 AM
is it what you mean ?
Sorry if i misunderstood
btw, this is the example code inside labview, under hardware i/o under GPIB
02-07-2022 01:50 AM
you have to add termination while writing and not reading
02-07-2022 02:02 AM
Modified program
program error during run
02-07-2022 02:09 AM
Instead of \n try using which you can find in strings pallet and reduce the bytes to read to a lesser value
02-07-2022 02:12 AM
Hi all the experienced seniors,
So basically i always have reading TimeOut ERR , whenever i read from the spectrum analyzer in my own program/ example code/ visa test panel.
(the program i posted is all labview built-in example code for testing purposes only)
is there anything that i might missed out? hardware? setting ? driver ?
Appreciate a lot, this issue has been with me for daysss..😬
i couldnt test if my program even works, if i cant read from the equipment :<