#! Generated by VisualDCT v2.6.1280
#! DBDSTART
#! DBDEND



record(calcout, "impulse_$(outName)") {
  field(DESC, "ramp dac")
  field(SCAN, ".1 second")
  field(DTYP, "Soft Channel")
  field(CALC, "(D<C)?(D+B):(A-A)")
  field(INPA, "start_$(outName)")
  field(INPB, "step_$(outName).VAL")
  field(INPC, "end_$(outName).VAL")
  field(VAL, "0")
  field(INPD, "impulse_$(outName).VAL")
  field(OUT, "clear_$(outName).VAL PP")
  field(ACKT, "NO")
  field(OOPT, "When Zero")
}

record(bo, "impulse_en_$(outName)") {
  field(DESC, "ramp enable")
  field(VAL, "1")
  field(OUT, "set_$(outName).PROC")
}

record(bo, "impulse_done_$(outName)") {
  field(VAL, "1")
  field(OUT, "impulse_$(outName).DISA PP")
  field(ZNAM, "enable")
  field(ONAM, "disable")
}

record(ao, "clear_$(outName)") {
  field(DESC, "set DAC")
  field(DTYP, "stream")
  field(OUT, "@hadcon_RGWR.proto write($(register)) hadcon2")
  field(FLNK, "impulse_done_$(outName)")
  field(VAL, "0")
  field(ACKT, "NO")
}

record(ao, "set_$(outName)") {
  field(DESC, "set DAC")
  field(DTYP, "stream")
  field(OUT, "@hadcon_RGWR.proto write($(register)) hadcon2")
  field(FLNK, "impulse_start_$(outName)")
  field(DRVL, "0")
  field(VAL, "$(port)")
  field(ACKT, "NO")
}

record(ao, "start_$(outName)") {
  field(VAL, "0")
  field(OUT, "impulse_$(outName).A")
}

record(ao, "end_$(outName)") {
  field(VAL, "$(msec)")
  field(OUT, "impulse_$(outName).C")
  field(DESC, "100 msec * (msec)")
}

record(ao, "step_$(outName)") {
  field(VAL, "1")
  field(OUT, "impulse_$(outName).B")
}


record(bo, "impulse_start_$(outName)") {
  field(VAL, "0")
  field(OUT, "impulse_$(outName).DISA PP")
  field(DESC, "cnt_en")
  field(ZNAM, "enable")
  field(ONAM, "disable")
}

#! Further lines contain data used by VisualDCT
#! View(1129,2295,1.0)
#! Record("impulse_$(outName)",2420,2336,0,1,"impulse_$(outName)")
#! Field("impulse_$(outName).VAL",16777215,0,"impulse_$(outName).VAL")
#! Field("impulse_$(outName).INPD",16777215,0,"impulse_$(outName).INPD")
#! Link("impulse_$(outName).INPD","impulse_$(outName).VAL")
#! Field("impulse_$(outName).OUT",16777215,1,"impulse_$(outName).OUT")
#! Link("impulse_$(outName).OUT","clear_$(outName).VAL")
#! Field("impulse_$(outName).DISA",16777215,1,"impulse_$(outName).DISA")
#! Field("impulse_$(outName).A",16777215,0,"impulse_$(outName).A")
#! Field("impulse_$(outName).INPA",16777215,0,"impulse_$(outName).INPA")
#! Link("impulse_$(outName).INPA","impulse_$(outName)/INPA")
#! Field("impulse_$(outName).B",16777215,0,"impulse_$(outName).B")
#! Field("impulse_$(outName).INPB",16777215,0,"impulse_$(outName).INPB")
#! Link("impulse_$(outName).INPB","impulse_$(outName)/INPB")
#! Field("impulse_$(outName).C",16777215,0,"impulse_$(outName).C")
#! Field("impulse_$(outName).INPC",16777215,0,"impulse_$(outName).INPC")
#! Link("impulse_$(outName).INPC","impulse_$(outName)/INPC")
#! Connector("impulse_$(outName)/INPC","end_$(outName).VAL",2000,2900,16777215,"",0)
#! Connector("impulse_$(outName)/INPB","step_$(outName).VAL",1940,2810,16777215,"",0)
#! Connector("impulse_$(outName)/INPA","start_$(outName).VAL",1900,2720,16777215,"",0)
#! Record("impulse_en_$(outName)",1380,2461,0,1,"impulse_en_$(outName)")
#! Field("impulse_en_$(outName).OUT",16777215,1,"impulse_en_$(outName).OUT")
#! Link("impulse_en_$(outName).OUT","set_$(outName).PROC")
#! Record("impulse_done_$(outName)",2940,2687,0,0,"impulse_done_$(outName)")
#! Field("impulse_done_$(outName).OUT",16777215,0,"impulse_done_$(outName).OUT")
#! Link("impulse_done_$(outName).OUT","impulse_$(outName).DISA")
#! Record("clear_$(outName)",2680,2439,0,1,"clear_$(outName)")
#! Field("clear_$(outName).FLNK",16777215,1,"clear_$(outName).FLNK")
#! Link("clear_$(outName).FLNK","impulse_done_$(outName)")
#! Field("clear_$(outName).VAL",16777215,1,"clear_$(outName).VAL")
#! Record("set_$(outName)",1680,2385,0,1,"set_$(outName)")
#! Field("set_$(outName).FLNK",16777215,1,"set_$(outName).FLNK")
#! Link("set_$(outName).FLNK","impulse_start_$(outName)")
#! Field("set_$(outName).PROC",16777215,0,"set_$(outName).PROC")
#! Record("start_$(outName)",1660,2655,0,1,"start_$(outName)")
#! Field("start_$(outName).OUT",16777215,1,"start_$(outName).OUT")
#! Link("start_$(outName).OUT","start_$(outName)/OUT1")
#! Field("start_$(outName).VAL",16777215,1,"start_$(outName).VAL")
#! Connector("start_$(outName)/OUT1","start_$(outName)/OUT",1880,2705,16777215,"",0)
#! Connector("start_$(outName)/OUT","impulse_$(outName).A",2115,2660,16777215,"",0)
#! Record("end_$(outName)",1660,2921,0,1,"end_$(outName)")
#! Field("end_$(outName).OUT",16777215,1,"end_$(outName).OUT")
#! Link("end_$(outName).OUT","end__$(outName)/OUT")
#! Field("end_$(outName).VAL",16777215,1,"end_$(outName).VAL")
#! Connector("end__$(outName)/OUT","impulse_$(outName).C",1980,2880,16777215,"",0)
#! Record("step_$(outName)",1660,2795,0,1,"step_$(outName)")
#! Field("step_$(outName).OUT",16777215,1,"step_$(outName).OUT")
#! Link("step_$(outName).OUT","step__$(outName)/OUT")
#! Field("step_$(outName).VAL",16777215,1,"step_$(outName).VAL")
#! Connector("step__$(outName)/OUT","impulse_$(outName).B",1920,2790,16777215,"",0)
#! Record("impulse_start_$(outName)",2100,2493,0,0,"impulse_start_$(outName)")
#! Field("impulse_start_$(outName).OUT",16777215,1,"impulse_start_$(outName).OUT")
#! Link("impulse_start_$(outName).OUT","impulse_$(outName).DISA")
