Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

error -1073807298

hallo,

 

I have a voltage source which ist connected to my com port 1. Normally I have to connect it to pin 2 and 5 (read and ground). I am using the "basic serial write and read.vi" which is given by NI. When I connect my source to pin 2 there are no bytes at the port (in highlight function property node delivers "0" to read visa), at pin 3 there are. But then I get the error -1073807298 with the text: VISA:  (Hex 0xBFFF003E) Could not perform operation because of I/O error.

 

I only know some basics in LabVIEW so I would be very thankful when somabody could help me. I already did the Loopback test, it is working.

 

heyhey

 

P.S.: Don't ask me why I have to connect a voltage source to my com port, this is my task.... I have to solve this problem. The voltage range was between 0 and 5.

0 Kudos
Message 1 of 10
(5,574 Views)

Hoi,

 

I don't why you expect bytes at the serial port when you connect a voltage source to it. Just read the RS-232 basics and you will understand that with this setup you only produce a 'break' at the serial port if you switch it correctly.

 

If the loopback test works your port is OK

0 Kudos
Message 2 of 10
(5,573 Views)

Thanks for your fast answer.

 

I do not really understand why this causes a break because I thought at a voltage higher as 3 it will be detected as a '0'. Is it possible to meassure the voltage at the com port? I think I looked through all LabVIEW functions three times and I can not find any VI which is not expecting input bytes.

0 Kudos
Message 3 of 10
(5,558 Views)

OK, back to the start.

 

What you want to do is detect if a voltage (0->3V) is present or not at the com port.

You can ue one of the handshake input lines for this (not the data) and check this line in LV.

Before I go any further; is this what you want to do ?

0 Kudos
Message 4 of 10
(5,550 Views)

Hey,

 

thanks again. I just want to measure the voltage I put in the com port. At present it is DC. I think it will be not more then 5V.

 

heyhey

0 Kudos
Message 5 of 10
(5,547 Views)

Do you really want to measure the voltage at a COM port or do you want to detect if a level (5V) is present or not ?

0 Kudos
Message 6 of 10
(5,545 Views)
Trying to detect if a voltage is there or not is silly if you use pin 2 and then try to read number of bytes. If you are just looking for a voltage threshold, wire the voltage to one of the control pins (i.e CTS). Then you create a VISA property node and select Properties>Serial Settings>Modem Line Settings and select the control line. It will return Asserted/Unasserted/Unknown.
0 Kudos
Message 7 of 10
(5,525 Views)
I really want to measure the voltage. I am doing an internship and this is my task, no choice. I have to display the inputed value.
0 Kudos
Message 8 of 10
(5,509 Views)

Hi,

 

Because it is not possible to measure a voltage with the COM port I thought you might want to do something else, but yes you are trying to do something that is impossible Smiley Surprised

 

You can detect a level like we said but not a value. Give the task back or buy a device which you can use to measure and has a serial interface to connect to the COM port. This way you can measure at the COM port

Message Edited by K C on 09-18-2008 08:22 AM
0 Kudos
Message 9 of 10
(5,501 Views)

Ok, thank you very much for your help. That's why I could't solve the problem...

 

heyhey

0 Kudos
Message 10 of 10
(5,496 Views)