Showing results for 
Search instead for 
Did you mean: 

Error -1073807339 occurred at VISA Read

The file I am using is the attached herewith. I can write to and read from the same port using loopback a signal like 00000011.
However, when I try to simulate the kind of signal I will be working with which is
00000011<\n>00001111<\s>11001111 and I specify that bytes to be read are 48, I am getting the above error.
Possible reason(s):

VISA: (Hex 0xBFFF0015) Timeout expired before operation completed.

As you can see, I increased my timeout to 15 sec. Still same error.

Can anyone please advise me where I am going wrong.
0 Kudos
Message 1 of 8
You are only transmitting 27 bytes but asking to read 48! VISA Read will time out waiting for the non-existent 21 bytes.

A slight delay between write and read may be helpful.

It is good practice to check Bytes at Port and then read only that number. I modified your VI to do this.

I have no serial ports so I cannot test it.

See if this helps.

Message 2 of 8
Thank you very much for your response. It did help me solve my problem.
I appreciate that alot.
0 Kudos
Message 3 of 8
Possible reason(s):
LabVIEW: An input parameter is invalid.
NI-488: Command requires GPIB Controller to be Controller in Charge.

I modified my overall block diagram based on what you helped me with. What I am trying to achieve is write a string of data to the serail port and read from the same serial port. The data I am using is in the below format with the data representing 8 bit binary numbers separated by delimiters
\s data1 \n data2 \s data3
I am then separating the signals using matchpattern and finally converting them into decimal numbers and displaying them.

The reason I want to write and read from same serail port is because I have to simulate that my program can continuously read different values at the serial port and display them process them accordingly.

I am however getting this error which I am not sure what it is about.
I have attached the file herewith.

Can you please advice me.
Thanks again.
0 Kudos
Message 4 of 8
You have to initialize the Shift Register that passes the error cluster in the While Looop. The way it is now, you will keep getting an error if it occurs once.

I would personally hav chosen to pass the VISA Resource Name and the error cluster from the VISA Write function to the Property Node in "sequence 1" to make sure that I only had to specify the resource one place and to catch possible errors from the VISA Write funtion.
- Philip Courtois, Thinkbot Solutions

Thinkbot Solutions
0 Kudos
Message 5 of 8
Thanks for your help Philip.
I however did not quite understand what you meant by initializing my shift register.
I did try connecting the VISA Resource Name and Error In from where I am configuring my port into the Inttrument directly but that however gives me error in scanning.
Could you please advice.
I have attached the file herewith again.
0 Kudos
Message 6 of 8
Initializing a Shift Register simply means to connect a value to the left Shift Register terminal from outside the loop. If a Shift Register is not initialized, it will store the latest value between executions of the VI. In your case, if you get an error, the While Loop will finnish and your VI will stop. Since the Shift Register is not initioalized, it will remember the error the next time the VI is executed, and therefore you will keep getting the error until you restart LabVIEW.

I have attached you example with a few changes that passes the error cluster and the VISA reference.
- Philip Courtois, Thinkbot Solutions

Thinkbot Solutions
0 Kudos
Message 7 of 8
Here's the VI.
- Philip Courtois, Thinkbot Solutions

Thinkbot Solutions
0 Kudos
Message 8 of 8