MORECHEMISTRY.COM::MORE CHEMISTRY ON THE WEB |
LabVIEW programming topics - queueing data
[LabVIEW vi collection]
[LabVIEW links]
[LabVIEW bookstore]
[programming topics] [drivers] [device simulators] [utilities] [projects] [events] [related topics] IntroductionIn time critical applications it can be necessary to split tasks e.g. to split the display task form the data-acquisition task. One way to achieve this in LabVIEW is by using a queue. The queue is a place where data can be stored by one task and where the same data can be retrieved by another task. The type of data that can be placed must be defined when the queue is created. For example a 2D array of doubles for transferring data from a data-acquisition task. Once the queue has been created one task (or several tasks) can put data on it and one task (or technically even several tasks) can take data from it. A task would usually be a while loop. The queue functions can be found in the Functions Pallete >> Programming >> Synchronization >> Queue Operations. ExampleA typical use of a queue would consist of a data-aquisition task, a while loop that obtains data from a data-acquisition device and puts data on the queue, and a display task, a while loop that takes data from the queue, performs some calulation, displays it and possibly writes it to disk. Downloads example program Remarks
Bart Boshuizen, 2011/02/25
|
|