Bit of an odd one and I am probably doing something fundamentally wrong however I am fairly new to OOP. Essentially I have a hierarchy of 3 items say A, B and C. I have a DD VI called "ModifyUI.vi" in each class and I am calling this VI and its parents in parrallel (Probably not a great idea but it is my end goal). After each "ModifyUI.vi" has completed doing what it needs to I would then like to collect each VI's data as they were all run in parrallel back into the initial class that called them all.
I have attached an overview of what I am trying to achieve in a mockup of my problem. I am willing to change tack as long as the same goal is reached (Modify all class data in parrallel).
Thanks in advance
Hello everyone, I want to share a VI that I recently created to search for orphan files in a (very! ) messy project. As it turned out it's actually very easy to do that (if you find super-secret stuff on the net):
This VI will find files (VIs, Controls, Classes, etc...) in your project folder that are not linked by a given top-level VI. This is done by comparing the call-chain of the top-level VI with the files on disk. It assumes your files are in folders relative to the specified root directory. This also means that files outside the hierarchy will be ignored (vi.lib and such).
Be aware of (at least) two things:
This VI will return false friends if you happen to have any "Open VI Reference" call with constant VI names or paths connected to it (not a problem if you use static VI references). VIs in diagram disable structures are not listed in the call-chain. So if you use conditional (or regular) disable structures this VI will return false friends. Does anyone know a solution to number 2. actually?
Hope this proves useful to you too.
I'd appreciate some advise or pointing in the right direction regarding building an EXE with class dependencies. I have a project built with actor framework and when I build it to exe, I get lots of dependencies which I think should be included in the EXE as seen below:
On my Source files build properties page I currently have nothing under Always Included. I did try including all of the lvlibs and including them in the EXE but it didn't make a difference.
In summary, I think the way my EXEs are building is not right. It is easy to see what VIs I'm using (although you can't open them) and it doesn't look very professional. What are the best practices for building dependencies into EXE?
If you have your class and you want to create a pull right menu on a property node for it, you can use the colon ( to separate property items for it. Just right click on the class Â» Properties Â» Item Settings Â» Localized name.
Also, on a separate note and since I'm in the neighborhood, you could also take advantage of the "Documentation" tab in the Class properties to change the "Localized name" from the default (in my case, "NI_VSA.lvclass") to something shorter or more meaningful. .This makes it easier on the eye.
By John Lokanis
Find the best methods (or at least some good options) for message decoupling that are simple to implement and efficient to execute.
Messaging architectures in LabVIEW that use a class for each unique message type are strongly coupled to the recipient process (aka â€˜Actorâ€™). This is due to the need within the message execution code (a method of the message class) to access the private data of the recipient process or to call methods in the recipient process in order to do the work that the message intends. (See Actor Framework for an example of this).
The problem arises when you wish to send these messages across a network between two separate applications. In most cases, these applications are not duplicates of each other, but rather serve completely separate purposes. An example would be a client and a server. The client needs to message requests to the server and the server needs to push data to the client. For a process to send a message, it needs to package the inputs in the private data of the message class and then transmit it via the network transport (which can be implemented in multiple different ways and is not material to this discussion). In order to construct the message, the sender will need a copy of the message class included in their application. This will mean they will need to also load the class of the message recipient since it is statically linked to the message class within the method that executes the message. And since that will trigger many other class dependencies to load, the end results is the majority of the classes in the recipient application will need to be included in the sending application. This is not an optimal solution.
So, we need to find a way to decouple messages from their recipients but still be able to execute them.
The way I have been handling this is for each message that needs to cross the network I create a message class whose execute method calls an abstract method in a separate class (call this my network message execution class). Both the sender and the recipient will have a copy of these message classes and the network message execution class. Inside the message classâ€™s execution method, I access a variable that stores an instance of the network message execution class and then calls the specific abstract method in the network message execution class for this particular message.
In each recipient application, I create a child of the network message execution class and override the abstract methods for the messages I intend to receive, placing the actual execution code (and static links to the recipient process) within the child class methods.
Finally, when each application initializes, I store its child network message execution class in the aforementioned variable so it can be used to dynamically dispatch to the actual method for message execution.
The advantages of this are:
Messages are decoupled between my applications.
The disadvantages are:
For each message I wish to transmit, I must create a new message class, a method in the network message execution class and a method override with the real implementation in the recipientâ€™s network message execution class child and then edit the message class to call the method in the network message execution class.
This also means that each application must have a copy of all the message classes passed between applications and the network message execution class.
The problem arises when you add a 3rd or fourth application or even a plugin library to the mix and wish to decouple those from the other applications. You must either extend the current set of messages and the abstract methods in the network message execution class, having each entity maintain a copy of all of the messages and the network message execution class even though they never send or receive most of those messages, or you must add additional variables to your application to store different implementations of the network message execution class for each link between entities.
So, now that you have read my long explanation, does anyone have ideas for a better way to solve this? I would love to simplify my code and make it easier to maintain, while retaining the functionality that class based message architectures offer. But decoupling must be addressed somehow.