LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

unable to read from RS232

Hi,
I am trying to use CVI/labwindows to read data from RS232 port on windows. I have conncted keithlty instruments' pico ameter to RS232 COM 1 port using staright through cable. Inside the program, I have used OpenComConfig to configure the port. Then i am using ComRdTerm or ComRd to read the data. I am not writing anything on the port. However, I am unable to read the data. I am getting time out error. Am i missing something? Do i need to write to the port before reading?

The instrument is SCPI compliant. so do i need to use SCPI commands inside my CVI program?

Niranjan
0 Kudos
Message 1 of 4
(3,336 Views)
Most instruments will require some sort of command to trigger data reporting. Your instrument manual should have a set of commands (SCPI based) that you can send to your instrument. You'll write these commands out of the com port and then issue a read to get the reply.

It'll probably look something like this:

Write: "IDN?"
Reply: "Keithly Model ###"
0 Kudos
Message 2 of 4
(3,336 Views)
Thanks Chris.
I did samething. When i did "IDN?" i cud read it's IDN number from the port. That means instrument responded. However, after that i tried writing SCPI commands for reading the data to port. but instrument didnot respond with the data. Is it to with hand shaking mode or something like that? or do i have to send someother commands like IDN to trigger the instrument? i am trying different SCPI commands.
Cheers
Niranjan
0 Kudos
Message 3 of 4
(3,336 Views)
I'm glad to hear that basic communication is working! I'm not sure which commands are appropriate for your instrument as they are likely very specific in nature. Your instrument manual should have a complete list of commands (there may be a separate "programming manual"). If you can't find the commands - try the Keithly web site.
0 Kudos
Message 4 of 4
(3,336 Views)