Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

RS232 Error

Hello,

 

I am trying to connect a HP 33120A function generator to my labview VI via my RS232 port. I do not have GPIB. When I try to run the example VI's the function generator beeps and the error indicator lights up. The VI also shows the following error:

 

Error -1073807346 occurred at VISA Write in Agilent 33XXX Series.lvlib:Error Query.vi->Agilent 33XXX Series.lvlib:Configure Standard Waveform.vi->Agilent 33XXX Series Generate Standard Waveform.vi

Possible reason(s):

VISA:  (Hex 0xBFFF000E) The given session or object reference is invalid. 

 

 

 

I have the function generator and labview properly configured:serial, 9600 baud, 8 bit, no parity, xon/xoff. I am running Labview 8.0 and using VISA 4.5 with the latest project-style driver provided by NI. VISA autoshutoff is also disabled.

 

Does anybody know how to resolve this error? Does anybody have experience with labview and the HP function generator?

 

Thanks ahead.

0 Kudos
Message 1 of 6
(5,059 Views)

What VISA resource name are you using? Did you pick it from the list (click on the little arrow on the right side) or did you type in the resource name?

 

The first function that you should always call is the initialize function. Does that give the same error? Can you communicate with Hypereterminal?

0 Kudos
Message 2 of 6
(5,052 Views)

Did you see this link.

 

 

You visa might be taking a wrong port number as default value. As dennis suggested r u able to communicate using a hyper terminal? 

0 Kudos
Message 3 of 6
(5,042 Views)

I use COM1 as the resource name. The VISA resource name matches in MAX and in the VI. Hyperterminal is functional. The initialize and terminate sub VIs seem to be working.

 

I also noticed that Windows is set to use no serial flow control by default. When I change the Windows setting to use xon/xoff by default, MAX gives me an error that states that there is a conflict bewtween the system and MAX, and it directs me to use the port conflic resolution tab. Can this cause the error? How do I change flow control in MAX? Where is the port conflict resolution tab?

0 Kudos
Message 4 of 6
(5,018 Views)

As long as the initialize function works, you should not be getting the error unless you did not wire the VISA Resource output of the Initialize to the VISA Resource Input of the VI that is giving the error.

 

You should have no need to mess around with the windows or MAX settings. The initialize function should be configuring the port and the error has nothing at to do with com port settings.

Message 5 of 6
(5,010 Views)
Are you opening multiple session by any chance? Like the initialize within a while loop or something? Can you post your code?
0 Kudos
Message 6 of 6
(4,975 Views)