09-01-2023 09:08 AM
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?
09-01-2023 09:30 AM
You can access an ethernet cDAQ chassis remotely. See Connecting to Remote Ethernet CompactDAQ Chassis from NI MAX
09-01-2023 09:33 AM
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.
09-01-2023 09:46 AM
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.
09-01-2023 09:54 AM
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.
09-01-2023 11:19 AM
@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.