09-09-2008 02:11 PM
I am building a motor controller system for a brushless DC motor [EC-16] that has a Hall sensor and an encoder of 256 counts per cycle, using some VIs provided by Maxon Motor. Part of what I need to do involves dumping position measurements of the motor shaft into an array and writing them to a file. The company provides a VI that grabs the position measurement by calling a DLL which is also provided by Maxon. The communication to the motor is handled through a serial port. My current approach is to use a while loop to repeatedly call the DLL for the measurements. The motor has a gear reduction ratio of 4.4, which means I should theoretically be able to get at least 1000 measurements per cycle. Unfortunately, I am only able to get about 3 or 4 position measurements per cycle at ~1000 rpm, and I need more on the order of 360 measurements per cycle. Is there a way of programming this in LabVIEW which will provide a faster sampling rate?
I have attached some pertinent VIs to this message. The main VI in question is "Example3.vi", which is inside of "EPOSLibrary.llb." The library also contains "Tree.vi", which has all of the available VIs from Maxon in it. I have also provided the subVI "qctodeg.vi", which is used in Example3. Thanks!
09-11-2008 05:28 PM
Hi Jcsaxon
The only way it appears that you would be able to improve performance is in optimizing the speed at which you read your serial data. The first thing to take a look at is the time span that is taking place in gathering these data points. Have you tried placing time stamps before and after the DLL calls to see how long this process takes? It sounds as though the Maxon Motor DLL's accomplish this task, perhaps you could contact them on finding another means to improve this.
Thank You
Eric Reid
Applications Engineer