Motion Control and Motor Drives

cancel
Showing results for 
Search instead for 
Did you mean: 

flex_read_pos() is faster in 5.1.1 than in 7.0. Why?

My application was working fine with Motion Control 5.1.1. It gave me high sampling rate when using flex_read_pos_rtn() and flex_read_adc_rtn() (about 88Hz). But it only got about 19Hz after I upgraded it to 7.0. I wrote a small piece of code like below to verify (the other situations are the same: Win2000, CVI 7.1, etc.)
 
******************************************************************************
count=0;
do{
 
  count++;
  for (i=0; i<4; i++)
  {
   status = flex_read_pos_rtn(BOARD_ID, NIMC_AXIS1+i, position+i);
   status = flex_read_adc16_rtn(BOARD_ID, NIMC_ADC1+i, adcReading2+i);
  }
 
}while ( count<1000);
(I took out the code to measure the time and calculate the sampling rate.)
 
I found in several previous posts talking about the slow response time from flex_read_pos_rtn() (http://forums.ni.com/ni/board/message?board.id=240&message.id=1318&requireLogin=False, http://forums.ni.com/ni/board/message?board.id=180&message.id=5252&requireLogin=False), but seems the people to answer them tended to accept the fact that this function call was slow and there was no way to improve, and didn't realize that it might be possible that 7.0 Motion Control is the culprit.
 
Pls somebody help out. Thank you very much!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
0 Kudos
Message 1 of 5
(3,882 Views)

Jason,

Thanks for your post.  This is indeed strange behaviour that we have not seen.  Our older drivers (expecially value motion) are very inefficient and our development team has spent a considerable about of time to speed up and optimize the processing speeds of our newest Motion driver (7.2.1).  We definatly want to make sure you see increased performance!!

Could you tell us a little more about your system setup - which motion card you are using, types of motor control application, number of axises, PID tuning (if applicable), etc?  The more information the better!!  Also, can you give us a more detailed view of your development PC and what benchmarks or spec you are using to get the rates you mentioned above?

Thanks,

Scott Savage
National Instruments
Applications Engineering
www.ni.com/support

0 Kudos
Message 2 of 5
(3,865 Views)

Thanks for the reply. Here are the information you need:

  • motion card: PCI-7344 (amplifier: MID-7654)
  • 4 axes
  • "types of motor control application": don't know what exactly you mean. But my system can be described as simple as a one which has four axes, each of which has a Maxon DC motor (with encoder) driven my the motion card. Range of Motion is 360 deg for each.
  • PID parameters: I have 10 systems working in the factory right now. Of course they have different parameters. One example is: Kp=10, Kd=20, Ki=0
  • PC: Windows 2000, CVI 7.1
  • "what benchmarks or spec you are using to get the rates you mentioned above?": I used the sample code in my first post to keep sampling the 4 axes while moving them from 0 to 90 degrees. When they reached destinations, I stopped sampling, got the total time and number of samples, and calculate the sample rate (the calculation part has been removed from the sample code to make it simple).

Pls let me know what else you need. Pls also give it a try on both Motion Control 5.1.1 and 7.1 (or 6.0). You can tell the difference. I'm eagerly waiting for the response.

Thanks.

Jason

0 Kudos
Message 3 of 5
(3,861 Views)

Jason,

I have informed our lead developer in R&D and we are eager to look into the issue.  We will attempt to recreate this behavior you have seen.  I am heading out of town next week, but another engineer on my team is looking into this issue now.

We will be in touch :).

Thanks,

Scott Savage
National Instruments
Applications Engineering
www.ni.com/support

0 Kudos
Message 4 of 5
(3,849 Views)

Thanks. Please keep me posted.

Have a nice trip!

Jason

0 Kudos
Message 5 of 5
(3,845 Views)