40m
QIL
Cryo_Lab
CTN
SUS_Lab
TCS_Lab
OMC_Lab
CRIME_Lab
FEA
ENG_Labs
OptContFac
Mariner
WBEEShop
|
PSL |
Not logged in |
 |
|
|
Message ID: 1547
Entry time: Wed Apr 15 17:51:43 2015
Reply to this: 1548
|
Author: |
Aidan |
Type: |
Summary |
Category: |
DAQ |
Subject: |
Acromag XT1541 DAC working correctly - a little trick to configure |
|
|
Aidan.
Success!
I configured the Acromag XT1541 DAC to run with EPICS. This was a touch trickier than the ADC as there is a subtlety with the channel configuration in the EPICS database. The bottom line is that now I can change the value in an EPICS channel and a multimeter attached to the unit will show a corresponding change in voltage.
The attached files (ioctest2.cmd and IOCTEST2.db) are used to access the first output channel, OUT00, on the unit. Now that I've got the thing working I can debug the calibration. Once that's sorted I'll summarize the set-up procedure on a Wiki page with glorious detail for future reference.
The following command line is used to open the modbus EPICS server.
${EPICS_MODULES}/modbus/bin/${EPICS_HOST_ARCH}/modbusApp ioctest2.cmd
The ioctest1 files are for the ADC unit. |
|
epicsEnvSet("IOC", "ioctest2")
epicsEnvSet("ARCH","linux-x86_64")
epicsEnvSet("TOP","${EPICS_MODULES}/modbus")
epicsEnvSet("MDBTOP","${EPICS_MODULES}/modbus")
dbLoadDatabase("$(MDBTOP)/dbd/modbus.dbd")
modbus_registerRecordDeviceDriver(pdbbase)
drvAsynIPPortConfigure("c3test2","10.0.1.41:502",0,0,1)
modbusInterposeConfig("c3test2",0,5000,0)
drvModbusAsynConfigure("DAC_Reg","c3test2",0,6,1,8,4,0,"Acromag")
dbLoadDatabase("./IOCTEST2.db")
... 2 more lines ...
|
|
record(ao, "C3:ACROMAG_OUTPUT0")
{
field(DTYP, "asynInt32")
field(OUT, "@asynMask(DAC_Reg, 0, -16)MODBUS_DATA")
field(LINR,"NO CONVERSION")
field(EGUL, "-163.84")
field(EGUF, "163.835")
field(HOPR, "163.835")
field(LOPR, "-163.84")
field(PREC, "2")
... 3 more lines ...
|
|
epicsEnvSet("IOC", "ioctest1")
epicsEnvSet("ARCH","linux-x86_64")
epicsEnvSet("TOP","${EPICS_MODULES}/modbus")
epicsEnvSet("MDBTOP","${EPICS_MODULES}/modbus")
dbLoadDatabase("$(MDBTOP)/dbd/modbus.dbd")
modbus_registerRecordDeviceDriver(pdbbase)
drvAsynIPPortConfigure("c3test1","10.0.1.42:502",0,0,1)
modbusInterposeConfig("c3test1",0,5000,0)
drvModbusAsynConfigure("ADC_Reg","c3test1",0,4,0,8,4,32,"Acromag")
dbLoadDatabase("./IOCTEST1.db")
... 2 more lines ...
|
|
record(ai, "C3:ACROMAG_INPUT0")
{
field(SCAN, ".1 second")
field(FLNK, "C3:ACROMAG_INPUT0_C.PROC")
field(DTYP, "asynInt32")
field(INP, "@asynMask(ADC_Reg 0 -16)MODBUS_DATA")
}
record(ai, "C3:ACROMAG_INPUT1")
{
field(SCAN, ".1 second")
... 5 more lines ...
|