Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

VI_GPIB_REN_DEASSERT_GTL in C# .NET

Hi Guys,

 

Can anyone help me too understand how I would implement "VI_GPIB_REN_DEASSERT_GTL" interface command in C#? without having too wrap VISA32.DLL to extract viGpibControlREN(). 

 

 

Many thanks

Nigel

0 Kudos
Message 1 of 4
(4,475 Views)

Hi Nigel,

 

It is a bit unclear whether or not you have implemented general functionality of visa in c# yet. You do this by adding the namespace:

 

using NationalInstruments.VisaNS;

 

After which you should be able to call all the visa functions directly. The viGpibControlREN function should be available passing the session and mode in as it is in other environments.

 

Otherwise, if it is a problem with this particular function, please do reply again. 

 

References: C# and Visual Basic .Net Instrument Control Tutorial

 

Regards

Ian S
Applications Engineer CLA
National Instruments UK&Ireland
0 Kudos
Message 2 of 4
(4,456 Views)

Thanks Ian,

 

I have implemented in C#. I was using a MessageBasedSession which does not expose controller methods. I changed to a GpibSession which did expose  the

ControlRen() method and also ReaddressingEnabled() that I later foundI needed.  

 

I have done a lot of VBA VISA stuff in the past and thought mapping over to C# would be pretty streight forward but therre are some gotchas.

 

Thanks for the reply

Nigel

 

 

0 Kudos
Message 3 of 4
(4,454 Views)

Hi Nigel,

 

Makes sense, I hadn't picked up that you were using a message based session. All the best with your programming.

 

Regards,

Ian S
Applications Engineer CLA
National Instruments UK&Ireland
0 Kudos
Message 4 of 4
(4,452 Views)