06-17-2019 09:55 PM
Hello, please I want to realize a consumer producer structure with loop event. Because I have a main VI which in function when a button is pressed launches a sub vi as described below:
- Action B1 Launch VI1 with its front panel after treatment,
- Judgment VI1
-Action BP2 run VI2 with this front face
The structure according to my research will have to be conceived with a queue design.
The BP1 will have to launch the sub vi image processing and the BP2 the sub vi Control command, the sub vi command and supervision 1,2,3 are pus VIs of the VI command and supervision. The main VI is Synthesizer
Thank you
06-18-2019 06:29 AM
@Ernest97 wrote:
The structure according to my research will have to be conceived with a queue design.
Not at all. Many ways to do that.
For instance, in the event structure, start the task dynamically. Give it a user event as input when you start it. Register the event for the user event, and it will get the event when the task is completed. The user event can also be a value signaling executed on a control reference.
06-18-2019 02:24 PM
please on example i will use it to do my one task..!!
thank you
06-18-2019 03:53 PM
@Ernest97 wrote:
please on example i will use it to do my one task..!!
Open LabVIEW. Click "Create Project". It will allow you to create several Producer/Consumer Projects that include quite a bit of documentation.
Open LabVIEW. Click (under the File Menu) "Niw ..." (be sure to click the one with trailing dots). In the Drop Down, choose "From Template, Frameworks, Design Patterns" where there are several Producer/Consumer examples.
Study the examples. Play with them. Modify them to suit your situation.
Bob Schor
06-19-2019 03:35 AM
@Ernest97 wrote:
please on example i will use it to do my one task..!!
thank you
IMHO, If you don't get any of the concepts, you'll need to learn them.
I'm not going to make an example, not because I'm lazy (which I am ) or lack the time (I do), but because it wouldn't help you in the long run.
Starting a VI dynamically isn't that hard. Neither is using user events. Nor value change events on a control reference. Peace it together in an event structure, and you're halfway there.
I simply won't be doing you a favor by assuming your requirements, and cook up something that 'sort of' does what you want. I'll be handing you a tool that you won't be able to handle (jet).
06-20-2019 01:37 AM
Thank you for your sincere response, I understand your concern but I tried several approaches but they do not provide any solution. Well then I would like some clarification on the approach to follow with the event structure.
Thank you
06-20-2019 03:03 AM
@Ernest97 wrote:
Thank you for your sincere response, I understand your concern but I tried several approaches but they do not provide any solution. Well then I would like some clarification on the approach to follow with the event structure.
Thank you
Every approach should have an event structure.
In a traditional Producer\Consumer, simply put an event structure in the Producer. Depending on the event, make the Producer produce something for the Consumer to consume.
If you want to look into my suggestion (which isn't the best per se, I don't know all the variables), you'd end up with an event structure in a loop. Depending on the event, start a dynamic VI. That will look something like this:
If you're starting this\trying this out and get stuck, we will review your code if you post it.
06-20-2019 09:52 AM
I try to modify my VI according to your instructions but I do not know how to connect the vi to open with the node. In addition I find a project that tries to illustrate a bit the features that I seek to represent in the project file contains a file W8.lvlib I do not know what it refers.
Moreover, according to my observation, this file contains the different cancellations, and each of them has the extension .ctl.
I send it to you he is called IHM with my project MEMOIRE.
Thank you
06-20-2019 10:25 AM
my project vi MEMOIRE
06-20-2019 05:00 PM
@Ernest
It looks like this is what you're looking for/missing: https://zone.ni.com/reference/en-XX/help/371361P-01/lvhowto/acbr_call_and_collect/
Your current Action 1 needs a VI reference, that one should be opened through an Open VI reference. You seem to be close, just that last wall to climb over.
/Y