LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

VISA issues when switching from Labview 5.0 to 8.5

Hello all
 
I am using a pressure transducer that I read using RS-232. In Labview 5.0 I used the Read Serial VI and it worked with no issues (I also tested it with the VISA from 5.0 with no problems either). Now I have upgraded to 8.5 and I seem unable to communicate with it anymore. The usual error I get when i try to read is a timeout error.
I ran the Troubleshooting Serial Line Monitor VI and it seems to work (RI blinks when the output lines are off, DCD RI and CTS blink when DTR is on, and RI DSR and CTS blink when RTS is pushed) The Basic Read and Write VI does not work however. Whenever I get bytes at port it always returns 0. I am using a USB-RS232 converter but this problem remains when I tried using an RS232 port on another computer running 8.2.
 
I recently added the VISA 4.3 drivers but this did not help.
 
Thanks for any ideas.
 
Thomas
0 Kudos
Message 1 of 11
(3,351 Views)

There were some changes to the VISA serial communication from LV5 to LV8.x.

Can you post your code (LV8.5) so that we can see how you have implemented it? 

R

0 Kudos
Message 2 of 11
(3,348 Views)
Hey

Which code are you referring to? I was just using the Example VI's provided with Labview.

I've attached the two I referred to earlier here.
0 Kudos
Message 3 of 11
(3,334 Views)

The code you posted works fine with LV8.2 & LV8.5.

Are you saying that this code does not work with your LV8.5 installation?

R

0 Kudos
Message 4 of 11
(3,330 Views)
The code runs but I am unable to read anything with the Basic Write and Read vi.
0 Kudos
Message 5 of 11
(3,322 Views)

Are you able to communicate with the target by using some other software such as HyperTerminal?

If so, are you using the exact same settings?  Is the port number the correct one?

R

0 Kudos
Message 6 of 11
(3,315 Views)
And are you including the \r\n when you send a command to the instrument? That is a CR and LF in '\' Codes Display.
0 Kudos
Message 7 of 11
(3,307 Views)

This morning I tried with both the DOS prompt and Indigo terminal emulator. I also checked the setting on my manometer and the manual says that the settings should be:

Baud Rate: 9600

Parity: None

Auto Line Feed: Yes

Margin: 0

Decimal Point: "."

Send EOF: Yes

I then followed the instructions to set the port with MODE COM5:9600,N,8,1,P and it returned

transfer rate: 9600

parity: none

databits: 8

stop bits:1

timeout: on

XON/XOFF: OFF

CTS-handshaking: ON

DSR-handshaking: ON

DSR-sensitivity: OFF

DTR cycle: Handdhake

RTS cycle: Handshake

Then when I try to log the data with COPY COM5 log.txt it creates a txt file on my desktop with no information.

 

I checked the parameters on the old Labview 5.1 (not 5.0 as I said earlier) computer and they were

Error Replacement Character: 0

Flow Control XOFF Character: 0

Flow Control XON Characcter: 0

Serial Baud Rate: 9600

Serial Data Bits:8

Serial End Mode for Reads: Term Char

Serial End Mode for Writes: None

Serial Flow Control: None

Serial Parity: None

Serial Stop Bits: 1.0

Those were the only parameters available in the Serial Settings Node

With 8.5 I got all the same except

End Mode for Reads: None (when I changed it to TermChar, it didn't help)

XON: 17

XOFF: 19

There were many many more modem line settings but I didn't include them because they weren't in Labview 5.1

 

 

 

 

0 Kudos
Message 8 of 11
(3,293 Views)
I tried both with and without \r\n in all combinations with no success.
0 Kudos
Message 9 of 11
(3,292 Views)
I solved the problem. It was a hardware issue with the cable I was using. Now all VI's work perfectly with no issues. Thanks for your help

Thomas
0 Kudos
Message 10 of 11
(3,280 Views)