Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Cannot Read from MAX

Hi all,

 

I want to use NI-VISA to communicate with my chip. I can detect the correct port and write to the chip successfully, but I cannot "read". It always has timeout, like the picture attached.

 

So can I read from VISA READ programming? Or do you have any suggestions about this?

 

BTW, I am sure the device is good, because I can read from other software/GUI.

 

Thanks!

 

 

command test.png

0 Kudos
Message 1 of 7
(4,337 Views)
Since you know the connection is okay, then what you are writing is probably incorrect. You can use the utility called portmon from microsoft to compare what you are sending and what the vendor's program is sending.

You need to realize that you can send complete garbage with a serial write and you will never get an error.
0 Kudos
Message 2 of 7
(4,331 Views)

Thanks!

 

But I cannot run Portmon. It shows "Not connected'. It is because my computer is Window7_64 bit?

 

BTW, I write the command according to the "commands table", which shows in the below.

 

commands table.png

0 Kudos
Message 3 of 7
(4,325 Views)
You are sending ascii characters in MAX and not hex.
0 Kudos
Message 4 of 7
(4,321 Views)

 

I tried by choosing hex, but did not work.

 

BTW, I don't understand the format of command. Do I need to add "\' between command and data?

 

Thanks!

 

cmd-hex.png

0 Kudos
Message 5 of 7
(4,313 Views)
Sorry, I'm posting from my phone and going by memory. I don't recall if MAX even supports hex.

The \n is a new line character and if you are adding to each byte, that is also incorrect.
0 Kudos
Message 6 of 7
(4,305 Views)

Hi jennyzzz,

 

Check out this resource for how to send hexadecimal commands in a VISA Test Panel.

 

David B.
Applications Engineer
National Instruments
0 Kudos
Message 7 of 7
(4,288 Views)