Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

how to give complete access to LabVIEW of port of laptop

I am doing a project in which I am receiving data bby Xbee at remote end.I have set the baud rate of sending and receiving side,115200. I need to send 3000 bytes every time. With the baud rate mentioned, the data must be received in less than a second. I have used LabVIEW for displaying the data waveforms.Now the problem is I am receiving data in 2 seconds in Xctu.but in LabVIEW if I receive the same data and plot it,the waveforms get disturbed.But if I increase the sending time,say 7 seconds,the waveforms are good.Now the problem is with LabVIEW speed to update the previously received data with new data so that I could plot the waveforms correctly.That's why I e want to give complete access of com port to LabVIEW. Please help me.

0 Kudos
Message 1 of 6
(3,753 Views)

Hi Zohaib,

 

I cannot access your sequ.vi so I do not have the full picture of what is going on. It sounds as though your data is being buffered and you may be trying to update your waveform display too often. There is only a single User Interface Thread and if you continually spam it with commands to be updated, it will slow the execution speed of your entire program. That being said, you should stick with the general guideline of sending more less often. Try updating the waveform display once or twice per second by throwing a wait function in your update loop, this will force the UI Thread to yield the CPU so other threads can receive processing time.

0 Kudos
Message 2 of 6
(3,713 Views)
The problem is with the receiving time.I think with baud rate 115200 I can receive 3000 bytes in 0.25 seconds. But the waveforms are plotted only if I sent the data after 8 or 7 seconds.
Please tell me there exists any method to give LabVIEW complete access of the port?
My instructor told me that we can give a complete access of a COM port to any software. Is it true?
If true then how can I do it.
Thankyou for replying
0 Kudos
Message 3 of 6
(3,703 Views)

As far as I am concerned, I believe you are having LabVIEW claim the serial port (COM13) and it is an all or nothing relationship. LabVIEW is in control of access to that resource. I would have you take a look at this resource to shed some light on what is happening behind the scenes:

 

http://www.ni.com/white-paper/4052/en/

 

Have you been able to benchmark the rate you are talking about in any other application?

 

What do you mean by "sent the data after 7 or 8 seconds"? Are you saying you start communication with the Xbee after that amount of time or you update the graph after that amount of time?

 

What do the graphs look like if you plot them before 7 seconds?

0 Kudos
Message 4 of 6
(3,686 Views)
By 7 seconds mean, I update the waveform after 7 seconds. This time has been set on sending side. If I set the time less than 7 seconds, the waveforms get disturbed. It means the the new data and the previous data may overlap and give waveforms that have some parts of them wrongly plotted.
The other thing is that if I check the receiving data in XCTU, it takes just 2 seconds to receive all data.
What I want to reduce my data receiving time in LabVIEW and rightly pollotted waveforms.
Thanks
0 Kudos
Message 5 of 6
(3,676 Views)

Could you please attach screenshots illustrating the behavior you are seeing?

0 Kudos
Message 6 of 6
(3,664 Views)