|This article is about an older version of DF.|
A quern is a single-square workshop used to grind certain plants into sugar, flour, dye, and slurry. Each milling job requires an empty bag, as the process will also produce seeds from plants being milled. Unlike a millstone, the quern is powered by the dwarf using it to perform the labor. A uern must be created at a Mason's workshop before it can be built as a workshop.
The quern may also be used to mill seeds/nuts to paste.
Ensuring the exclusive milling of certain plants (to, say, produce only dye, not flour) is cumbersome. It requires a stockpile that only allows these plants and setting it to -'ive To A Pile/Workshop', as the quern provides no menu to specify what to mill. You also need a furniture stockpile that allows only bags (deactivate wood, stone and metal as material to avoid it being cluttered with coffers,) setting that to 'giving' to the quern too. It doesn't need to be two separate stockpiles, as the custom menu does allow item commingling.
If you don't set custom stockpile(s), the miller will pick the closest random plant and bag, with the usual, occasionally surprising definition of closest. Additionally, you have to ensure somehow that the plants arrive at the right stockpile, for example by not allowing them on any other. Once you got this working, repeat for every other plant you want to mill, either switching the 'give' orders every time or setting up a separate quern for every plant combination.
For general details read Giving to a Stockpile/Workshop.
Alternatively, to preserve what little sanity a DF player has left, just forbid all millable plants you don't want milled (for example from the stocks menu) and (re-)claim them once the milling job is done.
As another alternative, the utility DFHack provides a "job item-material" command that allows you to specify a plant to mill.
Command for building: --