Changeset 882


Ignore:
Timestamp:
Jun 6, 2012 1:11:49 PM (10 years ago)
Author:
mooney
Message:

initial edits

Location:
softGlue_examples/source/gated_scaler
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • softGlue_examples/source/gated_scaler/gatedScaler.snap

    r880 r882  
    348348xxx:softGlue:sseq1.STR1 1 0
    349349xxx:softGlue:sseq1.DO1 1 0.000000000000000e+00
    350 xxx:softGlue:sseq1.LNK1 1 "xxx:softGlue:UpCntr-1_COUNTS.PROC NPP "
     350xxx:softGlue:sseq1.LNK1 1 "xxx:softGlue:UpCntr-1_COUNTS.PROC PP N"
    351351xxx:softGlue:sseq1.WAIT1 1 NoWait
    352352xxx:softGlue:sseq1.DLY2 1 0.000000000000000e+00
  • softGlue_examples/source/gated_scaler/index.rst

    r880 r882  
    55========================
    66
    7 This circuit shows one way to build a :index:`!gated scaler`.
     7
     8This circuit shows one way to build a four channel :index:`!gated scaler`.
    89
    910Circuit
     
    1112
    1213.. image:: gatedScaler.gif
    13 
     14        :width: 100%
    1415
    1516This circuit implements four counter channels, a time base to control counting
     
    2122
    2223This circuit uses a busy record (from the busy module) and a sseq record (from
    23 the std module), which are loaded by softGlue_convenience.db.  If these records
    24 are not available, the circuit will still function, but the counters will not be
    25 read immediately after the count time has elapsed, and it will not be useful to
    26 drive the counter with a ca_put_callback(), because the callback will come
    27 immediately, instead of coming after counting has finished.
     24the std module, but moved to the calc module for synApps 5.7), which are loaded
     25by softGlue_convenience.db.  If these records are not available, the circuit
     26will still function, but the counters will not be read immediately after the
     27count time has elapsed, and it will not be useful to drive the counter with a
     28ca_put_callback(), because the callback will come immediately, instead of coming
     29after counting has finished.
    2830
    2931Usage
    3032-----
    3133
    32 #       Connect field inputs to the counters by giving names to four field input
     34To load the circuit into softGlue:
     35
     361) Download this BURT snapshot file :download:`gatedScaler.snap <gatedScaler.snap>`
     37       
     382) Edit the file to replace all occurrences of the string "xxx:softGlue:"
     39   with whatever value you specified for $(P)$(H) when you loaded softGlue into
     40   your IOC
     41
     42
     433) Load the file with the command "burtwb -f gatedScaler.snap"
     44
     45To use the circuit:
     46
     471)      Connect field inputs to the counters by giving names to four field input
    3348        bits, and writing those names also to the clock inputs for up counters 1-4.
    34         (As delivered, all counters count the signal named "Clock_8MHz", which is the
    35         name this circuit gives to the 8 MHz clock.)
     49        (As delivered, all counters count the signal named "Clock_8MHz", which is
     50        the name this circuit gives to the 8 MHz clock.)
    3651
    37 #       Set the count time by writing a number, to the "N" input of DivByN-1.  The
    38         the timebase clock is 8 MHz, so the actual count time will be N/8e6 seconds.
     522)      Set the count time by writing a number, to the "N" input of DivByN-1.  The
     53        timebase clock is 8 MHz, so the actual count time will be N/8e6 seconds.
    3954
    40 #       Start the counter by writing 1 to $(P)$(H)busy1 (one of the busy records
     553)      Start the counter by writing 1 to $(P)$(H)busy1 (one of the busy records
    4156        in the EPICS database, softGlue_convenience.db, which is loaded by the
    4257        standard softGlue.cmd file).
    4358
    44 #       Either wait for the count time to elapse, or abort the count by writing
     594)      Either wait for the count time to elapse, or abort the count by writing
    4560        0 to $(P)$(H)busy1.
    4661
    47 #       Read the accumulated counts from UpCntr-<n>_COUNTS, where <n> is in [1-4].
     625)      Read the accumulated counts from UpCntr-<n>_COUNTS, where <n> is in [1-4].
    4863
    49 #       Gating can be done either by EPICS, or by a field input.
     646)      Gating can be done either by EPICS, or by a field input.
    5065
    5166        To gate with EPICS, write '1' to the second input of AND-1 to enable
     
    7489        of "count".
    7590
    76 "clear" zeroes the counters (UpCntr-<n>), loads the count time (i.e., the number
    77 of clock pulses) into the time base DivByN-1, and sets DFF-1 to 1, producing the
    78 signal named "counting".  "clear*" sets the output of DFF-3 to 1, producing the
    79 signal "counting", which stays at 1 until it's time for the counters to stop
    80 counting.
     91"clear" zeroes the counters (UpCntr-<n>), and loads the count time (i.e., the
     92number of clock pulses) into the time base DivByN-1.  "clear*" sets the output
     93of DFF-3 to 1, producing the signal "counting", which stays at 1 until it's time
     94for the counters to stop counting.
    8195
    8296"counting" is sent to field output bit 17, which must actually be configured as
    8397an output, and which will generate an interrupt on the falling edge of
    84 "counting" (when pulse counting has finished).  The interrupt processes the
    85 record $(P)$(H)sseq1, which causes EPICS records for all four counters to
    86 process, reading their values so that a client can acquire them.
     98"counting" (when pulse counting has finished).  The interrupt configuration
     99(which is not shown in the figure) is set so that the falling edge of "counting"
     100causes the record $(P)$(H)sseq1 to process, which causes EPICS records for all
     101four counters to process, reading their values so that a client can acquire
     102them.
    87103
    88104*       You can, of course, use any field output bit for this purpose, as long as
Note: See TracChangeset for help on using the changeset viewer.