EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  <20232024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  <20232024 
<== Date ==> <== Thread ==>

Subject: RE: USBCTR08 ch0 scaler counts missing
From: Keith Surrena via Tech-talk <tech-talk at aps.anl.gov>
To: Mark Rivers <rivers at cars.uchicago.edu>, "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov>
Date: Thu, 24 Aug 2023 17:37:01 +0000

Ha it may be a bit of a niche scenario that I don’t think we even have in use at any of the beamlines. I guess it would be if a user wanted to count to monitor on one of said channels and synchronize some piece of hardware that accepted an external enable, on/off style without a set time parameter. My easiest method would be to tie in off whichever counter output channel was the monitor. I have all of my counter outputs going through a multi bit OR gate to simplify cabling.

 

Do you utilize the prescale mcs functionality with your boxes? If so, is ch0 the prescale counter if it’s the only available counter output?

 

From: Mark Rivers <rivers at cars.uchicago.edu>
Sent: Thursday, August 24, 2023 11:43 AM
To: Keith Surrena <ks2339 at cornell.edu>; tech-talk at aps.anl.gov
Subject: RE: USBCTR08 ch0 scaler counts missing

 

Hi Keith,

 

  • Could you confirm another behavior for me? If I’m using the preset counters on ch 1-7 with the idle state low, the counter output waveform goes high and then stays high even when the count completes.

 

I will try to confirm that.  It may take a while, because the enclosures we have built for the USB-CTR08 do not provide connectors for the counter outputs on channels 1-7.  I am curious what you will be using those signals for?

 

Mark

 

 

From: Keith Surrena <ks2339 at cornell.edu>
Sent: Thursday, August 24, 2023 8:45 AM
To: Mark Rivers <rivers at cars.uchicago.edu>; tech-talk at aps.anl.gov
Subject: Re: USBCTR08 ch0 scaler counts missing

 

Thanks, Mark. I overlooked that my patch panel has all of the gates connected at a singular BNC node. Removing CG0 makes it function as expected now. I suspect you’re right that SPEC configures the USBCTR08 differently and allows for a different schematic. I noticed that the counter output waveform differs in that with the measComp driver the counter output waveform is a square pulse of a defined count time whereas with spec, there is usually a 150us initialization pulse that precedes the counter output timing pulse.

 

Could you confirm another behavior for me? If I’m using the preset counters on ch 1-7 with the idle state low, the counter output waveform goes high and then stays high even when the count completes. If I initiate another count sequence, it will dip low at the start, go high for the duration of the count, and then stay high until I once again doing another count. Is this typical or perhaps another incompatibility of my patch panel?

 

Keith Surrena

CHESS

 


From: Mark Rivers <rivers at cars.uchicago.edu>
Sent: Wednesday, August 23, 2023 4:25 PM
To: Keith Surrena <ks2339 at cornell.edu>; tech-talk at aps.anl.gov <tech-talk at aps.anl.gov>
Subject: RE: USBCTR08 ch0 scaler counts missing

 

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

 

 

From: Tech-talk <tech-talk-bounces at aps.anl.gov> On Behalf Of Keith Surrena via Tech-talk
Sent: Wednesday, August 23, 2023 2:27 PM
To: tech-talk at aps.anl.gov
Subject: USBCTR08 ch0 scaler counts missing

 

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


Replies:
RE: USBCTR08 ch0 scaler counts missing Mark Rivers via Tech-talk
References:
USBCTR08 ch0 scaler counts missing Keith Surrena via Tech-talk
RE: USBCTR08 ch0 scaler counts missing Mark Rivers via Tech-talk
Re: USBCTR08 ch0 scaler counts missing Keith Surrena via Tech-talk
RE: USBCTR08 ch0 scaler counts missing Mark Rivers via Tech-talk

Navigate by Date:
Prev: RE: USBCTR08 ch0 scaler counts missing Mark Rivers via Tech-talk
Next: RE: USBCTR08 ch0 scaler counts missing Mark Rivers via Tech-talk
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  <20232024 
Navigate by Thread:
Prev: RE: USBCTR08 ch0 scaler counts missing Mark Rivers via Tech-talk
Next: RE: USBCTR08 ch0 scaler counts missing Mark Rivers via Tech-talk
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  <20232024 
ANJ, 24 Aug 2023 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·