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.
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.
05-11-2018 11:13 AM
I have the following VI that is used as a subvi to calculate the phase difference between each pulse of two square waves. It works great the majority of the time, but on occasion it will end up throwing out a phase that is in the millions. I'm not seeing anything really jump out at me, and wondering if anyone may see what is causing that issue.
05-11-2018 11:20 AM - edited 05-11-2018 11:25 AM
Hi guy,
on occasion it will end up throwing out a phase that is in the millions. I'm not seeing anything really jump out at me
When you got very large values for Phase then most probably the Divide, followed by ×360, is the reason for this…
(See those other subtle changes to your VI. There could be even more changes…)
Can you debug your VI and put a conditional probe inside to stop the VI for exactly this problem? Then set all values to default, save the VI and attach it again!
05-11-2018 11:53 AM
For the conditional probe and setting values to default. What is the best way to do that in a subvi? I was hoping to just run the main vi and then open the subvi and set the values, but all the values were still zero.
05-11-2018 12:57 PM
I manged to get the values to save. Here is a normal example of when it happens. Max phase is 86, and min phase is -1.7E9.
05-11-2018 01:41 PM - edited 05-11-2018 01:43 PM
Hi guy,
it's the way you calculate the phase:
Graph1 shows the intermediate results of the counting loops, graph2 the resulting phase: you divide a large number by a small number resulting in a large number…
As there is some noise on your data: would it help to set this "High limit" to values around 6, somewhere in the middle between HIGH and LOW level?
05-11-2018 02:46 PM
In the main vi I have a case structure that will read the voltage from the config file, and set the limits to the middle of the voltage being used. What I ended up doing to capture that data was just add the capture to the vi and ran it alone, so I was playing around the value to see if it mattered. Do you have any recommendations on the correct way to calculate the phase values?
What I wanted it to do was subtract the time difference between the two channels, and then divide that by the period to get the phase percent. As I'm looking at this, it seems like I need to find a better way to find the time difference between the signals.