Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 05/22/2013 in all areas

  1. Your code makes me sad. I've seen worst code before but your code should be cleaned up and documented before your project is complete. First issue you will run into is the fact that your DAQ card is probably not a simultaneous sampling card. So when you tell the card to read 1000 samples on two channels, it will read 1000 samples on one channel, then 1000 samples on the next channel. So your samples will not be taken at the same time, and your phase will not be correct because by the time you are done taking 1000 samples on the first channel, the second waveform will have changed. If you are taking measurements at the same time then this isn't an issue but many DAQ cards don't support this. Have you tried graphing the two signals you read? This may help in seeing why the phase calculation is not what you expect. Attached is a VI that calculates the phase difference between two signals using the same technique you have and it gives the correct results even with noise. Signal Phase.vi
    1 point
  2. I know the original issue has been solved but an alternative to polling for changes is using the System.IO.FileSystemWatcher class. http://forums.ni.com/t5/LabVIEW/execute-vi-when-a-certain-file-is-in-a-certain-directory/m-p/397763?view=by_date_ascending#M198073 This VI can be modified to have file changes on a single file.
    1 point
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.