Hi Angus,
The synApps distribution does contain an example.
As you found, std/stdApp/src/devScalerAsyn.c is the device-independent device support for the scaler record.
mca/mcaApp/SISSrc/drvMcaSIS/drvMcaSIS3820Asyn.c is an example asyn driver that supports the scaler record. It is a relatively complex driver, because it supports not only the scaler record interface, but also the mca record interface. The driver allows the SIS3820 to be used as a simple preset scaler (like the Joerger VSC16). It also allows it to be used as a multi-channel scaler (MCS), with each input counting into an array as a function of time or external channel advance. The time per point can be as small as 1 microsecond or so.
If you only are interested in the preset scaler mode, then most of the code in this driver is not necessary because it is supporting the MCS mode.
mca/iocBoot/iocVxWorks/SIS3820_32.cmd is an example vxWorks startup script which loads a scaler record. The scaler record itself is loaded from std/stdApp/Db/scaler32.db.
Let me know if you have more questions.
Mark
________________________________
From: [email protected] on behalf of Angus Gratton
Sent: Tue 9/7/2010 7:21 PM
To: tech-talk
Subject: Examples of synApps scaler record using asyn port driver
Hi,
I was wondering if anyone could show me an example of a scaler record
implemented using an asyn port driver.
I've read over devScalerAsyn.c and I think I can see how it all fits
together on the port driver side. However, if anyone had an example
(with both database records and a port driver) that they could show me,
just so I can see how it all fits together, then I would be incredibly
grateful.
I couldn't see any examples of this kind in the synApps distribution,
although it's possible I'm looking in the wrong place!
Thanks very much in advance.
- Angus