LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

combine VIs

Hi!
 
I have a question about combining VIs.
 
My problem is I have a SubVi with a LED Matrix of 100 multi-color LEDs.
I also have a SubVi only for the input (because its a matrix of 20 buttons and a logic circuit).
So if I want to run the program i have to open the front panel of the LED Matrix SubVI and of the front panel of the Input SubVI (and the one of the main program).
Is it possible to combine these to only one front panel?
 
thx in advance
Sapp99
 

Message Edited by Sapp99 on 11-29-2005 01:53 AM

0 Kudos
Message 1 of 11
(3,910 Views)

Hi

Could you explain a little bit more or maybe attach code or pictures?
For what is the input you mentioned used? How do these two sub vi's interact? Why do you have to open three vis?

Using LV8.0
--------------------------------------------------------------------
Don't be afraid to rate a good answer... 😉
--------------------------------------------------------------------
0 Kudos
Message 2 of 11
(3,895 Views)
I've made an example for you, the names of the files are german, here's the translation:
LED_Farbe = LED colors
Eingabe = Input
Ausgabe = Output (My LED Matrix)
 
This are the SubVIs, the main VI is attached in my next post.
 
I also use LabView 7.0
 
 
You have to open the front panel of "Eingabe" and "Ausgabe". Then you have to press a button to choose the column and one to choose the row.
You have to press the Enter-Button to confirm your decision.
Then this LED will be lit.
(Its important that you choose the column at first and THEN you choose the row, otherwise the program will crash ^^)
 
So is it possible to combine the front panel of the LED Matrix and the Input?
thx

Message Edited by Sapp99 on 11-29-2005 03:27 AM

Download All
0 Kudos
Message 3 of 11
(3,889 Views)
here is the main VI of the example
0 Kudos
Message 4 of 11
(3,887 Views)

Deutsch - kein Problem.

Irgendwie kann ich dem Sinn hinter diesem Konstrukt nicht ganz folgen. Warum verwendest du nicht einfach ein 2D-Array für die Eingabe, die du dann weiterverwenden kannst?

Using LV8.0
--------------------------------------------------------------------
Don't be afraid to rate a good answer... 😉
--------------------------------------------------------------------
0 Kudos
Message 5 of 11
(3,880 Views)
Seas.
Naja, die Eingabe ist ein 2D Array..
Eingabe[x][y]
 
x ist zur Unterscheidung zwischen Zeile und Spalte
y sind die Tasten von 0 bis 9 und die sind entweder 0 oder 1, kommt drauf an ob man auf die Taste gedrückt hat oder nicht
 
zB Wenn ich die 5te Taste drück in der Spaltenauswahl und die 3te in der Zeilenauswahl steht dann im Array:
 
Eingabe[0][4]=1
Eingabe[1][2]=1
 
alle andern sind 0.
 
So funzt das, und mit dem kleinen Programm sucht er mir heraus wo in der Spalte bzw Zeile eine 1 steht und gibt dann die entsprechenden Koordinaten aus.
 
Aber du darfst nicht vergessen, das ist nur ein kleines Beispielprogramm, in echt wirds nämlich Schifferl versenken 😜
Das Programm funktioniert auch scho aber ich würd gern alles auf einem Front Panel haben.
PS: Schöne Grüße aus Wien
0 Kudos
Message 6 of 11
(3,877 Views)

Cool - sowas ist immer gut, um 'ne Programmiersprache zu lernen.

Ich würde das ganze so gestalten, wie auf dem angehängten Bild. Ein 2D-Array für Spieler 1 (dich)  und eines für den Gegner. Ist intuitiver und vor allem kennen es alle so.

 

Using LV8.0
--------------------------------------------------------------------
Don't be afraid to rate a good answer... 😉
--------------------------------------------------------------------
0 Kudos
Message 7 of 11
(3,871 Views)
Stimmt scho, so kann mans machen, aber so kann man ja glaub ich "nur" boolsche Array ausgeben, oder?
Aber ich bräuchten mehrfarbige LEDs da ich nur ein 10x10 Feld machen will, somit brauch ich ne Farbe für getroffen, daneben, hab auch gleich eine gmacht fürs Wasser und so.
 
Aber geht das irgendwie dass man dem Labview sagt dass es alle SubVIs zu einem Riesenprogramm zusammenfassen soll? Oder dass man eben das Ausgabe Front Panel und das Eingabe Front Panel zusammen auf einem ist ohne die SubVIs aufzulösen?
 
So wie im beiliegenden Bild nur dass du dir vorstelln musst dass die LEDs genau unter den Tastern sind (also Reihe für Reihe und Spalte für Spalte ganz schön).
 
PS: Ich kann erst wieder am Nachmittag anworten.
0 Kudos
Message 8 of 11
(3,866 Views)

Habe ein vi angehängt, das zeigt, wie du das ganze darstellen und färben kannst. Wähle einfach im Farb-Feld eine andere Farbe und wähle eine LED aus.

Using LV8.0
--------------------------------------------------------------------
Don't be afraid to rate a good answer... 😉
--------------------------------------------------------------------
0 Kudos
Message 9 of 11
(3,863 Views)

hmm..mit dem ist es ja viel einfacher und schöner ^^

Hätt ich das gewusst...

 

Gibt es eine Möglichkeit in einem 1D Array aus Cluster-Elementen diese Elemente zu ändern?

Mit der "Bündel" Funktion sagt er mir immer das ich kein 1D Array aus Cluster-Elementen ändern kann.

 

Wenn wir schon dabei sind, kennst du dich mit TCP Netzwerkprogrammierung im LabView aus?

0 Kudos
Message 10 of 11
(3,834 Views)