I am working on a TestStand & LabVIEW developed test system upgrade. One new feature is sending real-time test data to a network SQL database. One contingency feature is to detect a loss of the network and write test data to a local datatbase until the connection is restored. The problem I have is that the TestStand Open Database function takes 20 seconds to time out and I have a 30 second window for the full test cycle. The LabVIEW function takes about 15 Seconds to time out. Does someone know of a quick response (<5 seconds) TestStand or LabVIEW "ping" like function to check for network and/or database connection status.
The connection timeout for a TestStand "Open Database" step doesn't always have a default setting like you are assuming. You can actually specify in the connection string for the OLE DB provider a connection timeout parameter. If when in the "Edit Open Database" dialog, you click the "Build" button you can see that there is a "Connection Timeout (in seconds)" option under the "Advanced" tab of the window. Not all OLE DB providers allow this to be set, but some do so check it out for yours.
Now, the real issue we should look at here is the special circumstance your situation has of needing to decide whether to log remotely or locally in less than 30 seconds. So you really should implement some type of fault detection procedure just like yo u mentioned in conjunction with a proper timeout setting. In order to perform a ping you can actually do this from both LV or TestStand by executing a system command. In LabVIEW you can use the System Exec.vi to run a batch file that calls ping. In TestStand you can use the Call Executable step to perform the same operation. For more information on doing this check out the KnowledgeBase document on the following page: