LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

udp not working after exe built

Hi All,

I wanted to make a vi to get udp packets and the vi is working well in the debug mode. Built the exe of the same and then its not catching the data when I run the exe. Could anyone please help me to identity the reason. Please refer the attached screen shot of the test vi.

Thanks.

Sanith

udp.png

0 Kudos
Message 1 of 15
(2,982 Views)

You don't catch the error, but there definitely is one. Probably saying you that that port is already in use on your pc. I can imagine that UDP demands an free port to use, while your server executable has already taken one.

 

Perhaps if you run this client on another PC in your network, it works well.

0 Kudos
Message 2 of 15
(2,972 Views)

Thanks Harlequinade for the quick reply.

 

In fact its not showing any error, just timeout and the loop counter is ticking.

Yeah me also doubted the port busy issue, so I restarted the computer and ran the executable first.

When I tried a copy of the same VI simultaneously running, the second one start catching the data when the first one just stop running and closing the VI.

0 Kudos
Message 3 of 15
(2,950 Views)

You need to move the error display into the while loop to show any errors. At the moment your while loop never ends so the UDP connection is never closed and the error indicator is not populated.

 

TWorle_0-1581321404624.png

0 Kudos
Message 4 of 15
(2,940 Views)

Hi TWorle, 

 

I tried that also, but did't solve. The thing is like why it is working VI and not with executable!!

 

Sanith 

0 Kudos
Message 5 of 15
(2,931 Views)

I'd just wire the Error wire to the loop conditional terminal.

That way the loop stops when there's an Error.

Makes no sense to keep the loop running anyway.

Don't forget to rate a good Answer....
---------------------------------------------------------
Here should be some cool signature

But there's NOT

LabVIEW 2012-2017
---------------------------------------------------------
0 Kudos
Message 6 of 15
(2,924 Views)

then the problem is whenever there is timeout happen the loop stops. I don't want that condition, it has to listen further even if there is a gap of packet flow.

0 Kudos
Message 7 of 15
(2,906 Views)

Your Vi read just 1500 Byte from UDP and then stop, just once.

Try to see the example of UDP connection manager and get hints.

0 Kudos
Message 8 of 15
(2,900 Views)

I agree with Servodan, it is often useful to wire the error wire to the loop conditional terminal, you would need to clear timeout errors first though.

 

Are you saying that you have wired the error cluster like this in your exe, and there are no errors showing?

Niatross_1-1581332323804.png

If that is the case it implies that you aren't receiving any data on that port. I'd suggest checking your Firewall settings as an exception may have to be created for the exe you have made. 

0 Kudos
Message 9 of 15
(2,898 Views)

That is the maximum packet size.

0 Kudos
Message 10 of 15
(2,885 Views)