07-12-2005 05:43 AM
07-13-2005 05:14 AM
#include "iviScope.h"
#include <userint.h>
#include <cvirte.h>
int main (int argc, char *argv[])
{
ViChar msg[1024];
ViStatus err;
ViSession scopeHandle;
if (InitCVIRTE (0, argv, 0) == 0)
return -1; /* out of memory */
err = IviScope_init ("SampleScope", VI_TRUE, VI_TRUE, &scopeHandle);
if (err!=0) {
IviScope_error_message (scopeHandle, err, msg);
MessagePopup("Error",msg);
}
err = IviScope_close (scopeHandle);
if (err!=0) {
IviScope_error_message (scopeHandle, err, msg);
MessagePopup("Error",msg);
}
return 0;
}
As long as SampleScope exists and is correctly setup, I don't get the error of ""
You say that if you give a bad logical name then you get a different error?
What versions of what software are you using?
I don't have a scope here to play with, but set up a simulated one using ni-scope 2.8.0f3
with NI-VISA 3.3, and the ivi compliance package 2.2. All running under windows XP.
A good starting point would be to look at an existing driver and see how it's been implemented there.
I also ran up ni-spy set to capture for the ivi-sope calls, and got the attached file (I exported so anyone can view it). The first 2 calls used the wrong name for the logical name.
Thanks
Sacha Emery
National Instruments (UK)
07-13-2005 05:49 AM - edited 07-13-2005 05:49 AM
Message Edited by pak on 07-13-2005 05:50 AM
07-14-2005 03:53 AM
07-14-2005 04:38 AM
07-15-2005 04:24 AM
07-18-2005 04:08 AM
07-18-2005 09:20 AM
Hi,
it's certainly possible that the third party VISA is an issue. Are you using agilent visa then?
I can't really do a lot here now without the hardware to play with. The principle you're following is sound enough though
Sorry.
Maybe someone else out there has a similar setup?
Can you use the method you first outlined instead of going through the base class driver level?
Thanks
Sacha Emery
National Instruments (UK)
07-18-2005 09:37 AM
07-20-2005 03:18 AM
Hi,
I had an e-mail from a colleague in the US with some ideas on this thread and I was wondering if you could answer them for me?
------------------------------------------
The fact that he’s not using NI-VISA is a red herring – if the VISA version were an issue, then the specific driver wouldn’t work when accessed it directly.
From what I read in the thread, he can successfully pass a resource descriptor to the specific driver, and he gets and error when he passes a logical name to the class driver. But there’s a crucial piece of information missing here: Can he use a logical name or driver session directly with his specific driver? If the answer is yes, then there’s a problem with how the class driver and specific driver are interacting. But I don’t think that’ll be the result. My hunch is that he simply hasn’t associated the HardwareAsset element with the DriverSession. This can be confirmed if he sends us a copy of his IviConfig file from <C:\program files\ivi\Data\IviConfigurationStore.xml> - I can’t get all the information I would need from the screen shots.
--------------------------------------------------------
Thanks (and thanks Glenn for helping out with this)
Sacha Emery
National Instruments (UK)