Extended Modbus Hardware Support

Previously I wrote about simulating a bus for extending Typica's support for devices that speak Modbus RTU. Now there's a pre-release build available that greatly expands Typica's support for that hardware. It's now possible to use devices that present their measurements as 32 bit floating point values such as some of the Watlow controllers that have become popular to use in coffee roasters. It's also possible to read from any number of function 3 or function 4 addresses on any number of devices on the bus rather than the low limits of the old Modbus code.

To try it out, go to the Downloads page and get the Typica-modbusng pre-release build for Windows. If you want to try it on other platforms, check out the modbusng branch on GitHub and compile it. There's nothing platform specific in the new code.

This will give you a new option under "Configure Roasters". Select the roaster you want to add the device to or create a new one and in the "Add Device" drop down select "ModbusNG Port". This puts a new "Modbus RTU Port" node on the left. Here you put in the serial port configuration details which should match how all of the devices on your bus are configured. Then you can click Add Input Channel for as many addresses as you want to read. Double clicking on the new Input item you see will allow you to change the text displayed above the indicator for that input. Here you can specify the details of the address you want to read from.

There's still room for improvement here. Unlike the old code, outputting values to the devices is not yet supported, but I plan to get that in before the next full release, again with no limit on the number of addresses you can write to. It also only supports interpreting values as temperature measurements which isn't great for certain use cases, though if there's interest in using Typica as a roaster control panel instead of just for recording roasting data I think that deserves a broader reconsideration of the user interface which would be easier to do with the Typica 2 code base. At the very least I'd like to add unitless data support before the next release. Missing but not likely to be added before the next release is support for Modbus TCP. Another natural extension would be features supporting some basic automation, but I'm unlikely to find time to work on that before the next release.

Once the new Modbus RTU code reaches feature parity with the old code I'll work on removing the old Modbus communications code from Typica.

While the new code has its own limitations, it does cover all of the most requested use cases raised since adding Modbus RTU support. It's also worth noting that the reason I worked on this now instead of putting it off until Typica 2 is that someone wanted float support enough to pay me to work on that. Typica may be free software, but that doesn't mean that it doesn't take time and money to continue working on that and making it available. Financial support is always appreciated and I take feature requests more seriously if they come from someone who has supported the ongoing development of Typica. I have my own very long list of things that I want to work on already.