Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

PC to PC communication via GPIB in C#

Hi,
 
I'm looking for a way to use PC to PC communication via GPIB in C#.
There is an application (main application) that utilizes the NI measurement studio (7.0) to communicate via GPIB with various lab peripherals (power supply, scope, logic etc'); I would like to emulate those lab peripherals, by programming a server who will receive the GPIB commands, parse them and return an appropriate answer to the main application (as would the lab peripheral).
Is that possible? What would be a good way to do that? Is there a code link available?
 
Thanks,
 
   Gil.
 
0 Kudos
Message 1 of 2
(3,369 Views)
Gil,
 
First, you should look into using NI-Device, a driver written for our PCI-GPIB cards exactly for this purpose.  It won't work with C#, it's C++ only, but you may find it interesting. 
 
The only way I can think of to do this in the C# .NET Language Interface is using the Board object and doing board.wait(LACS) and board.wait(TACS) to see when you're addressed as a listener or a talker respectively (you could use Notify if you wanted).  You can set the address with board with the PrimaryAddress property.  When the board is addressed as a talker, send data.  When it's a listener, read data.  It's sufficient for doing very simple read/write sorts of things, but gets complicated when you have SRQ's, clears, and more advanced GPIB stuff going on.
 
Hope this helps.
 
Scott B.
GPIB Software
National Instruments
 
0 Kudos
Message 2 of 2
(3,345 Views)