Hi @Kai!
I would like to add that you can increase the 'speed' of Mervis by removing any "counter" variables that you don't need to use. It's an unfortunate feature of the IDE that there is an enforced 10ms timeout between each ModBus request, and every counter in the current release version of Mervis creates its own request. We have changed this in an upcoming major update to the IDE, but unfortunately I cannot give you a firm date for when it will be released. The program logic in Mervis is however independent of the communication thread and can run at orders of magnitude higher speed.
The underlying system is easily capable of operating with fairly complex logic (even on localhost via Evok, and Evok is written in Python, which considerably limits its speed) at sub-millisecond polling rates; the internal SPI communication bus itself allows for around 20 000 mid-size (~30 bytes) ModBus messages per second (the actual communication speed is 12MHz, but due to overhead and delays between messages the ModBus throughput is somewhat lower). This is why you may find lower-level access more suitable for your purposes than Mervis, which runs as a relatively slow interpreted virtual machine with standard-specified communication rates, and is primarily intended for lower-speed automation.