04-19-2006 08:02 AM
04-19-2006 01:22 PM - edited 04-19-2006 01:22 PM
I took a look at your VI but I quickly got lost in some of the states. The Results state is especially bad with wires going in all different directions. Wires (and functions) should flow from left to right, top to bottom. The style guide that ships with LabVIEW has examples. I'm not a fan of icon view on the diagram but you should pick one style or another. You also do some weird things with build array and index array in several locations. I've attached a picture that shows what I mean by weird. What you've done is just an unneccessary complication. All of the spearate indicators for your harmonic voltages could be done with a cluster array and that would make that part of the code much simpler to read and understand. You can also greatly simplify things by setting your DAQmx Read to return a waveform data type instead of a 1D DBL. If you used the waveform type in the first place, you wouldn't need all of those conversions to get a time stamp and passing sample rate to all of the correct locations. I suspect that all of your parameters would be correct if you were consistent with the waveform data type as that automatically includes timing information. Somewhere along the way you've lost that with the back and forth conversions but I would have to spend an awful lot of timing cleaning up your code before I could say exactly where that happened.
Message Edited by Dennis Knutson on 04-19-2006 12:23 PM
04-20-2006 08:58 AM
04-20-2006 09:41 AM
04-20-2006 11:31 AM