LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

RS232 issue with test equipment

I have an E3631A power supply that I am controlling via RS232 and visa rs232 control.
 
With my labview vi, I can send commands to the device but I cannot get anything back from the device on the read side.
 
If I use measurement and automation explorer and send the exact same commands to the power supply, I can read the current just fine.
 
So what is different between the meas and auto explorer sending and receiving or opening of the port and my attached vi?
0 Kudos
Message 1 of 8
(3,611 Views)

Hi Jim,

are you sure that there are only 20 Bytes to read? You can check size this of available bytes with a property node.

Mike

0 Kudos
Message 2 of 8
(3,608 Views)

Yes I know.  My original code had it looking at hte property node as the input to the read.  That property node always tells me 0 bytes are on the port.  So I changed the code to a hard coded value just to see if I would get any data back off the bus.

Basically what is happening is everytime I run the vi I send the 2 commands to the supply just fine but nothing comes back.  After the first run, the supply then gives me an error beep because it still detects data that is ready to send back that has not yet been retrieved.

As I said if I use meas and auto explorer this process works just fine.  I can send my 2 commands, and then when I read it gives me the data thats there.

0 Kudos
Message 3 of 8
(3,606 Views)

Hi Jim,

are you sure that baudrate and parity and ... are correct?

Mike

0 Kudos
Message 4 of 8
(3,598 Views)
Yes, the settings in the set serial port block match what the device is set to.  And in meas and auto I changed nothing as well, just used the defaults.
0 Kudos
Message 5 of 8
(3,596 Views)
Instead of reinventing the wheel, why don't you just download the drivers?
0 Kudos
Message 6 of 8
(3,588 Views)
Jim

I noticed that the Enable termination character is set to false but you are adding a line feed character to the command strings.

There is an Instrument Driver for this instrument @ http://sine.ni.com/apps/utf8/niid_web_display.model_page?p_model_id=231.


Visualize the Solution

CLA

LabVIEW, LabVIEW FPGA
0 Kudos
Message 7 of 8
(3,583 Views)
You don't have any delay between the VISA write and the VISA Read which means you aren't giving the device enough time to get the message and turn around to send the response.  Take a look at the example for basic serial read and write in the example finder.
0 Kudos
Message 8 of 8
(3,579 Views)