There are several ways to do this. Please see Chap. 5 and the corresponding references cited in the attached dissertation.
Also, its been my experience that the command-to-phase curves provided by the SLM manufacturers are quite good. As a matter of fact, I don't even perform this calibration anymore. I suggest you contact the manufacturer of your SLM and ask for the look-up-table (LUT).
You can obtain the phase calibration of the SLM using interferometry which is one of the means to calibrate the SLM. Please note that the phase calibration of the SLM is sensitive to wavelength of the incident light, temperature etc. and it is usually a good practice to calibrate the SLM in laboratory conditions.
Preprint Rapid phase calibration and increased efficiency of a spatia...