Thursday, January 29, 2015

Connecting Artisan to a Coffee-Tech FZ-94 Lab Roaster


The extensive controllability of the FZ-94, a 100g to 2.4kg capacity range lab roaster from Coffee-Tech Engineering, makes it an excellent machine for the development of roast profiles. It features three electric heating elements that can be controlled separately, controls for both, drum speed and air speed, and comes with three build-in temperature probes. The roaster is prepared for data logging using Artisan via its USB connector.


The FZ-94 communicates via the MODBUS RTU protocol via its build-in FTDI-based USB-to-RS485 interface. So the first step to setup the Artisan connection is to install the corresponding FTDI VCP driver for your platform [NOTE: OS X 10.9 and later contain already support for the FTDI hardware and therefore no additional driver needs to be installed on those systems].

Next, we need to select MODBUS as main device type in the Device Assignment dialog (menu Config >> Device).


The serial RS485 communication parameters have to be set in the Serial Ports Configuration dialog (menu Config >> Serial Port). First we set the Comm Port by selecting the correct serial device port from the popup while the roaster is plugged-in to the USB port of the computer. Then we enter the basic serial parameters, which are a baud rate of 2400 and the standard 8N1 configuration as the byte size, parity and stop-bits values.

In the same dialog, we have to specify the MODBUS protocol, slaves, registers and functions to be used to gather the temperature readings from the roaster. The FZ-94 features the following temperature readings.
  • bean temperature (BT): slave 11, register 0 (should be linked to MODBUS Input 1)
  • environmental temperature (ET): slave 13, register 0 (should be linked to MODBUS Input 2)
  • drum space temperature (Drum): slave 12, register 0 (used to control the heating source)

All registers return the values in Celsius and have to be accessed using MODBUS function 3 (read holding register).




Two more configurations are need. The FZ-94 holds the temperature readings in 2 byte integer registers. So a temperature of 180.7C is returned as the integer 1807. Therefore, Artisan has to divide the received values by 10. This is done by specifying corresponding symbolic assignments x/10 in the Device Assignment dialog (menu Config >> Device; tab Symb ET/BT). To get a higher resolution one can use the formula x/10.0 as that way the underlying system creates a floating point number holding a higher resolution.  So 12/10 evaluates to 1, but 12/10.0 to 1.2. [UPDATE: from Artisan v0.9 it is not advised to specify those dividers in symbolic formulas, but to use the new Divider option in the MODBUS tab to 1/10 per input channel]



To access the third temperature retrieved via MODBUS Input 3, we have to add an extra device of type MODBUS_34, again specifying the symbolic assignment x/10.0  [UPDATE: from Artisan v0.9 it is not advised to specify those dividers in symbolic formulas, but to use the new Divider option in the MODBUS tab to 1/10 per input channel]. The second channel of that extra device can be hidden by removing the tick of the corresponding LCD2 and Curve2 controls.

Previous Models


The configuration described above is for the actual model of the FZ-94 as of writing (1/2015). There are previous models that featured a different USB-2-RS485 interface based on the Prolific PL2303 chip. For those models the corresponding Prolific driver has to be installed and the baud rate has to be set to 9600. Further, some older models only have two instead of three probes installed. So in this case, only MODBUS Input 1 and Input 2 should be configured in the Serial Dialogs MODBUS tab with slave id 12 and 13, and Inputs 3 and 4 should be disabled by setting their slave id to 0. Finally, those models use different controller units that needs to be accessed using MODBUS function 4 instead of 3.


Finally, it might be needed to tick the little-endian flag on some configurations to get the readings through. Thanks Martin for this hint!


UPDATE: the FZ-94 setup described above, while still valid, is superseded by  an improved FZ-94 setup enabled by Artisan v1.0, detailed in a series of newer post: Playing with the CTE Lab Roaster

38 comments:

  1. Unfortunately it's not working on my roaster :(

    ReplyDelete
    Replies
    1. Martin, it seems you have a slightly older model of that roaster. I added a section describing the setup for those older machines.

      Delete
    2. Thank you Makro for your efforts, but it's not working my side. The device in my roaster is a CH341 some or other... I have received beta driver from the author who sells his drivers here...

      https://www.mac-usb-serial.com/wordpress/support/specifications-winchiphead-ch340-ch341-hl340-driver/

      But that also isn't working. Any idea what I would be doing wrong or what I might need?

      Delete
    3. BTW, I bought my roaster in January 2014

      Delete
    4. Could you email me : j03ycs@gmail.com?

      Delete
    5. Could you email me : j03ycs@gmail.com?

      Delete
    6. I eventually got it to work, thanks.

      Delete
    7. Dear Martin, could you quickly tell us which setting worked for you? Thanks Marko

      Delete
    8. Thanks Martin for your email. I added a note in the post above about the little-endian flag.

      Delete
  2. Hello,

    I have an older FZ94 and have installed drivers and software as instructed making adjustments for the older model. I get connection, but the readings are not accurate.
    For example, the software stays within 30s to 40s while the machine has heated up to 120.

    Any help will be greatly appreciated.

    ReplyDelete
    Replies
    1. Just a note. I figured out the problem. For some reason the roaster was sending the temperature reading in Celsius, but the setting on the software needed to be set to F (Fahrenheit). With this configuration, also, the "x/10" conversion is not needed.

      Delete
  3. Hello,

    I am trying to set the driver on the Mac G5 OSX 10.7.

    I tried "profilic PL2303"
    http://www.prolific.com.tw/us/showproduct.aspx?p_id=229&pcid=41

    PL-2303 Driver (V2.0.0) and HL-340 / CH-340 / CH-341 Driver (V2.0.0)
    https://www.mac-usb-serial.com/wordpress/support/specifications-winchiphead-ch340-ch341-hl340-driver/

    VCP drivers
    http://www.ftdichip.com/Drivers/VCP.htm

    D2XX
    http://www.ftdichip.com/Drivers/D2XX.htm

    Drivers was instaled. I see new USB2.0 device, but not the FZ-94.. When I run Artisan, I can not display (menu Config >> Serial Port) .. the dialog window not open.

    Please can someone help me with the settings?

    ReplyDelete
  4. Hello,
    since the FZ-94 also has adjustable fan and drum speed: is there a way to get a read-out of those values as well (in order to have it show up in the graph and/or printout)?
    Thanks in advance for a reply about this.

    ReplyDelete
    Replies
    1. Check out: https://artisan-roasterscope.blogspot.de/2016/08/fz-94-3-connecting-drives.html

      Delete
  5. something similar to what you published regarding the Hottop KN-8828B-2K+ is what I am looking for. Any chance that the FZ can be controlled via pre-defined sliders and/or buttons in Artisan?

    ReplyDelete
    Replies
    1. I checked back with CTE and it turned out that with the current machines it is not possible to access the fan or drum speed settings via MODBUS nor control them.

      Delete
    2. Too bad it is not supported on the current models (would've loved to have that data in the graph plus control of those parameters via Artisan as well). Let's hope updates will be made available at some point - that roaster in combination with full "Artisan accessibility" would be my dream-sample-roast-machine
      Thanks for the quick reply

      Delete
    3. There is a small hardware modification that can make it possible: https://artisan-roasterscope.blogspot.de/2016/08/fz-94-3-connecting-drives.html

      Delete
    4. yes, I saw that. Already drilled, connected the cables and set up everything. Thank you very much for the excellent work and documentation!

      Delete
  6. Hello,
    first of all thank you for your detailed instruction.
    But I still have, after checking all your settings problem to get the connection working.
    Following error code is given by artisan:
    readSingleRegister() Modbus Error: [Connection] Failed to connect [rtu baud[9600]] @line 23323
    I tried to configure it with the settings for Prolific PL2303 chip.

    ReplyDelete
  7. Hi
    I'm trying to set up a Windows 10 laptop to use Artisan 0.9.8(7) with a Coffee Tech FZ94 Pro Roaster (purchased new Dec/15) and I'm struggling to get the roaster and software to talk. I've followed your steps above and get an error: ModBus Error::readSingleRegister()...[Connection] Failed to connect.

    The laptop is using USB 3.0. I have tried using the drivers sent with the roaster (Windows 8 - CDM v2.08.30 WHQL Certified for Windows 8.1) and I've also tried installing the FTDI VCP driver from your link above but neither works.

    Do you know if there is a specific USB 3.0/Windows 10 driver that would be better?

    Any help would be gratefully received.

    Many Thanks,

    Phil

    ReplyDelete
  8. Hello,

    I got a brand new FZ-94 yesterday and tried to connect it with Artisan, Mac-version. I made all configurations according to the instructions I found on this web-site but it does not work. Artisan is giving the error message: Modbus error: readSingleRegister() [Errno2) No such file or directory: 'COM11'@line 25215 I would appreciate if you can help me to solve the problem, please.

    ReplyDelete
    Replies
    1. There is no COMnn port on the Mac. Did you really followed all instructions on this post? Did you "First we set the Comm Port by selecting the correct serial device port from the popup while the roaster is plugged-in to the USB port of the computer"? You should select of course the correct serial port your roaster is connected to. Note that on newer Mac OS X system you do not need to install an FTDI driver separately anymore. It is already included in the system and installing an additional driver might even be counter productive and lead to issues.

      Delete
  9. Thank you for your reply, Marko. I have installed FTDI driver to my MacBook. My system version is OS X Yosemite 10.10.5 and I have installed the FTDI driver. I think I followed all your instructions carefully but I will do it again. What do you mean with selecting the correct serial device port from the popup? When I connected FZ to the USB of my MacBook nothing was popping up. Sorry I am not very good with computers. As a Mac user from 1985 I have not needed any special computer skills so far :-)

    ReplyDelete
    Replies
    1. Try Menu Config >> Serial Port, MODBUS tab, "Comm Port" popup, while your roaster is connected via USB.

      Delete
  10. Hi Marko! It is now working beautifully :-) Thank you so much for your advices.

    ReplyDelete
  11. Buen dia, instale todo y me sale un Modbus error: read single register Attempting to use a port that is not open @ line 19505, y despise de un rato se apaga el programa. Saludos

    ReplyDelete
    Replies
    1. Dear Leandro, did you install the serial2usb driver and did you select the correct serial port in the serial settings? It seems that Artisan cannot access the serial device at all. most properly you configured the wrong port or the serial driver does not create the serial port correctly for your roaster.

      Delete
  12. This comment has been removed by the author.

    ReplyDelete
  13. Hi there,
    I've been using artisan in conjunction with my fz-94 and it has been working just fine (roasted > 300 batches in a few months). I hadn't used it in about 4 weeks and now wanted to roast some new samples but I am now getting an erroneous reading of -1.0°C (ET, BT and Drum) although I have not changed anything on my setup (neither in terms of hardware or software).
    USB connection is up and running too. And of course, I've rebooted but nothing seems to help.
    Any clues as to what could be causing this??
    Thanks in advance for any help you might be able to provide!

    ReplyDelete
    Replies
    1. This might be helpful as well in order to proprly diagnose what is causing this... :
      I am getting the following error message "ModBus Error: readSingle Reigster() Modbus Error: [Connection] Failed to connect [rtu baud[2400]]@line23376"
      any ideas?

      Delete
    2. That error indicates that Artisan could not connect to the machine via the specified port. Could you verify that the correct Comm Port is selected in the MODBUS tab?

      Delete
    3. Thank you Marko - that did the trick. It was (no idea why) set to Com5. I set it to USB serial port (Com3) and now it is working again.
      I do find it odd though, since nothing had been changed from my side any I am the only person working on this terminal... oh well, the important part is that it works now. Again, thank you for the great support! :)

      Delete
    4. Strange indeed that this port setting changed. Note that you can save (and load) your Artisan settings to an external file via the menu Help. That way you can exactly preserve one setup, or quickly switch between several setups if needed.

      Delete
  14. Hello Marko!

    i have one problem - i set up a Artisan with your manual, but i have problem with this error:

    readfloat exception response @line 28202

    i have installed a drivers and all of freatures. Where is probleM?

    ReplyDelete
  15. I have only one little problem – i try to connect FZ94 with Artisan software with USB connection. I have setting up the software with this manual:

    https://artisan-roasterscope.blogspot.sk/2015/01/connecting-artisan-to-coffee-tech-fz-94.html

    I have connected to roast machine, but i have only one error massage in software: Error Massage: readFloat() exception response @line 28202

    Please, have you some experience with that? I have installed all drivers, virtual COM drivers etc.

    ReplyDelete