ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Create timeout in sub vi

Hi, 

 

I am using the Database connectivity tool box to communicate with a database on the local network. Unfortunately, the CommandTimeout parameter is not supported by my client, and I need to kill a query which is too long and holds the rest of the process. Has anyone encountered this issue?

Basically, I would like to encapsulate my query block into something that stops the query and replace missing values by NaN if it exceeds a certain time.

 

It sounds simple but I haven't found any way of doing this so maybe it's not!

 

Thanks in advance!

0 Kudos
Message 1 of 2
(1,324 Views)

I dont know if its the best way (probably not), but you could run a SubVI (with your query) asyncronously and wait for the value(you could set a default value and wait for a change) if nothing happens and the "time has elapsed" then set NaN and continue your processes. 

 

 

=======
My Channel: https://www.youtube.com/@LV_Lab

0 Kudos
Message 2 of 2
(1,251 Views)