Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

Read NI-9234 from command line

Solved!
Go to solution

Hello everyone, 

 

This question concerns acquiring data from National Instrument devices using the ethernet connection without GUI, i.e. from the command line. 

 

I've connected my NI-9234 with cDAQ-9191 to my linux machine. I found the IP address and can login to device. However, I cannot find in the manual how to read the UDP stream from the command line.

 

- Is the UDP stream always there?

- Can I configure the cDAQ-9191 without GUI?

 

Kind regards, 

 

 

Message 1 of 6
(3,758 Views)

Hi appie,

Welcome to the forums!

 

There seems to be a small misunderstanding here: The cDAQ-9191 is a bit more than just a device that polls the module plugged into it and casting the measured values into a network. It's much more than that. It's a controller that can be controlled remotely. It can execute measurement (or generation/output) tasks on its own, relying on a hardware clock. It stores/buffers data if needed, and the DAQmx driver transfers it to a host when possible. DAQmx is the driver for cDAQ devices, it's available for Linux. It's API can be used from LabVIEW (available for Linux as well), C/C++, Python, (and some more, mostly Windows-related languages like .NET).

 

Therefore:

- Is the UDP stream always there? 


No. Only if you configure the 9191 to continuously read data and it is connected to a host that reads this data, then there is a stream. But it's TCP (as you don't want to lose data, and it does not use QUIC). See Troubleshooting Network cDAQ Connectivity Issues and page 4 of the NI-cDAQ-9191 Specifications.

 


@appie_user

 I've connected my NI-9234 with cDAQ-9191 to my linux machine. I found the IP address and can login to device.


That exactly do you mean by "logging in"? The Web-based configuration utility (I'd consider that a GUI, however using a tex-based browser like lynx it's not)? Or did you use a telnet client to connect to any of the NI services on the controller? It should not have ssh.

 


@appie_user

- Can I configure the cDAQ-9191 without GUI?


If you use DAQmx from C or Python: yes.

If you want to do it directly from the command line, like you could do with a managed network switch via ssh: No. Except you rebuild all communication that DAQmx does.

And there is a third option, maybe suitable for you: Programming on a different computer (with a GUI), e.g. in LabVIEW. After compiling, you can execute this from the command line.

 

And if you want to have more control over what the controller does, e.g. connecting to it through ssh, or executing programs directly on it, a cRIO is the way to go.


Ingo – LabVIEW 2013, 2014, 2015, 2016, 2017, 2018, NXG 2.0, 2.1, 3.0
CLADMSD
Message 2 of 6
(3,737 Views)

You should start "task" to start acquisition on 9191+9234.

I believe it doesn't send UDP stream data always until you start it.

 

If you don't need GUI, why don't you develop your application with C?

Using NI-DAQmx in Text Based Programming Environments

Certified LabVIEW Developer
There are only two ways to tell somebody thanks: Kudos and Marked Solutions

GCentral
Message 3 of 6
(3,736 Views)

Hi, 

I'm working with Appie to get  NI cdaq-9191 working. I'm currently trying to do a "hello world" measurement. I'm working on a windows 10 computer, and installed the NI-max software version 18.0. Unfortunately the device is not showing up.

I connected the 9191 ,directly to my pc using an Ethernet cable

supplied it with power first the power and status light go, after some seconds, the status light goes of. 

I was able to find the device via the NI-visa Interactive control and determine the ip-address and log in using the browser as shown in the attached image. 

I also tried resetting using the reset button, however no success yet. The second attached figure shows the installed NI software.

Clicking on the device in interactive control gave me an error. Unfortunately i cant reproduce it any more, since Interactive control can't find the device any more.

 

Help is greatly appreciated!

 

Appie1

Download All
0 Kudos
Message 4 of 6
(3,724 Views)

Hi Appie1!

NI-max software version 18.0. Unfortunately the device is not showing up.

I connected the 9191 ,directly to my pc using an Ethernet cable


The cDAQ-9191 is a network device, so it will show up under My System » Devices and Interfaces » Network Devices. This path is retracted in your screenshot, so it might even be there. If not, then this is how to find and configure your 9191: Configure a Static IP Address on Ethernet cDAQ. A guide a bit more verbose is this one: Configuring NI-DAQmx for CompactDAQ Ethernet Chassis

 

In case you need to reset it to factory defaults, the correct procedure is to hold the reset button for more than five seconds (until STATUS LED lights up), see page 1-30 of NI cDAQ-9181/9184/9188/9191 User Manual

 

 

 

 


Ingo – LabVIEW 2013, 2014, 2015, 2016, 2017, 2018, NXG 2.0, 2.1, 3.0
CLADMSD
Message 5 of 6
(2,910 Views)
Solution
Accepted by appie_user

Hi ikaiser, 

 

Thanks for your answer.

I got it working now, thanks. The trick for me was to reset the configuration data, available under tools, after that, the devices showed up in ni max!

 

Geetz, 

Appie

Message 6 of 6
(2,902 Views)