
Today I received two devices: a Fuji PXR-4 controller that speaks Modbus and an RS485 to USB adapter (it actually has both a terminal block for RS485 and a DB9 connector for RS232 and will let me use both of those at the same time, presenting two serial ports over 1 USB port). My goals for today were modest.
1) Hook the new controller to a coffee roaster. I brought home my SR1 electric sample roaster for this purpose not intending to roast any coffee on it but to use its thermocouple and power supply for testing purposes. Apply power, verify that I have measurements appearing on the panel.
2) Connect the new controller to the adapter. Plug it into my computer, install the software from the manufacturer and verify that it can communicate with the device.
There’s no sense in writing any code before these are done because I wouldn’t have any way of telling if something wasn’t working because the program was wrong or if it wasn’t working because the hardware wasn’t wired up correctly. This gets me a base line position of hardware works correctly and can communicate with the computer.

Well, I hit a snag on step 1. Before disconnecting the old display, I made sure to document all of its connections. The PXR-4 is half the width of the display the roaster came with so it wasn’t going to be a permanent installation (well, someone must make a plate that converts a 1/8 DIN cutout to 1/16 DIN right? I suppose I could have such a thing made, maybe even with a hole to mount a data port on the panel) but it’s not as if I bought it myself and beggars can’t be choosers. After doing that I went over the model number on the side of the PXR-4 to verify what exactly it was that I had and that’s when I discovered a problem. This model requires a 24VAC/VDC power supply, but the old display operated on 120VAC. It’s not going to work installed in that roaster and I’m not going to fry the part by trying that. A shame as the SR1 is a heavy machine and I could have saved myself some lifting. At least that cat was amused watching me bring it in.
So, plan B. Do I have any 24V power supplies that I’d be able to raid from something else? Nope. Lots of 12V, lots of 9V, but the closest I found to 24V was 19V. Ordered an appropriate transformer for delivery tomorrow and for a thermocouple I’ll just hook it up to my TC calibrator (or I could build a thermocouple, or hook it into the TC extension wires that are coming out of any of my roasters). That setup at least has the advantage of portability.
This part and competing devices are available in a 120VAC. Since my intent at this point was just to add support for continuously reading the PV, not having it in a coffee roaster is no big deal, but in the long term I think it makes sense to let Typica drive the SV. If the capability is already in the hardware, why not let the software take advantage of it? It’s not my first choice of how I’d approach automation, but if I can make it work that would be nice. If not, there are some other potential uses. Heck, even a manual SV control that lets you just type the value you want would be a nice usability improvement over the panel controls. I’ll have to see about getting at least that in for the initial feature set. When I have more time to work on automation, I’ll probably look into getting myself a wider unit in 120VAC.
For now, however, I think it’s time to beat up monsters in a video game. Later tonight I might see about back porting the framework that replaces (and substantially builds on) the DAQ class from the 2.0 development branch which allows for supporting multiple hardware drivers from a single build. In the interest of getting to the point that I can release a β test version quickly I’m not going to back port all of it (on the 2.0 branch I ripped out the Measurement class and replaced it with QVariantMap: a little more overhead in non-bottleneck parts of the code in exchange for a lot more expressiveness, but that means changes to everything that was previously producing or consuming those Measurement objects) but it would be nice if a single build for each platform supported all of the hardware. For the β release I’m unlikely to worry about anything other than Modbus over serial port devices, but it would be nice if version 1.4 had support at least for NI DAQmxBase devices (NI USB 9211, NI USB 9211A but possibly others as well), NI DAQmx devices (NI USB TC01, various 9211 based devices, possibly others, mostly Windows only with possible limited device support on Linux if you can figure out how to compile it yourself), Modbus RTU over serial port devices, and possibly also the Extech EX540 multimeter (there are a couple quirks that still need to be ironed out to get that working on the 1.x branch but even if I don’t have time for that I can apply a trivial hack that will work around the main issue) without needing separate builds for all of them on each platform. The other big thing I want to back port is a widget that hooks into that framework for configuring these devices. It probably won’t be as flexible as what I’ve been doing on the 2.0 branch (some of you want some pretty crazy configurations and I’m probably going to stick with the wait until 2.0 line for those) but that would let me drop down to only needing to maintain a single configuration (at which point I may as well just provide a setting for where that is, compile the default configuration in as a resource, and drop the configuration file prompt, one less step to using the program). Not sure how far I’ll get on that, but that’s what I’d like to do.