Error 5006 When Run a Serial Communication Using RS-232 in LabVIEW

Updated Sep 2, 2024

Reported In

Hardware

  • GPIB-RS232

Software

  • LabVIEW

Driver

  • NI-VISA

Issue Details

I am running a VI that includes a serial communication via RS-232 together with Arduino instrument in LabVIEW but sometimes an error would appear and the VI will stop automatically. The error is as shown below:

Error 5006 occurred at:

Open Serial.vi >>
Initialize.vi >>
Initialize Device.vi >>
Serial Open.vi >>

Possible reason(s):

The specified serial port configuration is invalid. Please make sure the COM port associated with the LINX device is selected.


The error is shown in the following dialog box.

error 5006.png

Solution

There is a high possibility that the error is caused by the NI-VISA driver is not able to detect the instrument, therefore unable to create the VISA resource for the serial communications (COM) port to communicate with the instrument.

To solve the error, repair the NI-VISA driver in the NI Package Manager software . If repairing the driver could not solve the error, install the latest version of NI-VISA driver that is compatible with your operating system and LabVIEW version.