Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

IVI driver doesn't simulate as requested (in MAX setup)

Running: Windows XP, MAX 4.6.2, LabWindows/CVI 8.1.0

I have an IVI device driver, a corresponding  class driver, and a program that calls the above. Everything works fine when the equipment is attached to the GPIB bus, but I'm trying to do development on a system that doesn't have the actual hardware attached. 

 

MAX is set up with:

The GPIB board in the "Devices and Interfaces" table (GPIB0)

The device driver and class driver installed in the "Advanced/Instrument Driver Software Modules" table (let's call them DD1 and CD1)

There are logical names defined for each of 3 systems in the "IVI Drivers/Logical Names" table , pointing to driver sessions.

There are driver sessions defined in the "IVI Drivers/Driver Sessions" tab for each of 3 systems, all using the same driver DD1 with different resource descriptors.

 

To run the driver in simulation, then, I should have to simply  go to the "General" tab in the Driver Session page for the device that I want to test the software with and change the "Simulate With" ring control from "Don't Simulate" to "Specific Driver".

 

However, when I run the software, it returns an error. Debugging, I find that the "IVI_ATTR_SIMULATE" attribute is not set, and thus IviSimulating(vi) returns FALSE (0). 

 

I tested the mechanism with another driver (albeit not going through a class driver) and it worked fine. What's up?

 

Thanks

Paul

0 Kudos
Message 1 of 6
(4,103 Views)

Hello Paul,

       The problem might be in the IVI Specific Driver that you are using.  Which one are you using?

 

Another thing to try is calling the Init_with_Options and passing "Simulation=1" in the option string with the Class driver first.  If it is not working through the Class driver, try calling the Specific driver directly and see if simulation works then.

 

Let us know how it goes,

 

NathanT

0 Kudos
Message 2 of 6
(4,087 Views)
These are all drivers that I've written.
0 Kudos
Message 3 of 6
(4,076 Views)

Hello Paul,

       If you are using one of the defined Classes, you could just try another Specific driver.  This would help you isolate the problem.  If you are using a custom Class of your own, it is not as easy.

 

Did you have any luck with simulation when calling the Specific driver directly?

 

Cheers,

 

NathanT

Message Edited by NathanT on 01-15-2010 08:01 AM
0 Kudos
Message 4 of 6
(4,062 Views)
Things work fine when I call the driver directly.
0 Kudos
Message 5 of 6
(4,056 Views)

Hello Paul,

        Thanks for letting me know.  Does it simulate with the Class driver if you use Init_with_Options and pass "Simulation = 1" in the option string?  What happens with the "SIMULATE" attribute in the different scenarios?

 

Thanks,

 

NathanT

0 Kudos
Message 6 of 6
(4,030 Views)