X-418 Ethernet ADC

X-418™ Web-Enabled, Multi-Function 8-Channel Analog Input Module

In this example it is used to read vacuum sensors and is therefore calibrated again.

The X-418™ is a fully-featured, Ethernet module with an 8-channel, 16-bit, analog data acquisition system. Configure each channel as a single-ended or differential input.

Monitor and log sensors connected to the analog inputs using the X-418's intuitive web interface.

It can be controlled and/or monitored over any TCP/IP network including private networks, IP-based industrial control networks, and the Internet.



Modbus must be switched on in the interface of the X-418.

This example is for a DAC where the first channel is read out. You are welcome to add more channels.

You need an EPICS-Base as well as Aysn and the Modbus module. https://github.com/epics-modules/modbus

First you have to create a new IOC. Then edit your st.cmd and add these lines.

# Use the following commands for TCP/IP
#drvAsynIPPortConfigure(const char *portName,
# const char *hostInfo,
# unsigned int priority,
# int noAutoConnect,
# int noProcessEos);
#modbusInterposeConfig(const char *portName,
# modbusLinkType linkType,
# int timeoutMsec,
# int writeDelayMsec)

#read Modbus value
#drvModbusAsynConfigure(portName, tcpPortName, slaveAddress, modbusFunction, modbusStartAddress, modbusLength, dataType, pollMsec, plcType)
drvModbusAsynConfigure("VAC0_1", "VAC0", 1, 3, 0x00, 2, 7, 100, "vac0")
#drvModbusAsynConfigure("VAC0_2", "VAC0", 1, 3, 0x02, 2, 7, 100, "vac0")
#drvModbusAsynConfigure("VAC0_3", "VAC0", 1, 3, 0x04, 2, 7, 100, "vac0")
#drvModbusAsynConfigure("VAC0_4", "VAC0", 1, 3, 0x06, 2, 7, 100, "vac0")

#drvModbusAsynConfigure("VAC1_1", "VAC1", 1, 3, 0x00, 2, 7, 100, "vac1")

## Load record instances

Then you have to edit the Makefile in the src folder.

hanvac_DBD += base.dbd
hanvac_DBD += asyn.dbd
hanvac_DBD += modbusApp.dbd

hanvac_LIBS += asyn
hanvac_LIBS += modbus

In the db folder you also have to edit the Makefile.

DB += modbus.db

At the end create the modbus.db with this content:

# ai record template for register inputs
record(ai, "$(P):VAC0_1_RAW") {
field(SCAN,"1 second")

# THERMOVAC Transmitter TTR 911 N
# cali V_out = log10 (P_mbar) x 1.286 + 6.143

record(calc, "$(P):VAC0_1") {
field(DESC, "Presure")
field(SCAN,"1 second")
field(CALC, "10^((A-6.143)/1.286)")
field(INPA, "$(P):VAC0_1_RAW.VAL")
field(EGU, "mbar")
Page last modified on February 11, 2021, at 02:45 PM
Powered by PmWiki