ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

serialpoll for LockIn Amplifier

Hello,

I just started new C# project for communication with LockIn amplifier SR 830. Before I used C++ and ni4882 dll and everything was OK. To make sure that the LockIn is finished the previous command I simply used the following part of my code:

char serPoll;

do

{

      ibrsp(handle, &serPoll);

} while ((serPoll & 2) == 0);

 

How to realize the same loop in C#, using NationalInstruments.NI4882. Can I use for it SerialPoll function?

 

Thank you very much in advance

 

Igor

0 Kudos
Message 1 of 4
(3,636 Views)

Hi Igor,

 

From my understanding, if you look at the Language Interface: 32-bit Microsoft Visual C/C++ in the Developer Zone at ni.com you should find two examples that do GPIB serial polling for a couple of instruments. While these examples use C/C++ as opposed to C#, this might give you an idea on how to setup your code.

Regards,
Efrain G.
National Instruments
Visit http://www.ni.com/gettingstarted/ for step-by-step help in setting up your system.
0 Kudos
Message 2 of 4
(3,599 Views)

Thank you very much, I already found a solution.

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

Hi Igor,

 

That is good to hear. If you want you can share the solution to your question so that other people can use this as a reference in the future. Thanks!

Regards,
Efrain G.
National Instruments
Visit http://www.ni.com/gettingstarted/ for step-by-step help in setting up your system.
0 Kudos
Message 4 of 4
(3,579 Views)