07-25-2019 02:49 PM
Hello,
is it possible to send UDP network messages to another computer with DAQexpress? I have two PCs connected with an ethernet cable and would like to trigger a programm on the second computer which expects an UDP message with the program written with DAQexpress on the first computer.
Thanks!
Marius
07-30-2019 01:17 PM
Hi Marius,
DAQExpress isn't really going to be the right tool for this sort of thing. If you wanted to run some acquisition when receiving a UDP message and send that message from another program, this would be fairly straightforward to implement in LabVIEW, however. LabVIEW has both UDP and DAQmx examples that you would simply need to combine to achieve that functionality.
Thanks!
07-31-2019 04:09 PM
Thanks Claire! Now I've got LabView and have many more options, including using UDP messages.
10-23-2019 10:25 AM
Hi everyone,
I'm using LabView now to send UDP messages to a second computer to trigger data acquisition. It works well, when I send the message with Matlab with the following code:
u = udp('192.168.1.1',7000);
fopen(u);
fprintf(u,'G');
fclose(u);
delete(u)
However, when I do the same thing with LabView, it doesn't work. The message is sent for sure but the data acquisition isn't triggered. I have the feeling that it has to do with the data format. Could it be that LabView sends raw (binary) data whereas Matlab (fprintf) is sending formatted data? Any suggestions are welcome because I have no idea how to solve this problem.
Thanks a lot!
10-24-2019 03:50 PM
I finally saved my problem: The receiving computer expected a newline character at the end of my message! Adding \n solved the problem!