nistam Posted September 13, 2004 Report Share Posted September 13, 2004 Ok, i have an application that reads data from serial port. In the meanwhile the user must click a button that shows up a dialog, where he must enter some information. During that time the application stops reading data and waits for the dialog to close. In Visual Basic this kind of task can be accomplished by using API functions.This way you can have a dialog box displayed, and at the same time the timer display on your main form keeps on. I guess this is multithreading, but i know that labview IS multithreaded. I thought of using Call by reference or Open VI by reference. Any ideas or thoughts? Quote Link to comment
aledain Posted September 14, 2004 Report Share Posted September 14, 2004 Far far far simpler than that, use a separate while loop for your dialog box and a separate loop for your serial port stuff. This is classic LabVIEW and one of the powers of LabVIEW over other languages. use globals (as a starting point) to transfer data between your loops. More advanced mechanisms for this transfer (queues, notifiers, semaphores, etc) are available but not necessary. BTW, this is not multi-threading, so since both while loops are running in the same loop. So I like to refer to this as multi-fibred. LabVIEW is multi-threaded but for 99% of the world's programs you can get away with just doing the fibre thing. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.