Changeset 951 for softGlue_examples
- Timestamp:
- Jun 20, 2012 12:50:50 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
softGlue_examples/source/motor_accel_gate/index.rst
r922 r951 16 16 17 17 One common way to implement a fly scan is to trigger a detector with motor 18 pulses. You might want the detector to acquire on every M\ :sup:`th` pulse, for example, 19 and this circuit assumes the detector can be configured to do that, if needed. 20 (If it cannot, the circuit could easily be modified to do the division by M.) 21 But you might want motor pulses from the acceleration and deceleration portions 22 of a move to be ignored, and to acquire only while the motor is moving at 23 constant speed. This circuit handles that part of the problem. 18 pulses. You might want the detector to acquire on every :math:`N^{th}` pulse, 19 for example, but to refrain from acquiring during the acceleration and 20 deceleration portions of a move. That's what this circuit does. 24 21 25 22 If you know the number of steps a stepper motor will move during its … … 31 28 .. math:: N_a = ((VBAS + VELO)/2) \times (ACCL / MRES) 32 29 33 where, ``VBAS``, ``VELO``, ``ACCL``, and ``MRES`` are motorRecord fields. 30 where, :math:`VBAS`, :math:`VELO`, :math:`ACCL`, and :math:`MRES` are 31 motorRecord fields. 34 32 35 The number of constant-speed steps, N\ :sub:`c`, is then33 The number of constant-speed steps, :math:`N_c`, is then 36 34 37 35 .. math:: N_c = ((VAL_{end}-VAL_{start})/MRES) - 2N_a 38 36 39 where ``VAL``\ :sub:`end` and ``VAL``\ :sub:`start` are the final and initial37 where :math:`VAL_{end}` and :math:`VAL_{start}` are the final and initial 40 38 values of the motorRecord ``VAL`` field. 41 39 … … 47 45 :width: 100% 48 46 49 This circuit accepts negative-going motor pulses at input signal 1, 50 gates out the first 11 (the value of ``DnCntr-1_PRESET``), and from then on 51 sends motor pulses to output pin 17 until a total of 31 (the value of 52 ``DnCntr-2_PRESET``) have been sent. Thus, the detector would see only the 20 53 pulses that occurred while the motor was moving at constant speed. The circuit 54 is reset by writing ``1!`` (positive-going pulse) to the input of ``BUF-1``. 47 This circuit accepts negative-going motor pulses at input signal 1, inverts 48 them, gates out the first :math:`N_a` (the value of ``DnCntr-1_PRESET``), and 49 from then on sends pulses to a divide-by-N circuit, until a total of 50 :math:`N_a+N_c` (the value of ``DnCntr-2_PRESET``) have been sent. The 51 divide-by-N sends every :math:`N^{th}` rising edge to output pin 17. Thus, the 52 detector would see only the :math:`(N_a+N_c)/N` divided pulses that occurred 53 while the motor was moving at constant speed. The circuit is reset by writing 54 ``1!`` (positive-going pulse) to the input of ``BUF-1``. 55 55 56 56 Down counter ``DnCntr-1``, and flipflop ``DFF-1``, together produce a gate
Note: See TracChangeset
for help on using the changeset viewer.