Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Not able to read serial data at higher frquency

I want to collect data from the sensor using serial port and for that I am using NI visa Labview programming. I am attaching my file for reference. My problem is when I set the frequency of the sensor at 100 hz it is working fine however if I increased it to 1000 Hz , it shows me error 1073807253 which is a framing error. Can someone help me to solve my problem ? My baud rate remains same for both frequency. 

0 Kudos
Message 1 of 2
(2,542 Views)

You really should not be using a Timed Loop for a serial communications.  Just use a normal While Loop.  And you do not need to put in a wait in the loop either.  Since it looks like all of your messages are the same length, just tell the VISA Read to read that number of bytes (I am guessing 15).  So no need for that Bytes At Port either.  If no data is coming in, you will get a timeout error.  But if data is constantly coming in, the VISA Read will limit your loop rate.

 

There is also no need for any of the Sequence Structures.  Data flow will take care of the order.


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 2 of 2
(2,504 Views)