yes, you can. There are three ways how to communicate with IOs from your program:
ModbusTCP server - local process running on port TCP/502 making the IOs available via Modbus coils and registers. You can read more about the Modbus Registers Maps
EVOK - all sorts of web APIs (json, rest, websocket,...), more information here
SysFS - IOs are made available through a virtual filesystem, more information here
But it depends on which unit you use.