LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

UDP not sent on a 7.1-built application?

Just a quick question - I cannot send commands to an IP address over UDP when I build with 7.1. The uncompiled version works, but not the .exe.

Previously, I've noticed a few features not working when I build with 7.1. This was related to the 7.1 Runtime Engine not getting completely installed. I found that by checking the boxes in the Advanced tab of the Application Builder that you can/have to install parts seperately. But even with the entire Runtime engine installed (from LabVIEW's 7.1 disc we bought), the UDP send still fails.

Am I missing anything?
0 Kudos
Message 1 of 4
(2,373 Views)
... I'm playing around with Labview's UDP send/receive examples and I notice that the receiver VI only receives when set to the default port (61557). If you set the sender to use send on port 10001, and the receiver to receive on 10001, no data is received. I'm sure this is my problem, and it's not a build issue (this phenomenon occurs with both LabVIEW's examples in uncompiled and compiled modes)
0 Kudos
Message 2 of 4
(2,368 Views)
Rick,

It sounds like you might have a firewall issue. The shipping examples (UDP Send and UDP Receive) work just fine for me in LV 7.1, both VI and EXE versions, regardless whether I use the default port or specify 10001, and regardless whether I test with localhost or by sending from one machine to another.

I'm on XP, and I did have to grant the EXEs permission to broadcast and receive the first time I ran them. Presumably, I granted LabVIEW itself permission long ago. I suspect you're running into something along these lines, either with the OS itself or with your external network environment (routers, etc.). The fact that things seem to work on one port but not another suggests to me that some firewall agent is configured to allow traffic only on certain ports.

Hope this helps,
John
0 Kudos
Message 3 of 4
(2,359 Views)
Thanks John, that's a good idea, and I think that was the problem when I tried to run the examples on the machine in my cubicle.

I ran the examples on the machine that this program is meant for, and they worked. My program still didn't, but what I did was follow the example LV provided, and gave a different port for UDP Open and the port to send to in UDP Send - previously, I had both of these numbers be the same. This is probably now how you're supposed to do it, but it always worked with LabVIEW 5.1/6.1.

So anywho, I now have a different number going into each VI's 'Port' input, and the program works again.

This was bascially because I didn't know how UDP ports work with LabVIEW, and I also failed to capture the error string correctly (for the benefit of anyone who reads this in the future, if you get a "The specified network address is currently in use" error, make sure the ports are different).

Thanks for your help, sorry to pollute these boards with something that was so easy to fix...
0 Kudos
Message 4 of 4
(2,354 Views)