next up previous
Next: Add the database file Up: How to create EPICS Previous: Modify the application database

Create the application database file

Now that the application includes the necessary device and driver support it's possible to create the database describing the actual EPICS process variables associated with the filter wheel.

I created the file AB300App/Db/AB300.db with the following contents:

record(longout, "$(user):FilterWheel:reset")
{
    field(DESC, "Reset AB300 Controller")
    field(SCAN, "Passive")
    field(DTYP, "AB300Gpib")
    field(OUT,  "#L0 A0 @0")
}
record(longout, "$(user):FilterWheel")
{
    field(DESC, "Set Filter Wheel Position")
    field(SCAN, "Passive")
    field(DTYP, "AB300Gpib")
    field(OUT,  "#L0 A0 @1")
    field(LOPR, 1)
    field(HOPR, 6)
}
record(longin, "$(user):FilterWheel:fbk")
{
    field(DESC, "Filter Wheel Position")
    field(SCAN, "Passive")
    field(DTYP, "AB300Gpib")
    field(INP,  "#L0 A0 @2")
    field(LOPR, 1)
    field(HOPR, 6)
}
record(longin, "$(user):FilterWheel:status")
{
    field(DESC, "Filter Wheel Status")
    field(SCAN, "Passive")
    field(DTYP, "AB300Gpib")
    field(INP,  "#L0 A0 @3")
}
Notes:
  1. The numbers following the L in the INP and OUT fields are the number of the `link' used to communicate with the filter wheel. This link is set up at run time by commands in the application startup script.
  2. The numbers following the A in the INP and OUT fields are unused by the device support but must be a valid GPIB address (0-30) since the GPIB address conversion routines check the value.
  3. The numbers following the @ in the INP and OUT fields are the indices into the GPIB command array.
  4. The DTYP fields must match the names specified in the AB300Include.dbd database definition.