Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

Howto Remote a PXI-Cube from C# / .NET

Hi,
I'm trying to write .NET/C# application to remote my NI PXI-Cube with several Modules attached (DMM, DCPower) via LAN.
Therefor i included the NationalInstruments.VisaNS.dll in my C# project and open a PXISession to one of the modules in the cube via

ResourceManager

.GetLocalManager().Open("visa://192.168.1.197/PXI1::13::INSTR");

like in one of the examples from NI. The session then is established what i also can see in NISpy running on the cube. Then i can call the In() and Out() functions from the returned session object. For the function parameter i need an AddressSpace and an Offset. What are these parameters and where do i get an overview of the possible AddressSpaces, Offsets and the referenced values?

Is there another (perhaps simplier) way to remote a PXI cube?

thx

0 Kudos
Message 1 of 5
(4,073 Views)
 

What you would need is the Register Level programming manual for all devices you are using in the PXI-Chassis.

Currently NI offers a Driver Developer Kit for the Multifunction DAQ products:

http://sine.ni.com/nips/cds/view/p/lang/de/nid/11737 

but not for modular instruments (like the DMM and the Powersupply you are using).

Anyway, going this way is very complicated, as you would have to communicate on register-level with your hardware, this means reprogramming the whole driver!!!

I would recommend, that you program an application, that runs on the PXI-System. In this application you can use the comfortable drivers for the hardware (NI-DMM, and NI-DCPOWER) and use a TCP/IP protocol to transfer the needed data to your remote-system. If you are using LabVIEW, you could use the built in Web-Server to remotely control your application via a web-browser.

You could use MXI-4 to physically connect the PXI-Hardware with your remote-system, as well, but htis will only work if there is only one client, that wants to be connected with the PXI-System at a time.

Hope this helps!

 

 

0 Kudos
Message 2 of 5
(4,061 Views)
Hm, now i'm a little bit disappointed.
Isn't it possible to install the drivers (NI-DMM and NI-DCPower) on my remote PC and to open a connetion to the PXI System using a remote address like the one for VISA ("visa://192.168.1.197/PXI1::13::INSTR")?
0 Kudos
Message 3 of 5
(4,046 Views)

Unfortunately this is not possible. The drivers (like NI-DMM) rely on other driver components than VISA, which you can not use via a remote connection to the device.

 

0 Kudos
Message 4 of 5
(4,040 Views)

wow, thanks for the fast answer.

OK, i try to go your suggested way. If it was succesful (or not), i will post it here.

But on the remote PC i have to implement a .NET application. It's not possible to create a LabView project for my requirements.

However, .NET/C# examples to solve this remote problem, are welcome. Or has nobody had this problem before?

0 Kudos
Message 5 of 5
(4,038 Views)