LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Trying to interface Keithley 2400 Sourcemeter using RS 232.

What functions from the driver are you calling before the fetch? Are you trying to run one of the examples? If so, which one? If you aren't running one of the examples from the driver, I would suggest you do that and post back if it does not work.

0 Kudos
Message 11 of 23
(2,501 Views)

What commands are you sending?  What is the error?


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 12 of 23
(2,501 Views)

:FETCh? - the command

1073676294 - this is the warning that i get when i run the vi - and no error as such but i am not getting anything on the screen when i turn the source on (as in when it starts displaying value on the front panel, when it's off it displays blanks on the front panel)

 

PS - I am talking about the source and not the entire device - the device can remain on and the source can be off (I don't know weather you have an idea about how it works or not)

0 Kudos
Message 13 of 23
(2,498 Views)

Again, WHAT VI and WHAT functions are you calling before?

0 Kudos
Message 14 of 23
(2,494 Views)

I mentioned I am using the Basic Serial Read and write.vi

 

and the command that I am using to retrieve data is :FETCh?

 

0 Kudos
Message 15 of 23
(2,490 Views)

@smkuls wrote:

:FETCh? - the command

1073676294 - this is the warning that i get when i run the vi


Did you look to see what this warning meant?  It says that you requested x number of bytes and got x bytes.  This is a warning that there might still be data in the serial buffer.  If you are using the drivers from NI's site, I wouldn't worry about it.

 

If the output is off, I don't think it shows any measurements, so that sounds like the correct behavior.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 16 of 23
(2,489 Views)

I get the same thing when I turn on the output - and yes I did search what that warning means - but I am wondering why does the device freeze because I want to receive data continuously and moreover I don't get any data on the "string read" textbox when the output is on.

 

PS - The drivers are from NI only.

0 Kudos
Message 17 of 23
(2,487 Views)

I think the issue is not the communication but understand the Keithley meter. FETCh does not perform a read measurement. It just gets the items in the meter's sample buffer.

 

From page C-3 in the manual:


FETCh?
This command is used to read data stored in the Sample Buffer. If, for example, there are
20 data arrays stored in the Sample Buffer, then all 20 data arrays will be sent to the computer
when FETCh? is executed. Note that FETCh? does not affect data in the Sample
Buffer. Thus, subsequent executions of FETCh? acquire the same data.

The READ? command performs an INITiate and then a FETCh? The INITiate triggers a
new source-measure cycle which puts new data in the Sample Buffer. FETCh? reads that
new data. The MEASure? command places the SourceMeter in a “one-shot” sourcemeasure
mode and then performs a READ?. See Section 17, “SCPI Signal Oriented Measurement
Commands,” for more information on READ? and MEASure?.

I'm guessing that's your issue, you are performing a fetch and get nothing back. This is correct behavior because there was no measurements made. This why you are getting your warning. If you change it to a READ? or MEAS? it should work to verify communication is working and that it's not your code specifically that's the issue.

Certified-LabVIEW-Architect_rgb.jpgCertified_TestStand_Architect_rgb.jpg


"I won't be wronged. I won't be insulted. I won't be laid a-hand on. I don't do these things to other people, and I require the same from them." John Bernard Books

Message 18 of 23
(2,479 Views)

First you said you are using the basic serial write and read and now you are saying 'drivers from NI only'. Please clarify. If you are just sending a fetch with the basic serial function, that is just wrong. If you are not using the 2400 driver functions, explain why. If you get the same sort of error with the already written and debugged code, that is one think. If you don't and only get an error with yours, that says something completely different.

0 Kudos
Message 19 of 23
(2,478 Views)

I tried the :READ? command as well - I am getting the same warning.

 

By the drivers - I mean the drivers are installed - and what I am trying to do is to read data from the device using the Basic serial read and write.vi .

 

I even tried the :MEASure? command - doesn't work - same warning is displayed - all I want is the reading on the front panel of the device to be displayed on my computer.

0 Kudos
Message 20 of 23
(2,470 Views)