Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Serial Port: Device is communicating well with VISA-IC but not with VI...

Hi all!
 
I am trying to communicate with a device(Power Meter: ML2438A) using RS 232 serial port...
When I send a command using VISA-IC it worked fine.. but when I send the same command using a VI (Basic_serial_write_&_read.vi), it did nothing..don't even throw an error...   when I tried to read data it has thrown time out error.
 
I tried loopback test on the same VI it worked well..
 
Now the problem is Device is communicating well with VISA-IC but not with VI..
 
I am attaching NI-Spy results and specified VI.. Plz help me out
 
TIA
 
Bye
Brij.
0 Kudos
Message 1 of 6
(4,073 Views)
I didn't look at your vi so i don't know if you did this already but it has gotten me before. Did you set up the serial port baud rate, stop bits.... a loop back test will not show this problem it will make it look like everything is set up ok.
0 Kudos
Message 2 of 6
(4,068 Views)
Settings are not the problem I checked them many times....
0 Kudos
Message 3 of 6
(4,066 Views)
Hi all!
 
 Plz help me out .. I am struggling with the same problem since a week.....
 
 Problem is Device is communicating well with VISA-IC but not with Visa VI...
 There is no problem in parameters (Baud rate, parity....) setting. I have checked it many times.
 
 While debugging I have seen that just after write, the Nos. of byte at serial port is  ZERO .What does it mean??
 
Plz Help me out.. I am attaching the VI also.
 
Thanks for help.
 
Bye
Brij.
0 Kudos
Message 4 of 6
(4,063 Views)
I think you're sending the characters "\" and "n" and not the control character. Make sure you have '\' Code Display turned on.
0 Kudos
Message 5 of 6
(4,057 Views)
Thanks to everybody... Now I am getting what I wanted..
 
Bye
Brij
0 Kudos
Message 6 of 6
(4,038 Views)