Thread: Re: IVI AgE36xx driver : RangeCheck problem [solved]


Permlink Replies: 3 - Pages: 1 - Last Post: May 25, 2012 12:06 PM Last Post By: Makoto Threads: [ Previous | Next ]
AgIVI

Posts: 2
Registered: 05/22/12
Re: IVI AgE36xx driver : RangeCheck problem [solved]
Posted: May 22, 2012 10:17 AM
Click to report abuse...   Click to reply to this thread Reply
Attachment Example1.cpp (4.2 KB)
Hi there,

I'm new to IVI drivers (started using them last week) and I have a problem with the RangeCheck initialization option.

In order to get used to IVI drivers, I used the example that comes with the IVI-COM AgilentE36xx driver (on my computer it's located at C:\Program Files\IVI Foundation\IVI\Drivers\AgE36xx\Examples\VS.NET\Cpp\Example1).

I have been able to do all I wanted except getting an out-of-range error when passing an out-of-range value to a function. I set the RangeCheck init option to true but I did not get any error in simulation neither with the hardware connected.

Attached is the code (from the Agilent example) but modified in a way that it should throw an out-of-range error when setting the voltage at the following line: spOutput1->VoltageLevel = 1000; // ... why no error.

Still it's executing fine. Can anyone point me to what I'm not doing correctly.

Regards,
Romain

Edited by: AgIVI on May 25, 2012 8:00 AM
Makoto


Posts: 2
Registered: 05/24/12
Re: IVI AgE36xx driver : RangeCheck problem
Posted: May 24, 2012 8:54 PM   in response to: AgIVI in response to: AgIVI
Click to report abuse...   Click to reply to this thread Reply
You are using Simulate=true option, isn't it the cause?

If out-of-range error is not generated with real hardware connection, try to capture the VISA I/O log.

In OptionString, you are specifying both QueryInstrStatue=true and RangeCheck=true, so even if range-check facility has passed the 1000V value, the instrument shall generate an SCPI error if a "VOLT 1000" command is sent. Try to see what is reported by *ESR? or SYST:ERR? query, which shall be automatically sent after the VOLT command.

If the instrument still accepts 1000V value as a coerced MAX value without error, the IVI-COM driver may not generate exception.

Makoto
AgIVI

Posts: 2
Registered: 05/22/12
Re: IVI AgE36xx driver : RangeCheck problem
Posted: May 25, 2012 8:00 AM   in response to: Makoto in response to: Makoto
Click to report abuse...   Click to reply to this thread Reply
Hi Makoto,

Yes, you are right, the simulation option needs to be false to allow for range checking. If QueryInstrStatue=true, you only get an instument error pop-up window asking to use the ErrorQuery() command to get the specific error. If QueryInstrStatue=false, you have to use the ErrorQuery() command to read the specific error from the instrument.

When I send the 1000 V command, the instrument always beep (no matter what is the value of QueryInstrStatue) so I assume that the command is sent to the instrument and not filtered by the driver itself.

Thanks for your help,
Romain

Edited by: AgIVI on May 25, 2012 8:00 AM

Edited by: AgIVI on May 25, 2012 8:02 AM
Makoto


Posts: 2
Registered: 05/24/12
Re: IVI AgE36xx driver : RangeCheck problem
Posted: May 25, 2012 12:06 PM   in response to: AgIVI in response to: AgIVI
Click to report abuse...   Click to reply to this thread Reply
Good, the IVI-COM driver is apparently skipping range check facility. I believe this is because the IVI driver covers all the E3600 series models, supporting different volt & amps values and the driver designer skipped this portion to avoid complexity of implementation. In fact, when implementing an IVI-COM driver with Nimbus, it is easy to program fixed range check min/max values, but implementing dynamically changing ranges depending on the connected model type will require somehow complex codes to be written.

Makoto

Point your RSS reader here for a feed of the latest messages in all forums