LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Re: Error 1073807339 VISA READ TIME OUT

Solved!
Go to solution

Hi! 
I have same error code. I'm very beginner in LabVIEW and i'm trying to connect with very old device. In my code i try to read data from machine and i want to keep/send it in queue. 
Maybe my program is completely wrong idk 

Could you please help me ? Thank you.

 

Best regards.

 

Here is my error:

 

0 Kudos
Message 1 of 14
(1,243 Views)

Hi cosfen,

 


@cosfen wrote:

Could you please help me ?

Here is my error:


No, we cannot help: you forgot to provide any substantial information!

When you want help with your VI then you should attach your VI! We cannot run/edit/debug images with LabVIEW!

You also forgot to mention which kind of device you want to communicate with…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 14
(1,228 Views)

Hi GerdW,

I'm really sorry. I try to connect with Millitron 1240. 

I fixed the VISA error but now queue giving error with same code

Best regards.

 

Here is my VI:

0 Kudos
Message 3 of 14
(1,185 Views)

Hi,

I can't understand. I ran it again my VI there is no error code. 

But i still have a problem. VI isn't work the way i planned.

 

Best regards.

 

0 Kudos
Message 4 of 14
(1,178 Views)
Solution
Accepted by cosfen

Hi cosfen,

 


@cosfen wrote:

I try to connect with Millitron 1240. 

I fixed the VISA error but now queue giving error with same code


Where did you fix any errors?

 

Errors I found in the VI:

  • Don't use BytesAtPort. Especially when you initialize the port to use a TermChar like you do!
  • You only read BytesAtPort once before the loop, but in the loop you use this very value for all other read operations. This is wrong…
  • You use local variables to access the queue reference: don't do that! Use wires (and a shift register)!!!
  • Why is there a case structure in the producer loop? What is its purpose? Remove that case structure, send the "initialize" command once before the loop and have just the event structure in the loop! (You should not hide event structures inside of cases!)
  • What's the point of reading the serial port just to determine the queue datatype? Define the queue before the consumer loop, so you don't even need this "initialize" state!
  • why are there two states "Read" and "add to queue"? Why don't you handle this in just one state?
  • What's the purpose of that queue?
  • Why do you flush the queue content (string array!) into an array of VISA references???

You really should take the LabVIEW basics tutorials…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 5 of 14
(1,175 Views)

Yes you're right. I'm going to take basic labVIEW tutorial all over again. This is too complicated for me. Do you think i can create simple VI to save the data read over VISA (by using queue) Thank you and i'm really sorry. I'm very beginner right now.

 

Best regards 

 

0 Kudos
Message 6 of 14
(1,167 Views)

Hi cosfen,

 


@cosfen wrote:

Do you think i can create simple VI to save the data read over VISA (by using queue)


Just a suggestion:

It shows the basic approach, but misses some constants and other stuff…

 

Again: what's the purpose of that queue? Why do you insist on using a queue?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 7 of 14
(1,162 Views)

Hi,

Thank you for your help.

Actually, I was trying to create this VI based on the data I read from VISA.

 

Best regards.

0 Kudos
Message 8 of 14
(1,154 Views)

The way you have it set up seems a bit backwards to me.

 

Producer just "produces" commands depending on user input and then you have a consumer that actually produces data you want and you put that data in another queue, which never actually returns any data, you just flush it.

 

If you intend on using queues for this, then the producer is usually the one to put data in the queue and consumer takes that data and does whatever with it (but just flushing it seems counterproductive, you should probably write it to a file or something, as GerdW suggested)

0 Kudos
Message 9 of 14
(1,147 Views)

Thank you

0 Kudos
Message 10 of 14
(1,142 Views)