clock frequency seamless update | LabJack
 

clock frequency seamless update

8 posts / 0 new
Last post
tsnyder
tsnyder's picture
clock frequency seamless update
I am trying to generate a pulse output which gradually ramps from a slow pulse rate to a faster pulse rate. It is to create an acceleration ramp for a stepper motor. An older post addressed just what I am trying to do. I too am using Labview. http://forums.labjack.com/index.php?showtopic=6388&page=1 Was a seamless clock frequency update implemented? If so, any information you might have would be appreciated. One concern I have is that my Labview refresh rate is not fast enough to dynamically modify the clock frequency. Is there any way to load a table of sequential step periods into the Labjack prior to the pulse output? Thanks, TJ
LabJack Support
labjack support's picture
The U3 does not have the

The U3 does not have the ability to change freuqency without stoping the pulse output for a few miliseconds.

The T7 does have an undocumented feature which will allow it to change frequency smoothly as long as the ducty cycle is not close to an extreme. By "undocumented" I mean that it is implemented in firmware, but untested. If you want that feature then we will make testing and documenting it a top priority.

tsnyder
tsnyder's picture
Thanks for the quick response

Thanks for the quick response.  I have quite a few U3 devices, but no T7s.  If I end up purchasing a T7, and need the functionality, I'll let you know.  Thanks for the offer to test and document!

-TJ

LabJack Support
labjack support's picture
I did come up with an idea.

I did come up with an idea. The U3s frequency output mode will allow you to change frequency without the big delay I mentioned earler. Any glitches should be less than one period. However, frequency outputs's steps may be too coase.

cellsoft
cellsoft's picture
I am interested in the

I am interested in the possibility of changing frequency without the big time delay. You say frequency steps are coarse - what increments are possible? Can you please give more details. Thanks. Regards, Tony

LabJack Support
labjack support's picture
"what increments are possible

"what increments are possible? Can you please give more details."

The increment possibilities are controlled by the BaseClock settings. The U3's timing features all use the same base clock, but each feature uses that clock in different ways. BaseClock settings can be found here: https://labjack.com/support/datasheets/u3/hardware-description/timers-co...

The Frequency-Output mode will output according to the formula here: https://labjack.com/support/datasheets/u3/hardware-description/timers-co...

For instance, if the base clock is set to 48 MHz then the frequency produced by the frequency output mode will be:

f = 48 MHz / (2*x), where x is 0-255. Our range of frequencies is than 24 MHz, to 187.5 kHz.

The step size will change throughout the range. from 1-2 step size is 12 MHz. from 255-256 the step size is 735.3 Hz.

jsimeroth
jsimeroth's picture
Support,

Support,

I am also interested in seamlessly transitioning between frequency outputs in Timer Mode 7. I am using a U3-HV and LabVIEW 2015 for Windows 7. It sounds like you are/were suggesting to reconfigure the frequency output settings for every iteration of a while loop containing the eTC_Config block. Is that right? If so, the program in pseudocode, would look like:

i=0

TimerClockBase=1MHz

TimerDivisor=255

   For i<254

   Timer#Value=255-i

   eTC_Config(TimerClockBase, Timer#Value, TimerDivisor)

   i=i++

Again, I realize it's not exact, it is only pseudocode and I am working in labview, not a text language. But is that method what you are suggesting? Or will it still stop the pulse output momentarily?

LabJack Support
labjack support's picture
UD series devices will always

UD series devices will always have some glitch when changing the timer clock.