40m QIL Cryo_Lab CTN SUS_Lab TCS_Lab OMC_Lab CRIME_Lab FEA ENG_Labs OptContFac Mariner WBEEShop
  PSL  Not logged in ELOG logo
Entry  Wed Apr 15 17:51:43 2015, Aidan, Summary, DAQ, Acromag XT1541 DAC working correctly - a little trick to configure ioctest2.cmdIOCTEST2.dbioctest1.cmdIOCTEST1.db
    Reply  Thu Apr 16 13:31:32 2015, Aidan, Summary, DAQ, Acromag XT1541 DAC working correctly - a little trick to configure 
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.

Attachment 1: ioctest2.cmd  449 Bytes  | Hide | Hide all
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 ...
Attachment 2: IOCTEST2.db  288 Bytes  | Hide | Hide all
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 ...
Attachment 3: ioctest1.cmd  450 Bytes  | Hide | Hide all
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 ...
Attachment 4: IOCTEST1.db  360 Bytes  | Hide | Hide all
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 ...
ELOG V3.1.3-