LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Serial Cable Connectivity

Below is the error I am getting in NI Max when trying to open a test panel. None of the instruments in my LabVIEW VI that are connected via serial cables are working. They worked before we got a new drive with the newer version of LabVIEW (2017 to 2022) and now none of them are connecting. In the VI, a pressure is just graphing "0" over and over when the display is not zero.

 

Error opening resource:
ASRL3::INSTR

VISA:  (Hex 0xBFFF0072) The resource is valid, but VISA cannot currently access it.

0 Kudos
Message 1 of 8
(1,328 Views)

Here is a trouble-shooting article: https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z0000019NeQSAU&l=en-US

 

What version of NI-VISA do you have installed?

0 Kudos
Message 2 of 8
(1,324 Views)

Hi there, thanks for the article. I realized I had the VI open at the same time. The error I should have shared was "VISA: (Hex 0xBFFF0015) Timeout expired before operation completed." I know the baud rate, data bits, etc was correct and the command I gave was correct. The timeout is much longer than the attempt was so that didn't fix it either. The problem of the graph plotting all zeroes is still true. Any suggestions?

0 Kudos
Message 3 of 8
(1,298 Views)

Hi ahhh,

 


@pleasehelppleaseahhhhh wrote:

The error I should have shared was "VISA: (Hex 0xBFFF0015) Timeout expired before operation completed." I know the baud rate, data bits, etc was correct and the command I gave was correct. The timeout is much longer than the attempt was so that didn't fix it either.


Can you communicate with your device using other software, like MAX testpanels or any Terminal tool?

 


@pleasehelppleaseahhhhh wrote:

The problem of the graph plotting all zeroes is still true. Any suggestions?


Implement proper error handling to avoid plotting invalid data…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 8
(1,273 Views)

Usually a termination character problem.Most people test it with a terminal program or NI Max test panel and then think that the string used there is enough. But these programs generate an automatic appending of carriage return and/or line feed to the command. LabVIEW and NI ViSA by default do not do such automatic command string modifications.

 

Most devices do not do a constant command parsing but wait for one of these characters before starting to parse the incoming string.

 

And as Gerd said, do error handling. If VISA Read returns an error or the returned data is not as expected, there is no sense in blindly trying to convert that bad or empty string into a number and add the inevitable wrong number to your data set/chart.

 

Rolf Kalbermatter
My Blog
Message 5 of 8
(1,272 Views)

Most serial communication issues can be solved by watching this video: VIWeek 2020/Proper way to communicate over serial

========================
=== Engineer Ambiguously ===
========================
Message 6 of 8
(1,236 Views)

Hello, no that error shows up in NI Max and LabVIEW. Is there a way to remap a device to the subvi? Like when I go to click from a list of devices it doesn't show up.

0 Kudos
Message 7 of 8
(1,195 Views)

Hello, the end character is not the issue. I got the command to work on the old drive we had for the computer. On the new drive, the device is giving the timeout error in NI Max and in LabVIEW. I am not sure why the device shows up but is not communicating with NI Max/LabVIEW. Any other advice?

0 Kudos
Message 8 of 8
(1,191 Views)