Solution
This error is caused by unsupported values being passed to the hardware driver by NI-VISA. Please check your serial hardware and your device's manual to ensure that the settings being passed by NI-VISA to the underlying hardware driver match both the serial bus and the hardware specifications. This includes the write commands themselves being sent to the device as it may not follow standard serial protocols.
One common cause of this error is wiring an incorrect value to the
stop bits input of the VISA Configure Serial Port.vi. You can configure the number of stop bits to be either 1, 1.5, or 2, and it may seem intuitive to simply wire in this number to the
stop bits input. However, the input is an integer input and cannot take a value of 1.5 since this is a double.
The best solution for this is to right-click on the input and create a constant. This will create an enumerated ring control that will pass the correct value to the VI for you. Another method is to input the appropriate value that represents the number of stop bits into the VI. The table below shows what value should be input for each number of stop bits you desire.
Number of Stop Bits | Value to Input |
---|
1 | 10 |
1.5 | 15 |
2 | 20 |
The picture below shows both methods that will work for setting the number of stop bits, along with the incorrect method of passing in a double.