Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Serial Communication Problem

I am trying to control my XItron 2801 Power Analyzer through LabVIEW. I am connecting via rs232, sometimes I am able to do everything I want through the VISA interactive control and other times I get the VISA:  (Hex 0xBFFF0015) error. Uninstalling the driver for my USB to rs232 cable and then reinstalling fixes the problem but I don't want to have to do that every time. I have a simple VI made that starts the integration function on the machine and grabs some values from it but I can't seem to get that to work and I'm thinking it is an issue with the VISA:  (Hex 0xBFFF0015) error that  I am seeing. I know I have all of my settings correct so I don't know where to go from here. Any help would be greatly appreciated!

 

Also, my VI is attached.

0 Kudos
Message 1 of 19
(3,879 Views)

Also, the VI seems to not be working at all because once I get past the connection errors in the VISA interactive control I can submit the commands I want in the Interactive Control and see the correct results but I get nothing when I run my VI

0 Kudos
Message 2 of 19
(3,875 Views)

@jstrike21 wrote:

Also, the VI seems to not be working at all because once I get past the connection errors in the VISA interactive control I can submit the commands I want in the Interactive Control and see the correct results but I get nothing when I run my VI


Then there is something wrong with your VI. Do you even know what it is in it?

0 Kudos
Message 3 of 19
(3,868 Views)

I posted my VI in the first post and I followed close to how things are done in the LabVIEW example Serial Read and Write. This is why I am confused as to why my program is not working.

0 Kudos
Message 4 of 19
(3,866 Views)

I can't read your VI since I only have LV 8.6

0 Kudos
Message 5 of 19
(3,864 Views)

Here is the VI:

 

[IMG]http://i47.tinypic.com/ayq37.png[/IMG]

0 Kudos
Message 6 of 19
(3,859 Views)

Does the Power Analyzer end its transmitions with a termination character?\

 

If not, in the Configure Serial Port, you need to wire a FALSE to the Enable Termination Character.

If so, you do not need to check number of bytes at the port.  Just wire a very large number to the VISA Read.


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 7 of 19
(3,858 Views)

When I read from the power analyzer it sends a "\n" at the end. Also, when I run the VI the start-integration\n command doesn't start the machines integration even though that is the correct syntax.

0 Kudos
Message 8 of 19
(3,854 Views)

When I run my VI I get this error:

 

VISA:  (Hex 0xBFFF0015) Timeout expired before operation completed.

 

I think it has something to do with the communication or possibly something else trying to use that com port at the same time but I dont know how to work around or correct this.

0 Kudos
Message 9 of 19
(3,844 Views)

You are telling the analyzer to acquire twice.  I don't know if that is causing any issues.

You might also want to try separating the "READ=" commands from the "?" into two VISA Writes.


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 10 of 19
(3,841 Views)