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.
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.
03-08-2012 02:36 PM
My RS232 signal and analog signals are causing my data acquisition program to display data incorrectly.
The program works best with 2 loops. If I don' t have 2 loops the data doesn't update on my screen instantly.
I need a way to log the data from both loops.
suggestions?
see attached.
thanks
Darren
03-08-2012 04:49 PM
First, you should consider using subVIs as well as making your block diagram smaller. The general rule of thumb is to keep the block diagram to a single screen size. With today's monitors that is still a good size for the block diagram. It is too difficult to see what is going on when you have to scroll all over the place.
As to your specific question I would suggest you create a third loop which gets data from a queue. All of your other processes you want to log data would enqueue the data to be logged. The logging process would simply dequeue the requests and write them to the file.
03-09-2012 07:26 AM
Neat idea. Are there any examples available where I could see that ?
03-09-2012 09:28 AM
There are several examples of how to use queues that ship with LabVIEW. Have you looked at those examples?
03-09-2012 09:33 AM
In your "ReadSerialBuffer.vi" you should first read the amount of bytes available.
If there aren't any available chars your program will always be waiting at this point. See the example VISA_RX.vi-attached.
I also advice to use some event case... You could have both loops run one after another in a case structure. I have attached a serial Port test program I found over here which I like for it's nice structure.
Succes!
X.