Solution
This error occurs when the controller or joystick has been physically disconnected, either because it has been unplugged from the PC or because the connection is loose.
The error will persist even if the controller is manually reconnected because the device reference is not released by the operating system until the calling program closes.
To workaround this error, encase the
Input Device Controls VIs in a sub-VI. Use a top-level VI to dynamically open, run and close this VI when the error occurs.
The image below demonstrates how the sub-VI should appear.
Note: This image is a LabVIEW snippet, which includes LabVIEW code that you can reuse in your project. To use a snippet, right-click the image, save it to your computer, and drag the file onto your LabVIEW diagram.
This VI can be dynamically called by a top-level VI using
Invoke Nodes, as shown below.
Note: This image is a LabVIEW snippet, which includes LabVIEW code that you can reuse in your project. To use a snippet, right-click the image, save it to your computer, and drag the file onto your LabVIEW diagram.