Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

IVI driver operating on serial port does cause framing error?!

Hi all,

I need some technical BG in order to debug a new issue:
I've got a test system that contains amoung others a programmable power supply Agilent A3646E. It used to be connected via GPIB and was operated using the IVI driver as provided by NI.
These days I have the need to exchange the GPIB connection with a serial one.  I  use an USB>4serial hub (ComHub) and configured the used serial port COM3 to what the agilent expects (done with device manager).  Hyperterminal connects to the Agilent and performs all tested commands without hazzles.
I used MAX to configure COM3 the same way it was configured in device manager. In MAX I also changed the ressource descriptor from GPIB to 'COM3'. Than I tested the setup with some basic commands of the IVI driver, e.g 'Init_with_options' and 'perform_action'. Unfortunately, the Agilent than starts beeping and reports error -511 > framing error and -113 > undefined header. ???
The latter one can be explained when accepting that parts of the command string was not properly received by the Agilent due to the framing error. But what caused this framing error? How is the IVI alias resolved? How is the serial port configured when using it this way? Can I fix that? How?

Hope someone can shed some light onto this.  Dan?

Greetings from Germany!<br>-- <br>Uwe 

0 Kudos
Message 1 of 5
(3,725 Views)
Uwe,

there exists an instrument driver, which is based on the IVI-Classmodel (Interchangeable virtual instrument). i believe that you are talking about this one. i took a look into the driver and must confess that i didn't see any "Init_with_options" there.....
so please take a look into here to verify that i am talking about the same driver you think of. another point is that just renaming the VISA-alias in MAX does not chenge the interface. so i believe that you are still trying to communicate with the Agilent E3646A via the GPIB interface, not the serial one. and that could explain the error.

Norbert B.
NI Germany
Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 2 of 5
(3,713 Views)
You should try running the example that ships with the driver.  For the purposes of troubleshooting, bypass the MAX IVI configuration setup by entering COM3 into the resource descriptor directly in the example program / VI.  If you continue to get the error, try disabling the Reset input on the Initialize function / VI.  I have noticed that several Agilent instruments have intermittent issues with sending the ^C character to perform a clear on the device in serial mode.  It is quite possible that this is done in the Initialize VI for serial operations and may be the cause of the issue.  Does this problem occur on each execution or is it intermittent?  Please provide more details and we can look into it here.
 
Thanks,
Hobbs
0 Kudos
Message 3 of 5
(3,709 Views)
Norbert,

it seems I have a newer version of this driver, as the one provided by NI contained a bug. The results of any measurement on channel 2 ahve always been thgose of channel1, indpendently of what channel was made the active one. A develloper from the Check Republic provided a DLL to me which solved the problem. This guy claimed to be an external driver develloper and that he was going to provide the fixed version to NI as well.

To the other point: I have changed the ressourcec descriptor in the apropriate driver session. And I have checkt the hardwareasset to reflect that change.
And, the whole IVI configuration was exported from another PC and imported on the machine in Q, which does not even have a GPIB interface.

My main concern is still not answered: Where and when is the actual resource descriptor resolved when calling an IVI driver module. And what serial settings are used? You know, the Agilent needs two stop bits, which is a kind of non-typical. If the ivi driver uses those settings as are defaults in the device manager or as have been configured in MAX, it should be OK. But if not? _I_ do not know where this is coming from.

BTW, I am going to christmas holidays now.  Frohe Weihnachten und ein Gutes Neues Jahr!

Until next year...
Greetings from Germany!<br>-- <br>Uwe
0 Kudos
Message 4 of 5
(3,697 Views)
Jason,

thx for your answer. I'll try that ASAP.
I'm going for my christmas break now and will return to job next year.
Merry Christmas until than   and
Greetings from Germany!<br>-- <br>Uwe
0 Kudos
Message 5 of 5
(3,696 Views)