10-03-2018 10:16 AM
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,
Solved! Go to Solution.
10-04-2018 03:13 AM
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_userI'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.
10-04-2018 03:16 AM
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?
10-05-2018 10:21 AM
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
10-11-2018 07:02 AM
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
10-12-2018 02:27 AM
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