08-29-2006 06:57 AM
08-29-2006 07:08 AM
08-29-2006 07:46 AM
You may be right about the DAQ issues. While collecting info to reply to you, I discovered that the DAQ reading of the servo current doesn't correspond in a timely manner to the reading seen on a multimeter in series with the servo. Since the commanded servo current matches that of the actual servo current, I am able to "get around the problem" for now by using the commanded servo current (not that read by the DAQ) as the X axis input to the graph. I'll have to address this some time later, as I'm coming up on a deadline and must focus on getting the rest of the application developed. Thanks for the info.
09-01-2006 09:47 AM
I thought I'd share with anyone interested enough to read this thread, the solution to the problem I was having as described above.
The experienced users of LabView (most of the regulars here on the forum) will find this to be a rather obvious "gotcha", however I am a relatively inexperienced LV user and this is intended to point out to users like myself to look out for these things.
The DAQ hardware involved here is an IO Tech DaqTemp PCI board and module. I believe the reason the servo current readings were lagging behind the commanded values was because the DaqTemp vi's supplied by IO Tech were sampling at a higher rate than the rest of the vi that I wrote to run this test. As the data was collected, the IO Tech vi buffered the data and sent one data point at a time to my vi as the main "while" loop executed. So, as data was buffered by the IO Tech vi, the data points sent to my vi were increasingly "old" as compared to the data I was collecting or creating in my vi. After watching the program run for a minute or so, it became clear that something was seriously out-of-sync.
My solution to this problem was to change the speed/timing/sample rate settings within the IO Tech vi such that its data rate was less that the speed at which my vi was looping, therefore my vi would be waiting (hopefully for only a brief period) for fresh data from the IO Tech vi instead of data that had been buffered some time earlier. All appears to be working fine now, however I will look into directly synchronizing the two vi's for future reference.
09-01-2006 10:00 AM
Hi Ed,
Thank you for sharing this very valuable information. Yes, you are correct in your description.
Another solution to this is to use the Producer / Consumer loops, with software (LV) buffers. This way, you can read the values from the DIO board and minimize data loss due to mismatch in acquisition and processing (analysis) speeds.
There may be some example of these available in the example finder. I can also post an example if needed.
RayR