Hi,
I see there is a recent message about using the Modbus module to talk to Moxa ioLogik devices. This might be good time to announce that we've developed support for various Moxa ioLogik modules and put it on GitHub at:
https://github.com/ornl-epics/moxa
It includes support for:
E1210 - 16 DI
E1214 - 6 DI, 6 Relay
E1240 - 8 AI
E1241 - 4 AO
E1242 - 4 DI, 4DIO, 4 AI
It's light on documentation, but there is an example IOC showing how to use it, and it's simply:
file E1214.template
{
pattern {P, R, PORT, IP_PORT}
{mkp:, E1214:, m1, m1ip}
}
And the st.cmd file would contain:
#E1214 Unit (6 DI and 6 Relay)
epicsEnvSet("IP_ADDR","192.168.200.177:502")
epicsEnvSet("IP_PORT","m1ip")
epicsEnvSet("PORT","m1")
< $(MOXA)/st_scripts/st_common.cmd
So the st_common.cmd script hides away the details of setting up the TCP port and the Asyn Modbus ports. A range of Modbus ports are created, each with different word sizes and read/write settings, and then the module specific database
templates choose which ones they need to use for the module in question.
Also includes a set of CS-Studio BOY/DisplayBuilder screens (example attached).
Cheers,
Matt
STS Integrated Control System Lead Engineer
Spallation Neutron Source
Oak Ridge National Lab