ISIS Logo
NetShrVar
An EPICS support module to export National Instruments Network Shared Variables as process variables
TestNetShrVar.db

Example EPICS DB file, generated from netvarconfig.xml using netvarconfig2db.xsl

# Initially generated by $Id: netvarconfig2db.xsl 2571 2015-02-10 14:17:33Z faa59 $
#
# auto-generated EPICS records specify an asyn port "nsv", but this can be changed - it just needs
# to match the first argument of the relevant NetShrVarConfigure() command in the IOC st.cmd
#
#
# Definitions from configSection "sec1" in XML input file
#
# NetShrVarConfigure("nsv", "sec1", "/path/to/netvarconfig.xml", 100)
#
# Read Network shared variable "//localhost/example/some_control"
record(ai, "$(P)cont1_RBV")
{
field(DESC, "NSV '//localhost/example/some_control'")
field(DTYP, "asynFloat64")
field(INP, "@asyn(nsv,0,0)cont1")
field(PREC, "3")
field(SCAN, "I/O Intr")
}
# Write Network shared variable "//localhost/example/some_control"
record(ao, "$(P)cont1")
{
field(DESC, "NSV '//localhost/example/some_control'")
field(DTYP, "asynFloat64")
field(OUT, "@asyn(nsv,0,0)cont1")
field(PREC, "3")
}
# Read Network shared variable "//localhost/example/some_control"
record(longin, "$(P)icont1_RBV")
{
field(DESC, "NSV '//localhost/example/some_control'")
field(DTYP, "asynInt32")
field(INP, "@asyn(nsv,0,0)icont1")
field(SCAN, "I/O Intr")
}
# Write Network shared variable "//localhost/example/some_control"
record(longout, "$(P)icont1")
{
field(DESC, "NSV '//localhost/example/some_control'")
field(DTYP, "asynInt32")
field(OUT, "@asyn(nsv,0,0)icont1")
}
# Read Network shared variable "//localhost/example/some_indicator"
record(longin, "$(P)ind1_RBV")
{
field(DESC, "NSV '//localhost/example/some_indicator'")
field(DTYP, "asynInt32")
field(INP, "@asyn(nsv,0,0)ind1")
field(SCAN, "I/O Intr")
}
# Write Network shared variable "//localhost/example/some_indicator"
record(longout, "$(P)ind1")
{
field(DESC, "NSV '//localhost/example/some_indicator'")
field(DTYP, "asynInt32")
field(OUT, "@asyn(nsv,0,0)ind1")
}
## Creating both stringout/stringin and waveform records for NSV '//localhost/example/some_string'
## EPICS strings are restricted to 40 characters in length, if your strings are
## longer than this choose the character waveform records and adjust NELM if necessary
# Read Network shared variable "//localhost/example/some_string"
record(stringin, "$(P)strcont1_RBV")
{
field(DESC, "NSV '//localhost/example/some_string'")
field(DTYP, "asynOctetRead")
field(INP, "@asyn(nsv,0,0)strcont1")
field(SCAN, "I/O Intr")
}
# Write Network shared variable "//localhost/example/some_string"
record(stringout, "$(P)strcont1")
{
field(DESC, "NSV '//localhost/example/some_string'")
field(DTYP, "asynOctetWrite")
field(OUT, "@asyn(nsv,0,0)strcont1")
}
# Read Network shared variable "//localhost/example/some_string"
record(waveform, "$(P)strcont1WF_RBV")
{
field(DESC, "NSV '//localhost/example/some_string'")
field(DTYP, "asynOctetRead")
field(FTVL, "CHAR")
field(NELM, 256)
field(INP, "@asyn(nsv,0,0)strcont1")
field(SCAN, "I/O Intr")
}
# Write Network shared variable "//localhost/example/some_string"
record(waveform, "$(P)strcont1WF")
{
field(DESC, "NSV '//localhost/example/some_string'")
field(DTYP, "asynOctetWrite")
field(FTVL, "CHAR")
field(NELM, 256)
field(INP, "@asyn(nsv,0,0)strcont1")
}
# Read Network shared variable "//localhost/example/some_bool"
record(bi, "$(P)bool1_RBV")
{
field(DESC, "NSV '//localhost/example/some_bool'")
field(DTYP, "asynInt32")
field(INP, "@asyn(nsv,0,0)bool1")
field(SCAN, "I/O Intr")
field(ZNAM, "off")
field(ONAM, "on")
}
# Write Network shared variable "//localhost/example/some_bool"
record(bo, "$(P)bool1")
{
field(DESC, "NSV '//localhost/example/some_bool'")
field(DTYP, "asynInt32")
field(OUT, "@asyn(nsv,0,0)bool1")
field(ZNAM, "off")
field(ONAM, "on")
}
# Read Network shared variable "//localhost/example/some_array"
record(waveform, "$(P)array1_RBV")
{
field(DESC, "NSV '//localhost/example/some_array'")
field(DTYP, "asynFloat64ArrayIn")
field(FTVL, "DOUBLE")
field(NELM, 1000)
field(INP, "@asyn(nsv,0,0)array1")
field(PREC, "3")
field(SCAN, "I/O Intr")
}
# Write Network shared variable "//localhost/example/some_array"
record(waveform, "$(P)array1")
{
field(DESC, "NSV '//localhost/example/some_array'")
field(DTYP, "asynFloat64ArrayOut")
field(FTVL, "DOUBLE")
field(NELM, 1000)
field(INP, "@asyn(nsv,0,0)array1")
field(PREC, "3")
}
# Read Network shared variable "//localhost/example/some_struct" struct field index 1
record(ai, "$(P)struct1_RBV")
{
field(DESC, "NSV '//localhost/example/some_struct'[1]")
field(DTYP, "asynFloat64")
field(INP, "@asyn(nsv,0,0)struct1")
field(PREC, "3")
field(SCAN, "I/O Intr")
}
# Write Network shared variable "//localhost/example/some_struct" struct field index 1
record(ao, "$(P)struct1")
{
field(DESC, "NSV '//localhost/example/some_struct'[1]")
field(DTYP, "asynFloat64")
field(OUT, "@asyn(nsv,0,0)struct1")
field(PREC, "3")
}
Copyright © 2013 Science and Technology Facilities Council | Generated by   doxygen 1.8.5