To be honest I dont recommend passing DVRs between loops because they lack one fundamental feature that would make it thread friendly - timeout. If you want to do it you should include with every DVR a LV semaphore, or pass the DVR using notifiers. Then you are safe :)
Piotr Kruczkowski Thank you! I just want to adopt OOP feature in my original Queue Message Handler framework.Therefore I create my own class, and I try to pass the class instance through call-by-reference mechanism instead of call-by-value. And I found some articles mentioned that object reference could be created by"DVR". But I don't know how to do it.
Very nice video! Just one question: I want to pass a huge control by reference and change him many times in my code, in 3 separated whiles to be more precise. Do you see any problem with that?
There are potentially many problems this can cause including race conditions, one loop blocking execution of another etc. Copying data in modern systems is not as expensive as it used to be, so I recommend sending the updates with queues to a central loop. The central loop should be the only one to update the data. When you want to then view the data in other loops you can send requests to the central loop for the copy of relevant information. If you stick with references, try to only write in one place, and you can read in many places. In newer versions of LV you can enable In Place Element structure to be read only, which improves performance.
This explanaition goes directly to the point. Thanks.
Thanks for your demo video, very informative. You can actually use Ctrl+B to get rid of all the broken wires.
Thanks for the video. How can we change the value of control using DVR?
you should be hired by LabVIEW to help us. on questions.. thank you..
Nice Video!
Are there any recommend LVOOP-framework that use DVR for object passing between different loop?
To be honest I dont recommend passing DVRs between loops because they lack one fundamental feature that would make it thread friendly - timeout. If you want to do it you should include with every DVR a LV semaphore, or pass the DVR using notifiers. Then you are safe :)
Piotr Kruczkowski Thank you! I just want to adopt OOP feature in my original Queue Message Handler framework.Therefore I create my own class, and I try to pass the class instance through call-by-reference mechanism instead of call-by-value. And I found some articles mentioned that object reference could be created by"DVR". But I don't know how to do it.
Very nice video! Just one question: I want to pass a huge control by reference and change him many times in my code, in 3 separated whiles to be more precise. Do you see any problem with that?
There are potentially many problems this can cause including race conditions, one loop blocking execution of another etc. Copying data in modern systems is not as expensive as it used to be, so I recommend sending the updates with queues to a central loop. The central loop should be the only one to update the data. When you want to then view the data in other loops you can send requests to the central loop for the copy of relevant information. If you stick with references, try to only write in one place, and you can read in many places. In newer versions of LV you can enable In Place Element structure to be read only, which improves performance.
Please ask in the comments what kind of other LabVIEW vids with tips and/or trick you would like to see.
Actor framework n its application..