Copy of old lessons from afs webpage
This commit is contained in:
@@ -0,0 +1,51 @@
|
||||
record (ao, "$(P):SET")
|
||||
{
|
||||
field (PREC, "2")
|
||||
field (OUT, "$(P):RUN") # Set new value
|
||||
field (FLNK, "$(P):ACTIVATE") # Set $(P):DONE to ACTIVE
|
||||
field (DRVL, "5")
|
||||
field (DRVH, "40")
|
||||
field (LOPR, "5")
|
||||
field (HOPR, "40")
|
||||
field (VAL, "10")
|
||||
}
|
||||
|
||||
record (ao, "$(P):RUN") # A record that changes slowly.
|
||||
{
|
||||
field (VAL, "10")
|
||||
field (OROC, "0.1") # Value changes only by 0.1
|
||||
field (SCAN, ".1 second") # each 0.1 seconds.
|
||||
field (PREC, "2")
|
||||
}
|
||||
|
||||
record (ai, "$(P):READ")
|
||||
{
|
||||
field (INP, "$(P):RUN.OVAL CP") # Get value whenever it changes.
|
||||
field (PREC, "2")
|
||||
field (LOPR, "0")
|
||||
field (HOPR, "40")
|
||||
}
|
||||
|
||||
record (bo, "$(P):DONE")
|
||||
{
|
||||
field (ZNAM, "ACTIVE")
|
||||
field (ONAM, "DONE")
|
||||
field (PINI, "YES") # After reboot initialize
|
||||
field (VAL, "1") # to state 1 (DONE)
|
||||
}
|
||||
|
||||
record (seq, "$(P):ACTIVATE")
|
||||
{
|
||||
field (DOL1, "0") # Write 0 (ACTIVE)
|
||||
field (LNK1, "$(P):DONE PP") # to $(P):DONE
|
||||
field (FLNK, "$(P):CHECKDONE") # Check if already done
|
||||
}
|
||||
|
||||
record (calcout, "$(P):CHECKDONE")
|
||||
{
|
||||
field (INPA, "$(P):READ CP")
|
||||
field (INPB, "$(P):SET CP")
|
||||
field (CALC, "A=B") # When READ and SET
|
||||
field (OOPT, "When Non-zero") # become equal then write 1
|
||||
field (OUT, "$(P):DONE PP") # to $(P):DONE.
|
||||
}
|
||||
Reference in New Issue
Block a user