LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Converting to dynamic data

Hey friends, 

I got stucked with one issue of my NI 9242 module. I am building the testbed for synchronous generator and I need to connect it to the grid. For that I need to now the phase difference between grid and generator. At the moment I don't have all the components, so I am simulating signals. To perform this task I would like to use an "Extract Single Tone Information.vi", but the thing is it excepts only dynamic data. I was trying to convert the data I acquire with NI 9242 to an array using While Loop (and before a For Loop), but somehow my array is filled with the same number. The FPGA works with time delay of 1ms between events. 

I don't understand why it happens, so every reply would be helpful. 

 

 

0 Kudos
Message 1 of 4
(3,541 Views)

I see abuse of local variables.

You write indiviudal values to the terminals of Grid Side and Generator Side.

 

In parallel, with no control over whether the writing or reading happens first, you read Grid side 1000 times in a For Loop.  That Loop is going to happen very fast and will contain 1000 of the same value.  Also, you read Generator Side and build that value into an array at 5 times per second, but that while loop runs forever because you have a False boolean wired to the stop terminal.

 

Your outer while loop will never iterate again and will never read new values for Grid or Generator.

 

Turn on highlight execution and watch your code run.

 

Then start lookng at the online LabVIEW tutorials
LabVIEW Introduction Course - Three Hours
LabVIEW Introduction Course - Six Hours

0 Kudos
Message 2 of 4
(3,517 Views)

No abuse of variables! And thanx for reply, you pointed out very important  things for, now everything works as I wanted.

0 Kudos
Message 3 of 4
(3,496 Views)

I'm glad you got it working.

 

I assume getting rid of the local variables helped, because they were being abused in the original files.

0 Kudos
Message 4 of 4
(3,489 Views)