diff --git a/iexcode/instruments/diagnostics.py b/iexcode/instruments/diagnostics.py
index 692ed319a67f1565d88588f0925c8beaef5d623b..90c3ed0c6f2e2bbf6df675f87a073beee9f1d823 100644
--- a/iexcode/instruments/diagnostics.py
+++ b/iexcode/instruments/diagnostics.py
@@ -96,7 +96,7 @@ def diagnostics_sp_read(diag_name,preset_name):
 def _diagnostics_sp_write(diag_name,preset_name,val):
     pv = _diagnostics_preset_pv(diag_name,preset_name)
     #need to make this an input question, are you sure?
-    print('caput(+'pv+'_Setpoint.VAL,'+str(val)+')'
+    print('caput('+pv+'_Setpoint.VAL,'+str(val)+')'
     
 
 ##############################################################################################################