Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Lakeshore model340 seriel input

Hi,
 
I have read the threads on using the other HP VI, which Dennis recommended, to cut and past the seriel portion into the Initialize VI.
 
My problem is after creating the new open Visa and connecting the brown label(Visa Session for class) to the brown connector on the Open Visa, I still get an error.
 
The error is on the main page(Getting Started Temp controller) because the main VI is sending input on a pink string (INSTR Descriptor(GBIB::12)) and the initialize VI is expecting input from a brown string.  
 
Also, when I am in the initialize VI and I delete the INSTR Descriptor (GPIB::12) pink box, then in the Getting Started VI an error occurs, because the line is broken, obviously. 
 
I probably am missing something obvious but any help is appreciated.
thanks
 
0 Kudos
Message 1 of 14
(5,077 Views)
Hi,
 
Attached is the driver with the modified Initialize and Examples
0 Kudos
Message 2 of 14
(5,063 Views)
Thanks, I will look at your file
 
I got the wiring to work with what I was doing.  It initializes but it crashes when trying to read the buffer in the datasensor.vi.  I assume this is a settings issue, but I cannot figure out which setting to change.  I assume it has something to do with synching the input and output from the buffer's read\write.
 
Maybe the file you offered has a solution.
0 Kudos
Message 3 of 14
(5,042 Views)
Hello,
 
Your configuration for the seriel port was more elegant than my version, but I get the same crash when I run your vi.  The read data sensor command always crashes.  I cannot figure out why.  My best guess is it has something to do with the termination characters.
 
The vi is set-up to put out a constant string of LF terminators in the seriel port configure file, is this correct?  Where does the program put this continuous string of LFs?
 
Also, in the data sensor vi.  there is a command for (\n) to go with each write or read, should that be there, if I have the continuous LFs running around?
 
The model 340 can only be set for either CR/LF terminators or LF terminators.  It seems to crash about the same with either setting.
0 Kudos
Message 4 of 14
(5,027 Views)

Hi,

I didn't have the model 340 to test the modifications. I made the modifcations that are included in the templates for serial settings.  You might be able to get the specific information about the termination character(s) from the manual.

0 Kudos
Message 5 of 14
(5,016 Views)
The manuel tells me the settings....
 
I do not know how to incorporate them into the software properly.
 
That is why I am just hoping someone who has an operating model340 on seriel connection can help me.
0 Kudos
Message 6 of 14
(5,012 Views)
If you have an electronic copy of the manual or a link, post that and you can get some help.
0 Kudos
Message 7 of 14
(5,008 Views)

Here is the location of the manuel

http://www.lakeshore.com/temp/cn/340dn.html

The settings I am using are the following

9600 Baud

8 bits

No Parity

1 Stop Bit

have tried CR/LF and just LF

0 Kudos
Message 8 of 14
(4,975 Views)
Some of your comments are confusing. In the modified library, in no place is 'a constant string of LF terminators' put out and in the Data Sensor VI, a CR is stripped from the response if it exists. If it's not there, no problem. You also use the word 'crash' a lot. Can you define what that means to you? To me, the worst thing that could happen is that an error is returned. That, to me, is much different than a 'crash'.
 
Also, in the link you provided, there is a procedure to test the connection with Hyperterminal. Have you done this basic step? If that doesn't work, then there is no sense in trying LabVIEW. If that fails, then verify that you have the correct com settings and the correct cable. Did you purchase a cable form them or make your own?
0 Kudos
Message 9 of 14
(4,969 Views)

Hello,

I will try and explain things more clearly, hopefully the following will clear up some of the confusion I am causing...

In the INITIALIZATION VI inside a box called SERIAL INTERFACE there is a PROPERTY NODE called Instr.

The Instr has several boxes attached underneath it labeled the following

ASRL End In, ASRL End out, TermChar, Baud, Flow Cntrl, Parity, Data Bits, Stop Bits.

Out of the box called TermChar a wire goes to the left and into an item called a TYPE CAST which the help box tells me it casts X to the data type by flattening it and unflatting it using new data type.

The X can be found by following the wire out of TYPE CAST to the left into a CONSTANT STRING.  The help box told me that this is a constant string containing the ASCII LF value.

That is where I came up with my statement about the LF.

I was calling errors, system crashes.  To me if the program stopped running it crashed, however I can see how that caused confusion on your part.

If I put my program on continuous loop it will hit the error but on the next cycle it may or may not.

The 2 errors I have the most are Visa Read errors in the Data Sensor VI and in the Heater Output VI

I hope this helps clarify my problems.

0 Kudos
Message 10 of 14
(4,936 Views)