LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Visa Issues

 I am trying to modify  the driver that comes with the lakeshore 311 temperature controller. The sample VI only had GPIB connectivity, but I would like to use serial. I have cheked that the port is working properly, but I always get the same error from VISA READ telling me that the visa has timedout. I think there maybe an issue with the terminating character. I attached my code below. The program is in lsci331 and is called "getting started temperature", the error is in the initialize VI. The 3 missing VIs--write to serial, clean up and default setup--can be found in lsci311u. Any help would be greatly appreciated.

 

Here is the serial info about the controller

Timing format: Asynchonous

Transmission Mode: Half Duplex

Baud RAte: 300,1200,9600

Handshake: Software timing

Character bits; 1 start, 7 data, 1 parity, 1 stop

Parity: Odd

Terminators: CR, LF

Command Rate: 20 per sec maximum

Download All
0 Kudos
Message 1 of 16
(3,344 Views)
Have a look at the attached document. Page 23 explains something about termination characters.
Regards,
André (CLA, CLED)
0 Kudos
Message 2 of 16
(3,328 Views)
The issue I am having is I am using a configure visa vi that i did not write and am unsure how to write a LF character to the end. Here is the VI, i am currently passing in a value of 10 for termination char.
0 Kudos
Message 3 of 16
(3,300 Views)
I don't know why you would post a vI that is on the Instrument I/O>Serial palette especially since it is not used in the intialize VI and there is nothing in the VISA Configure Serial Port for termination characters on a write. The initialize function does have code to add a LF as a term character on a write. Check the manual to see if that is correct or whether you need a CR or LF/CR. Also check to see whether you can communicate to the instrument with Hyperterminal. If you can't you might have the wrong type of serial cable or incorrect com port settings.
0 Kudos
Message 4 of 16
(3,295 Views)
How do I check to see if i have a connection using Hyperterminal? Also, I changed my initlization code to include the configure visa VI. I attached the new VI below. 
0 Kudos
Message 5 of 16
(3,285 Views)

You just made things a lot worse by modifying the initialize function. Now you have nothing that sets a term character for a write and the first write in the initialize is going to fail every time. It's not a good idea to make random changes withoug understanding what the ramifications are.

 

Hyperterminal is a utility program that ships with windows. If it's installed, in windows you get to it from Start>Programs>Accessories>Communication.

 

Did you check on any of the other questions? What does the manual say to use as termination character? What does the manual say about the type of cable to use.

0 Kudos
Message 6 of 16
(3,283 Views)
The connector type is a 9 pin D-Style plug. The manual states that the CR and LF are used to indicate the end of a message string.
0 Kudos
Message 7 of 16
(3,264 Views)

When you're using MS VISTA, Hyperterminal is not installed, you will have to get it from this website, make sure to select "Locatie 2".

 

In hyperterminal you select the correct COM port and COM port settings and press connect. Sometimes devices say something right away, but mostly you would now have to enter a command and press "return", then the device should respond.

 

This is, for at least, the first step into getting a serial device to work where there is no standard device driver available. It eliminates any programming errors and focusses on hardware connectivity being correct.

Regards,
André (CLA, CLED)
0 Kudos
Message 8 of 16
(3,250 Views)

wowden wrote:
The connector type is a 9 pin D-Style plug. The manual states that the CR and LF are used to indicate the end of a message string.

The type of physical connector is not really relevant. I asked to check the type of cable that is required and by that I meant either a null modem or straight through cable.

 

It does appear that with your LSCI 331 Serial Write that you are using the correct termination characters. That would leave a problem with the cable or the com settings.

0 Kudos
Message 9 of 16
(3,238 Views)

Oh sorry, the manual states that either a standard null modem cable or null modem adapter. I checked my cable with a multi meter and the pins are right. Also for the synchronous I/O mode for read and write should it be  synchronous or asynchronous. The manual states asynchronous, but the sample VI has them set to synchronous. Thanks alot for your help.

 

 


0 Kudos
Message 10 of 16
(3,228 Views)