Solution
The firmware, which should deploy automatically when the driver loads, is failing to do so, resulting in error -50152, indicating a hardware failure.
To solve this issue, you can set up scheduled task to automatically restart the driver by following the steps below:
- Open Device Manager and look for the module driver.
- Right click the module driver and select Properties.
- In the Details tab, select Device instance path from the drop-down menu and copy the value.
- Open Task Scheduler and click Create Task....
- Enter a name for the task and tick Run with highest privileges.
- In the trigger tab, create a new trigger and set the Begin the task to At log on.
- In the Actions tab, click New.
- Select Start a program for Action, enter pnputil for Program/script, and for Add arguments (optional), enter /restart-device "Paste_the_Device_instance_path_here" and click OK. You should see something like figure below.
- Click OK to create the scheduled task.
- Restart your PC and check if the script run automatically to resolve Error -50152 in NI MAX.
Alternatively, you can manually restart the driver by disabling and re-enabling the module in Device Manager to clear the error.