template: add circle.db to exampleApp for pdbGroup

This commit is contained in:
Ralph Lange
2017-12-14 17:09:43 +01:00
parent efee52b6d7
commit 1c03e615f1
4 changed files with 78 additions and 0 deletions

View File

@@ -11,6 +11,7 @@ TEMPLATES += top/iocApp/src/_APPNAME_Main.cpp
TEMPLATES += top/exampleApp/Makefile
TEMPLATES += top/exampleApp/Db/Makefile
TEMPLATES += top/exampleApp/Db/circle.db
TEMPLATES += top/exampleApp/Db/dbExample1.db
TEMPLATES += top/exampleApp/Db/dbExample2.db
TEMPLATES += top/exampleApp/Db/_APPNAME_Version.db

View File

@@ -4,6 +4,7 @@ include $(TOP)/configure/CONFIG
# ADD MACRO DEFINITIONS BELOW HERE
# Install databases, templates & substitutions like this
DB += circle.db
DB += dbExample1.db
DB += dbExample2.db
DB += _APPNAME_Version.db

View File

@@ -0,0 +1,72 @@
record(ao, "$(user):circle:step") {
field(VAL , "1.0")
field(DRVL, "0.0")
field(DRVH, "359")
field(PINI, "YES")
}
record(ao, "$(user):circle:period") {
field(VAL , "1.0")
field(PINI, "YES")
field(OUT , "$(user):circle:tick.ODLY NPP")
}
record(calc, "$(user):circle:angle") {
field(PINI, "RUNNING") # bootstrap
field(INPA, "$(user):circle:angle NPP")
field(INPB, "$(user):circle:step NPP")
field(INPD, "360")
field(DESC, "Angle")
field(EGU , "deg")
field(LOLO, "45")
field(LOW , "135")
field(HIGH, "225")
field(HIHI, "315")
field(LLSV, "MAJOR")
field(LSV , "MINOR")
field(HSV , "MINOR")
field(HHSV, "MAJOR")
field(CALC, "C:=A+B;(C>=D)?C-D:C")
field(FLNK, "$(user):circle:x")
field(PREC, "3")
info(Q:group, {
"$(user):circle":{"angle": {+channel:"VAL"}},
"$(user):line":{"a": {+channel:"VAL"}}
})
alias("$(user):line:a")
}
record(calc, "$(user):circle:x") {
field(INPA, "$(user):circle:angle NPP")
field(CALC, "cos(A*PI/180)")
field(TSEL, "$(user):circle:angle.TIME")
field(FLNK, "$(user):circle:y")
field(PREC, "3")
info(Q:group, {
"$(user):circle":{"x": {+channel:"VAL"}}
})
}
record(calc, "$(user):circle:y") {
field(INPA, "$(user):circle:angle NPP")
field(CALC, "sin(A*PI/180)")
field(TSEL, "$(user):circle:angle.TIME")
field(PREC, "3")
field(FLNK, "$(user):line:b")
info(Q:group, {
"$(user):circle":{"y": {+channel:"VAL", +trigger:"*"}}
})
}
record(ai, "$(user):line:b") {
field(INP, "$(user):line:a NPP")
field(FLNK, "$(user):circle:tick")
info(Q:group, {
"$(user):line":{"b": {+channel:"VAL", +trigger:"*"}}
})
}
record(calcout, "$(user):circle:tick") {
field(ODLY, "1.0")
field(OUT , "$(user):circle:angle.PROC CA") # loop
}

View File

@@ -1,5 +1,9 @@
# Example substitutions file
file "db/circle.db" {
{ user = "_USER_" }
}
file "db/dbExample1.db" {
{ user = "_USER_" }
}