01-17-2007 07:38 AM
01-18-2007 01:50 AM
You can create subvis and call them from the main vi.
You have a very good example in Find Examples in LV 7.1 called Dialog Box demo.vi.
Hope this help.
01-18-2007 06:44 AM
01-18-2007 07:54 AM
Thanks to both.
vicen
01-19-2007 03:15 AM
Really, it was a good example.
Another question:
I have a vi that checks a machine. This machine have 3 (or 10, or 100, it's an example) tanks. I don't know how many tanks are ON. The user control the vi and when he push a button this vi receives one message for each tank ON. If there are 2 tanks ON, the vi will receive 2 messages.
Now, I want create X dialogs box, one of them for each message received. In this example I would see 2 dialogs boxs. I have created a subvi that show this message (as the example Dialog Box Demo.vi). There are some method to show this 2 messages box with one subvi? (An easy solution would be to use a copy of the subvi and to send each message to each subvi, but if I receive 20 messages? I cannot create 20 copies!)
Thanks
Vicen
WinXP / LV7.1
01-22-2007 03:20 AM
If you need to generate a different message depending on the tank, you could use a case structure in which the case selector is an array of booleans, and each element of this array corresponds to a tank in your example. Inside each case execute the subvi you created for showing the corresponding message.
Regards.
01-22-2007 10:32 AM
Hi, AitzbertH
I've tried to use a case structure but I cannot to create two front panels of two differents messages at the same time. When I read the first message it opens a front panel (of this message). The second message appears when I push the button "close" (and close the FP).
01-22-2007 10:39 AM
This vi is not the real VI, it's only a summary and it doesn't work.
Vicen