11-20-2013 06:57 AM
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
11-21-2013 09:41 AM
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
11-21-2013 10:00 AM
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
11-21-2013 10:06 AM
Hi Nigel,
Makes sense, I hadn't picked up that you were using a message based session. All the best with your programming.
Regards,