LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to give complete access to the port of laptop

Solved!
Go to solution
Hello! I need help.
I am receiving data using xbee connected to laptop port. The problem is with baud rate increasing, the receiving time does not increase as it be.
My Instructor told me that your com port does not give complete space to your software(LabVIEW) .My question is how to give complete access of com port to LabVIEW? Kindly help....
0 Kudos
Message 1 of 15
(4,948 Views)

Who's baud rate is changing?  Should the baud rate be changing?


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 15
(4,940 Views)
We have checked the xbee sending data and receiving data by setting baud rate 115200.In this it takes 8 sec to receive an array of 3000 elements properly. But I want to give my port complete allocation for data receiving so that I can minimize the receiving time.
0 Kudos
Message 3 of 15
(4,910 Views)

@ZohaibRamzane wrote:
But I want to give my port complete allocation for data receiving so that I can minimize the receiving time.

What does that sentence even mean?

 

You say 3000 elements.  What makes up an "element"?  Is that bytes?  Or is that several bytes to an element?  Do you mean you need to increase the receive buffer of the serial port?

0 Kudos
Message 4 of 15
(4,907 Views)

Give us your VI so we know what you have so far.  You should also better describe the format of the data coming through the XBee.

 


@ZohaibRamzane wrote:
In this it takes 8 sec to receive an array of 3000 elements properly.

At 115200, you should be able to send about 92kB of data in 8 seconds (assuming a full stream of data).  So how is the protocol working?  Do you have to request the data first?  Or is the data coming in at a steady rate (like a data point every 1ms)?


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 5 of 15
(4,889 Views)

One element means that it consist of one byte. So 3000 elements means 3000bytes to be send after 8 seconds.

0 Kudos
Message 6 of 15
(4,851 Views)
Solution
Accepted by topic author ZohaibRamzane

Here is my vi..... I have set the Baud Rate 115200.But in labview If i receive the data and plot it, it plots accurately after 8sec. But i set the sending time less than 8sec,it does not plot accurately.

0 Kudos
Message 7 of 15
(4,840 Views)

What do you mean by "set the sending time"?  I don't see anything that resembles that in your code.

 

Also odd is that you set your timeout value for your serial port to 120 seconds.  That means if for some reason you have a communication problem (disconnected cable?), it'll take you 2 minutes before the VISA read comes back and says it did not get the data.

 

What is the purpose of all of your code outside the biggest while loop where you read a measurement file?  That is only going to happen once.  Then you pass all the data to assorted small whileloops that run as fast as they can working on the same data every iteration and either passing it to a subVI if the boolean is true, or doing absolutely nothing if the boolean is false.

0 Kudos
Message 8 of 15
(4,830 Views)
You point out the valid point. Actyally what I am receiving in upper loop, I write it to the measurement file.This measurement file is updated its data after 8 seconds. These 8 seconds have been set on sending side in coding of microcontroller.
Actually, I want to read this measurement file and want to perform some analysis on it. This analysis has been performed by the subvis outside the bigger while loop.
Now there is another problem. The problem is after runnunig the program , the upper big loop runs and update write to measure file after 8 seconds. But the read from measurement file only reads the updated file only once not always when I push the subvis button.
I want to read the new data every time as it has been updated every 8 sec.
Kindly check where is the data flow problem and how can I resolve it.Thankyou
0 Kudos
Message 9 of 15
(4,799 Views)
Please reply. I need to fix it right now....
0 Kudos
Message 10 of 15
(4,788 Views)