LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

UDPRead Timeout With Extended Debuging

Solved!
Go to solution

Hi.

My code is sat in a loop performing a UDPRead instruction with a timeout set (1000mS) waiting for a remote node to power up and send a message.

   UDPRead(hSocket, pResponseBuf, responseSize, 1000, pSourcePort, pRemoteIP);

This code works fine as it will repeatedly timeout until the remote node powers up and the expected message is recieved

I have recently set the debugging level to Extended and this code breaks on the timeout reporting a NON-FATAL RUN TIME ERROR (-6808).

I have tried adding

  SetBreakOnProtectionErrors(0)

  UDPRead

  SetBreakOnProtectionErrors(1)

but this has not helped.

In my opinion this is not a runtime error as the function  provides a valid option to timeout but breaks before I get a chance to process the returned error value of the timeout.

 

Can anybody please suggest a way to locally supress the error without having to turn off extended debuging.

 

Thanks

0 Kudos
Message 1 of 3
(3,043 Views)
Solution
Accepted by topic author StephenPinfold

Hello Stephen

 

The runtime error -6808 indicates that the timeout has expired. This is due to Extended debugging taking longer to execute than normal debugging mode (analogous to LabVIEW's Highlight Excecution).

You can disable run-time error by going Run -> Break On ->Library Errors. You can also try using SetBreakOnLibraryError() instead of SetBreakOnProtectionError(), and see if that has any effect.

 

If the issue persists, you can try using the debug library found here:
http://forums.ni.com/t5/LabWindows-CVI-User-Group/LabWindows-CVI-Tip-Debugging-Release-Executables/t...

 

I hope some of these solutions help.

 

Thank you

Message 2 of 3
(3,002 Views)

Thanks for your post.

The SetBreakOnLibraryError has fixed the issue.

Though UDPRead is a CVI call, I guess that it is calling down into WinSock and that is throwing the actual exception on timeout.

This is now working as I expected.

Thanks

 

0 Kudos
Message 3 of 3
(2,997 Views)