04-07-2009 07:37 AM
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
04-07-2009 08:32 AM
04-07-2009 10:36 AM
04-07-2009 10:58 AM
04-07-2009 11:22 AM
04-07-2009 11:30 AM
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.
04-08-2009 02:49 AM
04-08-2009 05:14 AM
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.
04-08-2009 09:02 AM
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.
04-08-2009 10:15 AM
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.