LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Measure with Keithley 2000 over RS232

Hey,

 

ich have a problem with my Keithley 2000 by measurements over RS232.

My programm is running, its a simple serial read and write VI. I send him an command to measure and nothing is happening. I got nothing back....

I add the VI and the commands, maybe somebody knows whats wrong with my VI!

 

Thanks a lot

 

Greetings

Ralf

Download All
0 Kudos
Message 1 of 56
(10,872 Views)

I have no time to look into your code, but most likley you miss the termination char. On a string constant you can switch to \-display and then use \n or \n\r depending on the settings. You can also look into the LV drivers for the keithley 2000, they are available on ni.com and/or on keithley.com

 

Felix 

0 Kudos
Message 2 of 56
(10,852 Views)

thanks for your help.

know i get the error: timeout expired before operation completed. whats the reason for that error?

0 Kudos
Message 3 of 56
(10,845 Views)

I guess that is comming from the read. Does it return any data?

There is a VISA property node for the timeout, so you might increase it. If you use the serial port open vi (I don't heve the name correctly), there is also a timeout to specify. 

 

Felix 

0 Kudos
Message 4 of 56
(10,835 Views)

yes its  caused from the read function...

if i increase the timeout its still not working, i think the read does not work because its not able to get data back. the question is why does the read not work?

0 Kudos
Message 5 of 56
(10,833 Views)

I just took a look on some old code of mine. After writing READ\n I wait 100 ms. Then I use the Property Bytes.At.Port for the read function. Generally using some waits helps when programming RS232.

 

Felix 

0 Kudos
Message 6 of 56
(10,823 Views)
The read does not work because the write is wrong. Your code does not send a termination character as already mentioned and you are not doing a query. Your image shows a MEAS command but you are not doing that.
0 Kudos
Message 7 of 56
(10,820 Views)

im using a wait function, thats all running...

i think something with my writing is not correct....i send the command

:READ\n;

nothing is comming back, the keithley 2000 is working with SCPI commands, i tried to use them but its not working...

whats the correct syntax, maybe i messed something up....?

thanks for your help felix

 

 

0 Kudos
Message 8 of 56
(10,816 Views)
READ\n is not correct either. You HAVE to follow the syntax that is in the manual. You HAVE to send the ? like the manual shows and you have to set your string constant for '\' Code Display.
0 Kudos
Message 9 of 56
(10,812 Views)

okay dennis, i know what you mean, i tried to do this, but whats the correct syntax?

 

*IDN?

:MEAS:VOLT:DC

 

0 Kudos
Message 10 of 56
(10,808 Views)