DAQExpress

cancel
Showing results for 
Search instead for 
Did you mean: 

UDP network messages

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

0 Kudos
Message 1 of 5
(3,535 Views)

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!

Claire C.
AppSW Staff Product Support Engineer
National Instruments
CLD|CTD
0 Kudos
Message 2 of 5
(3,478 Views)

Thanks Claire! Now I've got LabView and have many more options, including using UDP messages.

0 Kudos
Message 3 of 5
(3,461 Views)

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!

 

Download All
0 Kudos
Message 4 of 5
(3,317 Views)

I finally saved my problem: The receiving computer expected a newline character at the end of my message! Adding \n solved the problem!

0 Kudos
Message 5 of 5
(3,304 Views)