How fast can I trigger externally?
-
Hi gents,
on a Duet2 or Duet Maestro, what's the highest trigger frequency for external triggers?
Can I read encoder A+B channels at eg. 10k Hz each? The macro behind the trigger is short and it will only run, when the print queue is empty.
THX
Olaf -
@o_lampe said in How fast can I trigger externally?:
Hi gents,
on a Duet2 or Duet Maestro, what's the highest trigger frequency for external triggers?
Can I read encoder A+B channels at eg. 10k Hz each? The macro behind the trigger is short and it will only run, when the print queue is empty.
THX
OlafNo, triggers won't work that fast. They are checked in the main polling loop, and then they may need to queue for access to the SD card.
-
@dc42
Thanks David, what's the fastest output from a filament sensor? I guess they use the same channeling? -
@o_lampe said in How fast can I trigger externally?:
@dc42
Thanks David, what's the fastest output from a filament sensor? I guess they use the same channeling?Filament sensors use separate driver code to receive and decode the inputs from the filament sensor. Then the decoded info is checked in the same polling loop.
-
@dc42
As I understood, it's not a hardware- but priority issue?
If I'd declare a pin as filament sensor input (without having one) could I also spy on this pin with M581/M582?
I'm just looking for a workaround to speed up trigger frequency. -
@cjm said in VFD control options:
@o_lampe The normal approach to measure the frequency of a repetitive pulse like the VFD tacho with a micro-processor would be to connect it as the clock input to a counter/timer configured to count pulses within a given time window (e.g. 0.1 second). At the end of each time window the timer generates an interrupt and the micro reads the count which is directly proportional to the tacho pulse frequency. In this way, the processor only needs to read the timer count infrequently, without being limited by the micro's code execution.
Based on that info, I started reading more about hardware timers/counters and stumbled across a lengthy thread (from 2013 - now) about Hardware Quadrature encoders in the Arduino Due.
It seems to be a nice 'sidekick' for the Duet boards to take away some workload, when it comes to dc-motors with encoders.
I'll digg deeper into this to find out, if I can drive 16-24 dc motors in a 'daisy chain' fashion with it. ( all motors follow the same step/dir pulses, only one encoder 'rules them all')
That would be another piece of the feltpen texture mapping puzzle... -
It kinda works,
I can send a value over serial to the Due and the motor moves back and forth according to the received data. Motor direction depends on the new value being greater or smaller than the actual encoder-register.
Next step is to use the step-pulses from Duets external stepper port to make it run in sync (speed control) and use the dir pin as well.