I am working on a VI in which a host computer is communicating with a PXIe system. I am using two parallel while loops, one for control and display functions and the other devoted to communications with the PXIe system. When the host Comms loop gets data from the PXIe system, it uses a queue to transfer the data from the Comms loop to the Control loop.
A LabVIEW CLA suggested that I use "Create User Event" and "Generate User Event" to trigger the data transfer from the Comms loop to the Contrl loop, but I am having a hard time wrapping my head around the mechanics of getting that done. I haven't found any good examples of how to code that. I will keep searching, but if anyone can help me out in the meantime, I would appreciate it greatly.
I wish I could post some code, but my company prohibits it.
Solved! Go to Solution.
Bummer that you can't share the exact code you are working on.
I've attached a simple example of how I often use user events. From a high level it is your own interrupt. Loop one says "Generate User Event" and the other loop that is registered and waiting to handle that event handles it when it happens. The nice thing about this architecture is that the consumer loop can essentially sleep while it waits for things to do.
Attached is my example. Let me know if it doesn't make sense and perhaps we can modify it to become an analog for what you are actually doing and go from there.