Hi Keith,
- I have TMR0 set at 1 MHz connected to my counter 0 input and my counter 0 output connected to the gate.
When you say “connected to the gate” what do you mean? The EPICS driver assumes that the counter 0 output is connected to the gate of all channels except channel 0, i.e. channels 1-7. That is documented here:
https://epics-modules.github.io/measComp/measCompUSBCTRDoc.html#scaler-record-support
- I can complete a count sequence by using the preset counters on counters 1-7 connected to TMR0 but not c0.
When you do preset counts on counters 1-7 that is done in software, not in hardware. The driver reads a stream of count values from the scalers and stops when any counter exceeds its present. So it will always count a little bit more
than the present counts.
Because counter 0 is used in preset mode, and is connected to the gate of all other counters it will count for exactly the requested number of counts and all other channels will stop at exactly the same time.
I just configured my USBCTR-08 as follows:
- TMR0 set at 1e6 Hz and connected to CTR0.
- TMR1 set at 1e5 Hz and connected to CTR1.
- TMR2 set at 1e4 Hz and connected to CTR2.
- TMR3 set at 1e3 Hz and connected to CTR3.
I set the scaler.TP field to 1.0 second and the scaler.FREQ field to 1e6 Hz. The scaler.G1 field is 1 so it is a preset. .G2-.G8 are 0 so they are not presets.
When I start the scaler record and let it finish counting I see the screen in the attached file.
Note that channels 1-4 have exactly the expected counts: 1000000, 100000, 10000, 1000.
I am not sure if SPEC and the measComp driver program the UCBCTR-08 in exactly the same way, and if SPEC expects the module to be wired the same way.
Mark
I’m having an issue where counter 0 of my USBCTR08 is not registering counts when I attempt to do a basic scaler count sequence with the MEDM (count time 1s, count preset 1000000). I have TMR0 set at 1 MHz connected to my counter 0 input
and my counter 0 output connected to the gate. I can complete a count sequence by using the preset counters on counters 1-7 connected to TMR0 but not c0. I’ve verified my TMR0 signal with an oscope, the numbers and timing on the other preset counters makes
sense, and this same hardware setup works at our beamlines that use the USBCTR with SPEC, so I’m fairly confident in the hardware and signal patching. Version info: scaler 4.0, measComp R4.1, and epics 7.0.7.
Keith Surrena
CHESS