Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

C# Tektronix Scope IVI-COM DLL Registration Problem

Hello all,

I am having problems using a IVI-COM object with .NET.  I have downloaded the appropriate IVI-COM driver for use with my scope and tried to install the drivers after installing the "Shared Components."  However, one of the .dlls in my driver software will not register with Windows (TekScope.dll).

Here is the error I receive:
"Error 1904.Module \TekScope.dll failed to register.  HRESULT -2147220473.  Contact your support personnel."

Has anyone else seen this problem?  I have also tried to registers the .dll manually (Regsvr32 TekScope.dll) but that also did not work.  If I go into VS2003 and try to "Add Reference" the TekScope.dll manually I get an error saying something to the effect of "That .dll is not a valid assembly."

I did contact Tektronix, but they have yet to get back to me.

Any ideas??

Thanks for all your help,
Maurizio
0 Kudos
Message 1 of 9
(7,536 Views)

Maurizio--

     Where did you get your driver from? Is it an NI supported driver?  If it is we might be able to help you.  What is the model number of your scope? and what NI hardware are you using to communicate with the scope?  I haven't seen anything like this before, but it sounds like it is a Tektronixs issue.  Anyway, let me know and I'll see what I can find out.  Thanks

John H.

Applications Engineer

National Instruments

 

0 Kudos
Message 2 of 9
(7,523 Views)

John,

Thank you for your reply.

To tell you the truth, I am not sure how I got the .dll to register, but somehow it is now working.  I think it had something to do with a sample application I received from Tektronix, after I loaded it up, it worked.

Sorry to waste your time, things seem to be ok now.  Now all I need to do is find some better docs on C# interop w. my scope Smiley Happy

Thanks again,
Maurizio


0 Kudos
Message 3 of 9
(7,521 Views)

Well it seems the problem is not fixed afterall.  I am not sure what is going on here, but here is the error I am getting:

"A reference to 'IVI TekScope (Tektronix) 2.0 Type Library' could not be added.  Converting the type library to a .NET assembly failed.  Could not load type TekScope_TektronixLib.TekScopeMeasurementClass from assembly Interop.TekScope_TektronixLib, Version=2.0.0.0."

I get this error when trying to add a reference to the IVI TekScope COM object in VS2003 .NET (C#).

Does anyone know what is going on here?

Tektronix OScope TDS5104B running Win2k.

Oh yah, I am communicating with the scope over Ethernet using TekVISA software.

Thanks again,
Maurizio

Message Edited by MaurizioLeo on 06-23-2006 02:10 PM

0 Kudos
Message 4 of 9
(7,517 Views)

Maurizio--

     I did a quick search and we do not offer a driver for that instrument.  It is definately an issue that you will need to resolve through Tektronix support.  We try to look at all postings in a timely manner and to provide advice if nobody else on the forum does. I understand that you are just looking for any help you can...hopefully someone will read your post and be able to offer you advice. I apologize that I will not be able to help you out...but it would be impossible for us to support another companies product without their resources.  I hope Tek is able to help you...good luck.

John Harvey

Applications Engineer

National Instruments

 

0 Kudos
Message 5 of 9
(7,511 Views)
Hello,
 
I am an begainner in C# (Visual Studio 2005). Recently, I need to read the data from a Keithley 2182A meter through GPIB, when I use Receive(0, 7, str, 80, li.STOPend) to read out the data, and then use Convert.ToDouble(str) to convert the string into double type for calculation, the computer show me the error message "The string is not in correct format".  When I try it in Debug, I found the string is "-3.78492628E-8\n". Could you please let me known what's the problem? How can I solve it.
 
Thank you!
 
Sincerely,
laoge
0 Kudos
Message 6 of 9
(7,439 Views)

 
... Convert.ToDouble(str) ...

Try Double::Parse(str) instead...

Message Edited by MaurizioLeo on 07-19-2006 02:12 PM

0 Kudos
Message 7 of 9
(7,440 Views)
Hello, MaurizioLeo
 
Thank you very much for your information. I have tried it, but the computer stil said "Input string was not in a correct format."  The string look like "-3.7809456E-9\n]".  I don't know if I need to add some termination to the end of the string, such as in C++, we usually add "\0" to the end the string, and then use atof to convert it to float?
0 Kudos
Message 8 of 9
(7,432 Views)
I'm not sure what the problem is... That "\n" should probably not be in the string also, try taking that out and see if that fixes it (try double:parse and the other conversion methods).

Sorry, I'm not too versed in C# either 🙂

0 Kudos
Message 9 of 9
(7,429 Views)