LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

FPGA - Éxécution sousVI dans le VI main

Bonjour,

 

j'ai un soucis lors de l'éxécution de mon MAIN dans mon FPGA, mes sous VI actuels ne s'éxécutent pas. Pourtant lors de la simulation, tout se déroule normalement, les sous VI sont bien éxécutés! J'utilise la face avant de mon Main qui se situe sous l'arboréscence du FPGA.

 

-------------------------------------------------

 

matériel : NI cRIO 9075

 

VI Main (pièce jointe)

 

Synchro_IN : sous VI écrivant des entrées TOR physiques dans des variables globales

 

SCORE_P : sous VI permettant de lire les variables globales et via un sous VI commun à chaque variable, en détecte les front montant

 

GEST_SCORE : sous VI permettant d'incrémenter la variable globale "Score" en fonction des fronts montants

 

---------------------------------------------------

 

L'éxécution de la séquence se déroule correctement (le changement du numérique "étape" le prouve, en faite tout le "MAIN" fonctionne), mais les sous VI ne sont pas éxécutés.

 

Qu'ai-je oublié? Une spécification? Un paramètre? Ce que je veux faire est impossible?

 

Merci

 

0 Kudos
Message 1 of 4
(2,912 Views)

Can you attach your project (all of the VIs) as code? Without seeing what is happening inside the subVIs, it is difficult to tell you what is wrong. That said, it would be better to use wires to pass data between the subVIs, instead of global variables.

0 Kudos
Message 2 of 4
(2,886 Views)

Thank you Nathand,

 

as it's a mini part of my program, I think it will be better I use Global Variables. It's little stange because when simulating with the Dev computer with simulated IO (Random I/O Data), there is no problem. Then with the same Main VI ,executed before in simulation Mod, i have same trouble in FPGA Target Mod, as descripted above.

Download All
0 Kudos
Message 3 of 4
(2,875 Views)

How do you know that the subVIs are not working?

 

You have at least one race condition in your code: in the last frame of the sequence, you read the Score global variable, but you also say that the subVI in that frame can update the Score variable. Which one happens first, reading the variable or updating it in the subVI? You don't know, and it might not be the same in simulation as it is on the FPGA.

 

Again, if you attach your VIs (the code, not images) it will be much easier to help you.

0 Kudos
Message 4 of 4
(2,863 Views)