LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Break/interrupt subVI before outputs met

Hello all,

 

I'm currently building an application which talks to some python via socket and am currently trying to impliment some error control.

 

I have a 'receive data' subVI which recieves data from python through the socket. However if there is a problem with the connection then this subvi will 'hang'. I wish to impliment a timeout whereby if the timer is elapsed then the code will ignore the fact that subvis outputs have not been met and the code will continue with an error message. Some sort of break/interrupt or try statement would suit this in text based. What would be the equivalent?

 

start timer

run receive data subvi

if timer > 1 second:

    continue and return error (ignoring that subvis outputs have not executed)

 

Thanks,

Oliver

0 Kudos
Message 1 of 3
(3,104 Views)

You need to find a way to do this inside your SubVI - what you're asking for goes against one of the main principles of data flow (a subvi will only complete once all of its outputs have been met). Typically, any LabVIEW functions that rely on an external communication (e.g. TCP, VISA/Serial) have a 'timeout' node which will cause the node to exit if no data is received within the timeout.

 

If you post your 'receive data' subVI, we might be able to find a way to help you do what you want.


LabVIEW Champion, CLA, CLED, CTD
(blog)
0 Kudos
Message 2 of 3
(3,081 Views)
0 Kudos
Message 3 of 3
(3,052 Views)