Thanks Dennis
I tested the commands in MAX, But the problem still exists.
I am attaching one more file which sweeps current and reads the current and voltage (Keithley Nano voltmeter 2182). In this I am using two more device-dependent commands (F0 and F1, command X used to execute F0 and F1). F0X, F1X are working, whereas D0X, D1X, D2X are not.