Measurement Studio for VB6

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I set up an emulator for testing my application?

I'm starting to wade into GPIB and cannot seem to find the best way to continue given all the components (not meaning ActiveX) required to assemble a semi-reliable development and testing environment for beta rollouts.

I have set up my design environment. Now I need a way to emulate some of the equipment I will be developing for so that I may test my apps before final testing on the actual equipment (which I obviously have no access to at this point).

Given that.. am I correct in understanding that LabView or IVI allows this type of functionality? If so, here are my specific questions regarding development:

1) Do I currently need any hardware or can the GPIB device list be populated from IVI/LabView emula
tors? In other words... how do I make the 'link' between these two technologies?

2) Can IVI/LabView run on the same machine as my test application, or is a secondary machine required?

3) Is there a general punch list of software (LabView, etc.) I might need in order to get this going?

4) Any general (or specific) overviews that may help me get over this hump would be greatly appreciated.

Charles
0 Kudos
Message 1 of 5
(6,453 Views)
Whether or not you are able to simulate your hardware will depend on what method you are using to program it. If you are programming the instrumentation directly using the GPIB ActiveX control or GPIB calls directly you will not have the ability to do simulate in software. If you are using an instrument driver, however, you will be able to do simulation if the instrument driver is IVI compliant.

Assuming that you are using an IVI-compliant instrument driver, here are the answers to your questions:

1. You do not need any hardware whatsoever. You can either specify to use simulation in your code by using the InitWithOptions functionality and specifying "SIMULATE=TRUE" in the option string parameter. You can also set things up externally so that you can alter simulation strictly through the IVI configuration so that your code doesn't have to change.

2. It will run on the same machine as your code. As far as your application is concerned, it will not appear any differently however no GPIB communication will occur.

3. IVI compliant instrument drivers for all of the GPIB hardware you are using. These are available for download from ni.com.

4. I think that there may be some IVI-related application notes.


Assuming that you are not using an IVI-compliant instrument driver and instead are either using a non-IVI instrument driver or making GPIB calls directly, things can get a little more elaborate. If you want full emulation capability you'll need to write another piece of software that emulates your device. This can be done in LabVIEW or any other ADE of your choice. What you'll need is a second GPIB card (to act as your device) that you'll cable to from your main computer. That card can live in a second machine or in the same one as your main application. You may want to put it in a separate test machine just to keep things a little cleaner.

If you go with this approach, it's not too difficult to write an emulator for a single device (or at least that functionality of a device that you use) per GPIB card. It will be more difficult to write an emulator that emulates multiple devices using a single GPIB card. In other words, you may want to use a separate GPIB card for each instrument you want to emulate. I wrote such an emulator some time ago but can't seem to find it. In any case, it's probably only a couple of days effort.


To make a long story short, your life will be a lot easier if you have IVI-compliant instrument drivers available for the hardware that you are using.

Jason
0 Kudos
Message 2 of 5
(6,453 Views)
You mentioned... "It will be more difficult to write an emulator that emulates multiple devices using a single GPIB card."  How would I go about doing this?  Thanks.
0 Kudos
Message 3 of 5
(6,118 Views)
jtporter,

From the previous discussion, you are looking to create a IVI class driver. For more information on developing any IVI drivers, please reference Development Tools and Resources.

Thank you and have a great day.
Sarah S.
Applications Engineering
National Instruments
0 Kudos
Message 4 of 5
(6,096 Views)
Sarah_S,

No, I am looking to create a multiple-device emulator using a single GPIB card.  My question was directed to JasonWhite.  Thanks.
0 Kudos
Message 5 of 5
(6,092 Views)