Say I have a continous plant which is controlled by a digital controller. In order to apply methods from discrete control, I can change from the continous $s$-domain to the discrete $z$-domain. Now say I have plant $G(s)$, controller $R(s)$ and closed loop system $G_R(s)$
$$ G_R(s)=\frac{G(s)R(s)}{1 + G(s)R(s)} $$
Should I discretize first $G(s)$ and $R(s)$ individually to compute from them the discrete $G_R(z)$ or should I directly discretize the continous $G_R(s)$?
I ask because in Matlab I get the problem that I get a different closed loop behavior depending on that order...
Edit: By discretization I mean the Matlab command c2d which transforms a transfer function from continous (Laplace) to discrete, for example with ZOH sampling.
By using a discrete controller you have to implement a controller in the z-domain and you indirectly also discretise your plant. The discetization of your plant is because the controller will only consider outputs from the plant at a fixed sample rate and the controller will usually hold its output constant during one such sample time. So I would say to discretise the controller and plant before closing the loop. When discretizing I would use ZOH for the plant and preferably Tustin with pre-warping for the controller (or design the controller directly in the z-domain).
Often the biggest difference between $G(s)$ and it discretized with ZOH is that it adds delay and thus a phase drop proportional to frequency. The DAC, ADC, computing the controllers output and maybe some other factors can add some additional delay to the plant. Delay will affect the phase margin of your closed loop, so too much delay might make it unstable. If you want to design a digital controller for $G(s)$ in real life then I would recommend to measure its frequency response function or use some other system identification method to be sure about the amount of delay your system has.