LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

I can read my serial instrument perfectly in Labview 6i. In Labview 6.1 the second time I send a

string to the instrument the writing to the serial port does not terminate and freezes my VI. Also, the VisaWrite function always produces "return count" equal to 0. Some VISA property node is set differently in Labview 6.1, I guess. Thanks: th@jhu.eduI can read my serial instrument perfectly in Labview 6i. In Labview 6.1 the second time I send a string to the instrument the writing to the serial port does not terminate and freezes my VI. Also, the VisaWrite function always produces "return count" equal to 0. Some VISA property node is set differently in Labview 6.1, I guess. Thanks: th@jhu.edu
0 Kudos
Message 1 of 7
(3,149 Views)
string to the instrument the writing to the serial port does not terminate and freezes my VI. Also, the VisaWrite function always produces "return count" equal to 0. Some VISA property node is set differently in Labview 6.1, I guess. Thanks: th@jhu.eduI have had no trouble with using serial communication with LabVIEW 6.1 and VISA. Make sure that you call VISA Close after each serial session. Try running the LabVIEW <-> Serial example which ships with LabVIEW. Run it multiple times and see if you get the error here.
J.R. Allen
0 Kudos
Message 2 of 7
(3,149 Views)
string to the instrument the writing to the serial port does not terminate and freezes my VI. Also, the VisaWrite function always produces "return count" equal to 0. Some VISA property node is set differently in Labview 6.1, I guess. Thanks: th@jhu.eduI have encountered problems with differences between different VISA versions. I had a program which set the DTS line to "-1" which worked perfectly in one VISA version, and was problematic in another.

Are both systems running the same VISA version?

Shane
Using LV 6.1 and 8.2.1 on W2k (SP4) and WXP (SP2)
0 Kudos
Message 3 of 7
(3,149 Views)
string to the instrument the writing to the serial port does not terminate and freezes my VI. Also, the VisaWrite function always produces "return count" equal to 0. Some VISA property node is set differently in Labview 6.1, I guess. Thanks: th@jhu.eduYes, the VISA version in both cases is
2.6 (implementation) and
2.2 (specification).

The problem still persists.

Thanks. th@jhu.edu
0 Kudos
Message 4 of 7
(3,149 Views)
string to the instrument the writing to the serial port does not terminate and freezes my VI. Also, the VisaWrite function always produces "return count" equal to 0. Some VISA property node is set differently in Labview 6.1, I guess. Thanks: th@jhu.eduThanks for the reply.

I make sure the VISA session is always closed
before it is opened again. The VI works exactly
as it should with LabVIEW 6.0 and freezes with
LabVIEW 6.1.

Thanks: th@jhu.edu
0 Kudos
Message 5 of 7
(3,149 Views)
string to the instrument the writing to the serial port does not terminate and freezes my VI. Also, the VisaWrite function always produces "return count" equal to 0. Some VISA property node is set differently in Labview 6.1, I guess. Thanks: th@jhu.eduThe VISA Configure Serial Port function did change between 6.0 and 6.1. It had to do with the termination character settings. I believe the change only had an effect if you are setting Enable Termination Char to true. You should compare the 6.0 and 6.1 functions to see if that would account for the problems you're seeing.
0 Kudos
Message 6 of 7
(3,149 Views)
string to the instrument the writing to the serial port does not terminate and freezes my VI. Also, the VisaWrite function always produces "return count" equal to 0. Some VISA property node is set differently in Labview 6.1, I guess. Thanks: th@jhu.eduTihomir:

If you never quite got this figured out, you might want to try upgrading to NI-VISA 3.0.1. We fixed a handful of Serial problems, and I've copied a snippet from the readme below. And while it's not captured below, I remembered we fixed some other DTR/DSR problem as well.

Also, don't forget about NI Spy. It can help pinpoint exactly which call is failing.

Dan Mondrik
National Instruments
----------------------------
For a Serial INSTR resource, viOpen will now open a port if the process that had been using that port exited ungracefully (such as with Ctrl-C). The previous behavior had been that viOpen would return VI_ERROR_RSRC_BUSY.

For a Serial INSTR resource, multiple sessions to the same port caused weird behavior if you tried to bo
th write and read data simultaneously. This has been fixed.

For a Serial INSTR resource, if you enabled RTS/CTS flow control and then manually tried to set the state of the RTS line, some operating systems would generate VI_ERROR_NSUP_ATTR while others would return VI_SUCCESS but not actually modify the state of the line. Neither of these behaviours was correct. Now NI-VISA will return VI_ERROR_INV_SETUP in this case on all operating systems.

For a Serial INSTR resource, the RS-485 wire mode attribute now works properly on Windows XP/2000.

For a Serial INSTR resource, if a parity or framing error occurred, NI-VISA would not return the correct error condition. This has been fixed.
0 Kudos
Message 7 of 7
(3,149 Views)