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, "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, "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, "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, "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, "some_indicator")
field(DTYP, "asynInt32")
field(INP, "@asyn(nsv,0,0)ind1")
field(SCAN, "I/O Intr")
field(TSE, -2)
}
# Write Network shared variable "//localhost/example/some_indicator"
record(longout, "$(P)ind1")
{
field(DESC, "some_indicator")
field(DTYP, "asynInt32")
field(OUT, "@asyn(nsv,0,0)ind1")
}
# Read Network shared variable "//localhost/example/some_indicator2"
record(longin, "$(P)ind2_RBV")
{
field(DESC, "some_indicator2")
field(DTYP, "asynInt32")
field(INP, "@asyn(nsv,0,0)ind2")
field(SCAN, "5 second")
field(TSE, -2)
}
# Write Network shared variable "//localhost/example/some_indicator2"
record(longout, "$(P)ind2")
{
field(DESC, "some_indicator2")
field(DTYP, "asynInt32")
field(OUT, "@asyn(nsv,0,0)ind2")
}
## 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, "some_string")
field(DTYP, "asynOctetRead")
field(INP, "@asyn(nsv,0,0)strcont1")
field(SCAN, "I/O Intr")
field(TSE, -2)
}
# Write Network shared variable "//localhost/example/some_string"
record(stringout, "$(P)strcont1")
{
field(DESC, "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, "some_string")
field(DTYP, "asynOctetRead")
field(FTVL, "CHAR")
field(NELM, 256)
field(INP, "@asyn(nsv,0,0)strcont1")
field(SCAN, "I/O Intr")
field(TSE, -2)
}
# Write Network shared variable "//localhost/example/some_string"
record(waveform, "$(P)strcont1WF")
{
field(DESC, "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, "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, "some_bool")
field(DTYP, "asynInt32")
field(OUT, "@asyn(nsv,0,0)bool1")
field(ZNAM, "off")
field(ONAM, "on")
}
record(waveform, "$(P)array1_RBV")
{
field(DTYP, "asynInt16ArrayIn")
field(FTVL, "SHORT")
field(NELM, 100000)
field(INP, "@asyn(nsv,0,0)arrayU16")
field(PREC, "3")
field(SCAN, "I/O Intr")
field(TSE, -2)
}
record(waveform, "$(P)array1")
{
field(DTYP, "asynInt16ArrayOut")
field(FTVL, "SHORT")
field(NELM, 100000)
field(INP, "@asyn(nsv,0,0)arrayU16")
field(PREC, "3")
}
record(waveform, "$(P)array2_RBV")
{
field(DTYP, "asynFloat64ArrayIn")
field(FTVL, "DOUBLE")
field(NELM, 100000)
field(INP, "@asyn(nsv,0,0)arrayDble")
field(PREC, "3")
field(SCAN, "I/O Intr")
field(TSE, -2)
}
record(waveform, "$(P)array2")
{
field(DTYP, "asynFloat64ArrayOut")
field(FTVL, "DOUBLE")
field(NELM, 100000)
field(INP, "@asyn(nsv,0,0)arrayDble")
field(PREC, "3")
}
# read a labview timestamp, stored in a uint64[2] shared variable
# if TSE is -2 then time of PV is set to value of timestamp variable rather than update time of shared variable
record(stringin, "$(P)timestamp_RBV")
{
field(DESC, "timestamp")
field(DTYP, "asynOctetRead")
field(INP, "@asyn(nsv,0,0)tstamp")
field(SCAN, "I/O Intr")
field(TSE, -2)
}
# read a labview timestamp, stored in a uint64[2] shared variable
# if TSE is -2 then time of PV is set to value of timestamp variable rather than update time of shared variable
record(ai, "$(P)ftimestamp_RBV")
{
field(DESC, "ftimestamp")
field(DTYP, "asynFloat64")
field(INP, "@asyn(nsv,0,0)ftstamp")
field(SCAN, "I/O Intr")
field(TSE, -2)
}
# Read part of struct network shared variable
record(waveform, "$(P)struct_Y_RBV")
{
field(DESC, "some_struct")
field(DTYP, "asynFloat64ArrayIn")
field(INP, "@asyn(nsv,0,0)struct_Y")
field(FTVL, "DOUBLE")
field(NELM, 100000)
field(PREC, "3")
field(SCAN, "I/O Intr")
field(TSE, -2)
}
record(ai, "$(P)struct_dt_RBV")
{
field(DESC, "dt")
field(DTYP, "asynFloat64")
field(INP, "@asyn(nsv,0,0)struct_dt")
field(SCAN, "I/O Intr")
field(TSE, -2)
}
# Write struct Network shared variable
record(ao, "$(P)struct_extra")
{
field(DESC, "struct_extra")
field(DTYP, "asynFloat64")
field(OUT, "@asyn(nsv,0,0)struct_extra")
field(PREC, "3")
}
record(ai, "$(P)struct_extra_RBV")
{
field(DESC, "struct_extra")
field(DTYP, "asynFloat64")
field(INP, "@asyn(nsv,0,0)struct_extra")
field(SCAN, "I/O Intr")
field(PREC, "3")
}
record(waveform, "$(P)struct_extra_array")
{
field(DESC, "some_struct")
field(DTYP, "asynFloat64ArrayOut")
field(INP, "@asyn(nsv,0,0)struct_extra_array")
field(FTVL, "DOUBLE")
field(NELM, 100)
field(PREC, "3")
}
Copyright © 2013 Science and Technology Facilities Council | Generated by   doxygen 1.8.5