From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

VISA, Continuously read data when available.

I have pressure measuring device which reads the pressure periodically and sends information every 250ms. I would like to read the data for about one and half hour or even for some more time. I wrote 2 programs for this operation

 

1. VISA Read and write every 250ms: Here I configure the settings then write and read data every 250ms. (This fails after some time).

2. VISA using events.

 

I have attached the  both programs. Would you suggest which one is appropriate for this operation or any further suggestions, improvements???

Thank you.

Download All
0 Kudos
Message 1 of 8
(4,928 Views)
I'm posting from my phone so I can't view the VI.

What error do you get? If the instrument appends a termination character, all you should need is a VISA Read with some arbitrarily high byte count. No VISA Bytes at Serial Port, no events, and no wait.

What are you doing with the write?
0 Kudos
Message 2 of 8
(4,925 Views)

Error message is : -1073807339.

 

I found out that there is no need of VISA write. As soon I open the VISA port and set the port configuration the data is available on the interface.

 

I did even tried the example from ni here and I have the same error.

0 Kudos
Message 3 of 8
(4,922 Views)

A timeout error implies one of two possible issues:

1. Your instrument does not constantly send out data

2. You are using the wrong termination character.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 4 of 8
(4,909 Views)

 

What is the difference between the Serial Character and Serial TermChar  for the input: event type?

0 Kudos
Message 5 of 8
(4,906 Views)

nik35324 wrote:

What is the difference between the Serial Character and Serial TermChar  for the input: event type?


The Serial Character just means that something can into the serial port.  The Serial TermChar means that the Termination Character was found in the serial port.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 6 of 8
(4,891 Views)

he issue has been solved. 

0 Kudos
Message 7 of 8
(4,867 Views)

can you give me code compatible for labview 2010

 

thanks

 

0 Kudos
Message 8 of 8
(4,839 Views)