Monday, April 7, 2014

Virtual Devices and Symbolic Assignments

Artisan supports a wide list of different devices to read data from and to write data to. Several of those devices can be operated in parallel ending up in more temperature channels than one can fit on the display. Could anybody need more?

What about the temperature difference between the ET and the BT curve that indicates the energy momentum in the system? To add a curve representing this, we open the device assignment dialog (menu Config >> Device) and navigate to its second tab "Extra Devices". Let's add an entry to this table by clicking "Add". As device type we select "+VIRTUAL" to specify that the corresponding values are not to be harvested from an external device. Instead we specify two formulas y1 and y2 that should be used to calculate the devices values based on the readings of other devices.

Symbolic Assignments

During roast logging Artisan assigns certain variables to values to make them accessible in such formulas.

  • x : current curve value (unbound for Virtual Devices)
  • Y1 : previous ET value
  • Y2 : previous BT value
  • Y3 : previous Extra #1 T1 value
  • Y4 : previous Extra #1 T2 value
  • Y5 : previous Extra #2 T1 value
  • ETB current background ET
  • BTB current background BT

(last two added in Artisan v0.7.5, and have been renamed to B1 and B2 in v0.9.8)

Here we used the formula "Y1 - Y2 + 100" for our curve named DeltaBTET. It takes the previous ET, subtracts the previous BT and adds an offset of 100. This offset is only to keep the curve drawn in the visible range of the profile. For that curve we decided to draw the curve on the roast profile and also show its actual value during the roast in an extra LCD.  I have two other ET probes connected to channel 3 and 4 of my Phidget as specified by the first extra device. Using the second channel of the virtual device I compute also the delta of those two temperature values in the very same way.


There are a wide range of formulas supported by Artisan, like +, -, *, /, abs(x), … See the help text accessible from the "Symb ET/BT" tab, where one can specify a formula calculating the values for ET and BT of the main device. This is a place one could for example add an offset if a connected probe is badly calibrated.

What about defining an extra LCD that tells us how far off we are from the background profile we try to duplicate? Let's just add another virtual device that gives as exactly this. Luckily virtual devices are not that expensive as their real counterparts;)

Here we take the absolute value of the difference between ET and the background ET as well as between the BT and the background BT. We deactivated the curve drawing for this second virtual device completely. However, two new LCDs will show us the delta in temperature units (either C or F) between the actual ET and BT and their counterparts in the loaded background profile.

What virtual devices will you define?