From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Signal Conditioning

cancel
Showing results for 
Search instead for 
Did you mean: 

record time of zero crossing

Solved!
Go to solution

I am trying to record the time for zero crossing in order to get the phase angle and inevitably get the power facto . soi was trying out a few ideas to  see if this is achievable and i came up with this . can someone tell me where i am wrong . or what to do  get the right values .. 

Download All
0 Kudos
Message 1 of 7
(5,373 Views)

1. You need to pass the waveform into the Get Waveform Time Array.

2. No need to wire up the N on the FOR loop since you are using Autoindexing tunnels.

3. The Conditional Indexing tunnel is your friend here.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 7
(5,370 Views)

Thank you soo much for replying me .  but i have tried this and still unable to get it .. I want to get the time for  each instant the waveform crosses the zero point 

0 Kudos
Message 3 of 7
(5,361 Views)

Can't troubleshoot without your code.  But it looks like you did not pass the waveform into the Get Time Array function.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 4 of 7
(5,358 Views)
0 Kudos
Message 5 of 7
(5,353 Views)
Solution
Accepted by topic author Nigel91

You missed the Conditional part on that autoindexing tunnel.  Right-click on the output indexing tunnel of the timestamps.  Now select Tunnel Mode->Conditional.  You now just wire up the output of the Zero Crossing to that conditional part of the tunnel.

 

I also recommend getting rid of the wait inside of that loop.  Just let it go as fast as it can.  It won't take long to run through this array, so I would not worry about it using up your CPU.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 6 of 7
(5,350 Views)

Thank you soo much . i have officially learnt something new about the conditional tunnel mode . first time i have heard of it . Amazed right now ..:manvery-happy:

0 Kudos
Message 7 of 7
(5,340 Views)