  Our ability to trace the star-forming molecular gas is important to our
understanding of the Universe. We can trace this gas using CO emission,
converting the observed CO intensity into the H$_2$ gas mass of the region
using the CO-to-H$_2$ conversion factor (Xco). In this paper, we use
simulations to study the conversion factor and the molecular gas within
galaxies. We analysed a suite of simulations of isolated disc galaxies, ranging
from dwarfs to Milky Way-mass galaxies, that were run using the FIRE-2 subgrid
models coupled to the CHIMES non-equilibrium chemistry solver. We use the
non-equilibrium abundances from the simulations, and we also compare to results
using abundances assuming equilibrium, which we calculate from the simulation
in post-processing. Our non-equilibrium simulations are able to reproduce the
relation between CO and H$_2$ column densities, and the relation between Xco
and metallicity, seen within observations of the Milky Way. We also compare to
the xCOLD GASS survey, and find agreement with their data to our predicted CO
luminosities at fixed star formation rate. We also find the multivariate
function used by xCOLD GASS overpredicts the H$_2$ mass for our simulations,
motivating us to suggest an alternative multivariate function of our fitting,
though we caution that this fitting is uncertain due to the limited range of
galaxy conditions covered by our simulations. We also find that the
non-equilibrium chemistry has little effect on the conversion factor (<5\%) for
our high-mass galaxies, though still affects the H$_2$ mass and Lco by
$\approx$25\%.
