03-21-2023 02:42 PM
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.
03-21-2023 02:51 PM
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?
03-21-2023 06:10 PM - edited 03-21-2023 06:12 PM
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?
03-22-2023 01:57 AM
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…
03-22-2023 02:03 AM - edited 03-22-2023 02:08 AM
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.
03-22-2023 09:06 AM
Most serial communication issues can be solved by watching this video: VIWeek 2020/Proper way to communicate over serial
03-23-2023 11:15 AM
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.
03-23-2023 11:18 AM
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?