Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

How to open VISA session, Set GPIB / I.P. address in C#, working with .NET Interop assembly DLL?

I thought I did answer. Don't use a VISA, Reference Name control. Use a string control.

You still have not explained why you are so reluctant to use existing drivers in a more appropriate manner. You obviously can create a c type dll instead of a .net assembly. There is an existing tool to create CVI drivers from LabVIEW. Have you looked at that?
0 Kudos
Message 11 of 19
(3,311 Views)

As explanation : I have driver for new Tektronix signal generator, written in LAbView. Thats it... Hundreds of commands ... And I have a whole test environment, written in C# ... Reality of our lab. Now, I have to allow to a test, written in C# to communicate with this Signal generator.  Can you propose better way than usage of .NET Interop Asembly? If yes, can you explain please, step by step, how to do it? Thanks. 

0 Kudos
Message 12 of 19
(3,307 Views)
If you have really been using LabVIEW since 6.0, then you should know how to right click and replace one control with another.
0 Kudos
Message 13 of 19
(3,302 Views)

I know how to do it ... and everything works ... and I  did it before posting my question here ... BUT it's WORKAROUND and doesn't contribute to my knowledge in linkage between C# and LabView. I hoped to find and answer to my question here. 

0 Kudos
Message 14 of 19
(3,299 Views)
As far as I know, what you call a work around is the correct way and since you've already done that and had it working, the polite thing would have been for you to mention that instead of all of this wasted time. If you are an experienced c# and LabVIEW programmer, you should know that there are datatypes that don't exist in both languages so changing the LabVIEW code to use a common one is a perfectly acceptable method.
0 Kudos
Message 15 of 19
(3,292 Views)

@Dennis_Knutson wrote:
 If you are an experienced c# ..  programmer

The problem he isn't.

 

He seems to think things should work in some manner foreign to how it actually does.

 

Talk about a waste of time.

 

 

0 Kudos
Message 16 of 19
(3,276 Views)

@IgorKurtser wrote:
So,

Try please with all respect try to answer on MY question …


Arrogant, much?

 

I have no clue what YOUR question is.

 

Talk about  a big fat waste of MY time posting in this thread.

 

Adios.

 

0 Kudos
Message 17 of 19
(3,275 Views)

That's right. Don't waste your time. Life is short and beautiful. I'll wait for official NI support/ respond.

0 Kudos
Message 18 of 19
(3,251 Views)

Hi,buddy

I had same Problem.I'm only one who is able to use LabVIEW in my company,so I had to learn to program  in C#.I don't know how to define the visa handle parameter in c#.Here are the methods in the dll file I generated with Labview:

 

public static void Initialize(LVBaseRefnum vISA__32resource__32name)

 

Of course, my parameters are also wrong.

 

IT3400.Initialize(USB0::0x2EC7::0x3422::803420022777270017::INSTR);

 

Please do me a faver.

 

0 Kudos
Message 19 of 19
(1,450 Views)