If you are running the program on the actual hardware, then the variable assigned to ADC(n) would be what the PLC actually got from the analog channel and you can't change it.
For testing purpose you could skip the running of the actual ADC(n) function and test your program using the variable that the ADC is supposed to be assigned to.
E.g
' DM[1] = ADC(1) ' comment out this statement so that it doesn't run.
IF DM[1]= xxx Then
....
Else
.....
ENDIF
This way you can use online monitoring to change the data in DM[1] and it would not be overwritten by the actual ADC(1).
Alternatively, you can use an internal relay CR1 to control a ladder circuit that trigger a custom function containing the DM[1] = ADC(1) statement. For actual run the relay will be OFF. For testing the relay will be ON:
CR1 others Fn_#1
|---|/|----| |--------{dCusF}
Once CR1 is ON, the Fn_#1 in the above ladder circuit will not run and therefore the DM[1]= ADC(1) function will not be executed and the variable DM[1] can be changed from online monitoring.