Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Remote access DAQ through IP/MAC using Python API

Hi,

 

I am currently working on a project that needs to access the DAQ remotely through TCP/IP or MAC address remotely over the network.

 

I have written a code to access it locally through the Python API, but I am only specifying the channel name such as "cDAQ9185-20FB3D9Mod1/ai0:2". When I put it on the router I am afraid the server won't able to know that's the DAQ. Is there way to specify the IP of the DAQ to establish connection?

0 Kudos
Message 1 of 6
(2,430 Views)

You can access an ethernet cDAQ chassis remotely. See Connecting to Remote Ethernet CompactDAQ Chassis from NI MAX

-------------------------------------------------------
Applications Engineer | TME Systems
https://tmesystems.net/
-------------------------------------------------------
https://github.com/ZhiYang-Ong
0 Kudos
Message 2 of 6
(2,426 Views)

But it is using the Python API, we have a server local remotely and that server can only use command lines and script, that's why we need to use python and IP/MAC address to access it.

0 Kudos
Message 3 of 6
(2,424 Views)

I assume that you are going to install the NI-DAQmx driver on the server and run the Python API.

 

There is a Python API (nisyscfg) for NI-System Configuration, which is the driver for NI MAX. Unfortunately, there is not much documentation and examples on how to add a remote cDAQ chassis programmatically. You have to figure it out.

 

Alternatively, you can connect the cDAQ chassis to a computer and install ni/grpc-device to it. Then use the gRPC client API from the server without the GUI.

-------------------------------------------------------
Applications Engineer | TME Systems
https://tmesystems.net/
-------------------------------------------------------
https://github.com/ZhiYang-Ong
0 Kudos
Message 4 of 6
(2,412 Views)

Thanks for the insights.

 

As you mentioned the NI-DAQmx driver, does the Python API for DAQmx include the driver? Or I have to install it separately on the server.

I am running python script on my local PC it works fine. But I have LabView and NI-MAX installed so it already has driver on it. So I can't really test it on my local PC.

0 Kudos
Message 5 of 6
(2,400 Views)

@Liwenhu wrote:

Thanks for the insights.

 

As you mentioned the NI-DAQmx driver, does the Python API for DAQmx include the driver? Or I have to install it separately on the server.

I am running python script on my local PC it works fine. But I have LabView and NI-MAX installed so it already has driver on it. So I can't really test it on my local PC.


 

You need to install DAQmx driver and also the Python API using Pip.

Santhosh
Soliton Technologies

New to the forum? Please read community guidelines and how to ask smart questions

Only two ways to appreciate someone who spent their free time to reply/answer your question - give them Kudos or mark their reply as the answer/solution.

Finding it hard to source NI hardware? Try NI Trading Post
0 Kudos
Message 6 of 6
(2,366 Views)