Jump to content
OMRON Forums

Plot function elapsed time error


scott.eichhornetrema.com
 Share

Recommended Posts

I've been gathering and plotting data using the Quick Plot function. No matter what setting I use for sample period (between 1-10 [0.4-4.4 msec]), the time plotted on the X-axis is 2x the real elapsed time. I will set the system to gather 40 seconds of data, then monitor the time elapsed from hitting the "gather data" until the "upload data" button is available. The actual elapsed time is 20 seconds, but when I plot it 40 seconds of "data" is displayed. I'm commanding a 100 Hz tone, but it appears to be 50 Hz on the plot display. Any idea if this is a system clock issue or any advice on where to look for a problem? I'm running the July 15th 2010 IDE. Thanks, Scott
Link to comment
Share on other sites

  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

It sounds to me that you have not configured PPmac clocks correctly. Maybe you forgot to change Sys.ServoPeriod or Sys.PhaseOverServoPeriod when you changed the servo update period of the PPmac. In this case you will probably also see the the % value of the CS is not set to 100% and when you set it to 100% you move times and speeds will also be incorrect by the same factor.
Link to comment
Share on other sites

I can't find documentation on Sys.PhaseOverServoPeriod. How do you determine its proper value? Thanks, Scott[hr] Here are my current settings, if they are of any help: Sys.ServoPeriod = 16854 * 3 / 117694.8 Gate1[4].PhaseServoDir = 0 // Set Acc24E2 internal clock as master Gate1[4].PwmPeriod = 4212 // Set PWM freq to 7 kHz Gate1[4].PhaseClockDiv = 0 // Set phase clock freq to 7 kHz Gate1[4].ServoClockDiv = 2 // Set servo clock freq to 2.33 kHz Gate1[4].HardwareClockCtrl = 2258 // Set Encoder sample clock to 4.9 Hz, others at default Gate1[4].PwmDeadTime = 0 // Dead time to zero per Copley/Delta Tau app note Thanks, Scott [/quote]
Link to comment
Share on other sites

Thanks for the data, now I see the problem. When you have PwmPeriod = 4212 or 7kHz then the phase frequency is 14kHz. With the ServoClockDiv = 2 that gives the servo period as 14/3 = 4.666kHz. Sys.ServoPeriod should contain the actual period in msec which is 1/4.666 or 0.214 msec. Your calculated value is double this and this is why you have the problem you reported. Too bad your calculated value is exactly as our manual says it should be so I will need to get that changed in the manual. In the meantime use the equation Sys.ServoPeriod = ((2*PwmPeriod + 3)(PhaseClockDiv + 1)(ServoClockDiv + 1))/117964.8 Sys.PhaseOverServoPeriod is calculated as its name implies, just divide the phase period in usec by the servo period in usec or divide servo freq by phase freq or use 1/(ServoClockDiv + 1)
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share


×
×
  • Create New...