iocpvalink

This commit is contained in:
Michael Davidsaver
2018-04-21 10:19:38 -07:00
parent f3622c0d42
commit 75efc13244
6 changed files with 80 additions and 0 deletions

View File

@ -0,0 +1,5 @@
TOP = ../..
include $(TOP)/configure/CONFIG
ARCH = linux-x86_64-debug
TARGETS = envPaths
include $(TOP)/configure/RULES.ioc

View File

@ -0,0 +1,4 @@
IOC for testing PVA links
Primary test is st.cmd. st2.cmd is run/stopped concurrently
to test remote connect/disconnect.

View File

@ -0,0 +1,51 @@
record(ai, "$(P)target") {}
# local input link shorthand
record(longin, "$(P)inp1") {
field(INP , {pva:"$(P)target"})
}
# local input link longhand
record(longin, "$(P)inp2") {
field(INP , {pva:{pv:"$(P)target"}})
}
# remote input link
record(longin, "$(P)inp3") {
field(INP , {pva:"invalid:pv:name"})
}
# null like (requires local, but not local)
record(longin, "$(P)inp4") {
field(INP , {pva:{pv:"invalid:pv:name", local:true}})
}
# local input link w/ CP (process on update)
record(calc, "$(P)cnt") {
field(SCAN, "1 second")
field(INPA, "$(P)cnt")
field(INPB, "9")
field(CALC, "A<B?A+1:0")
field(HIGH, "7")
field(HSV , "MAJOR")
}
record(longin, "$(P)track") {
field(INP , {pva:{
pv:"$(P)cnt",
proc:"CP",
sevr:true,
time:true
}})
field(TSE, "-2")
}
# remote input link w/ CP (process on update)
record(longin, "$(P)track2") {
field(INP , {pva:{
pv:"$(P)cnt:rmt",
proc:"CP",
sevr:true,
time:true
}})
field(TSE, "-2")
}

View File

@ -0,0 +1,10 @@
# use with pvalink.db, run in a second IOC
record(calc, "$(P)cnt:rmt") {
field(SCAN, "1 second")
field(INPA, "$(P)cnt")
field(INPB, "9")
field(CALC, "A<B?A+1:0")
field(HIGH, "7")
field(HSV , "MAJOR")
}

5
iocBoot/iocpvalink/st.cmd Executable file
View File

@ -0,0 +1,5 @@
#!../../bin/linux-x86_64-debug/softIocPVA
dbLoadRecords("pvalink.db","P=TST:")
iocInit()

5
iocBoot/iocpvalink/st2.cmd Executable file
View File

@ -0,0 +1,5 @@
#!../../bin/linux-x86_64-debug/softIocPVA
dbLoadRecords("pvalink2.db","P=TST:")
iocInit()