diff --git a/src/EEHGMaster.py b/src/EEHGMaster.py
index 237c981a9a7e6641e028d722145ae03637a22c63..68fd5c0f3a94ee215aa5588e280e5a2377a6513f 100755
--- a/src/EEHGMaster.py
+++ b/src/EEHGMaster.py
@@ -370,8 +370,10 @@ class EEHGMaster(Device):
         access=AttrWriteType.READ_WRITE,
         label="r561_off_abs",
         unit="um",
+        max_value=10,
+        min_value=0,
         memorized=True,
-        doc="the value applied to the dispersion is changed according to r561_machine = r561*(1+r561_off_perc/100)+r561_off_abs",
+        doc="the value applied to the dispersion is changed according to r561_machine = r561* r561_off_perc + r561_off_abs",
     )
 
     r561_off_perc = attribute(
@@ -379,8 +381,10 @@ class EEHGMaster(Device):
         access=AttrWriteType.READ_WRITE,
         label="r561_off_perc",
         unit="%",
+        max_value=1.6,
+        min_value=0.4,
         memorized=True,
-        doc="the value applied to the dispersion is changed according to r561_machine = r561*(1+r561_off_perc/100)+r561_off_abs",
+        doc="the value applied to the dispersion is changed according to r561_machine = r561*r561_off_perc + r561_off_abs",
     )
 
     r561_machine = attribute(
@@ -420,6 +424,8 @@ class EEHGMaster(Device):
         access=AttrWriteType.READ_WRITE,
         label="r562_off_abs",
         unit="um",
+        max_value=300,
+        min_value=0,
         memorized=True,
     )
 
@@ -428,8 +434,10 @@ class EEHGMaster(Device):
         access=AttrWriteType.READ_WRITE,
         label="r562_off_perc",
         unit="%",
+        max_value=1.6,
+        min_value=0.4,
         memorized=True,
-        doc="the value applied to the dispersion is changed according to R56_machine = R56*(1+r56_off_perc/100)+r56_off_abs",
+        doc="the value applied to the dispersion is changed according to R56_machine = R56 * 56_off_perc + r56_off_abs",
     )
 
     r562_machine = attribute(
@@ -861,6 +869,14 @@ class EEHGMaster(Device):
         self._fel_mode = value
         # PROTECTED REGION END #    //  EEHGMaster.fel_mode_write
 
+    def is_fel_mode_allowed(self, attr):
+        # PROTECTED REGION ID(EEHGMaster.is_fel_mode_allowed) ENABLED START #
+        if attr==attr.READ_REQ:
+            return True
+        else:
+            return self.get_state() not in [DevState.RUNNING,DevState.MOVING,DevState.FAULT,DevState.ALARM,DevState.UNKNOWN]
+        # PROTECTED REGION END #    //  EEHGMaster.is_fel_mode_allowed
+
     def read_n(self):
         # PROTECTED REGION ID(EEHGMaster.n_read) ENABLED START #
         """Return the n attribute."""
@@ -900,6 +916,14 @@ class EEHGMaster(Device):
         self.m.set_write_value(value)
         # PROTECTED REGION END #    //  EEHGMaster.m_write
 
+    def is_m_allowed(self, attr):
+        # PROTECTED REGION ID(EEHGMaster.is_m_allowed) ENABLED START #
+        if attr==attr.READ_REQ:
+            return True
+        else:
+            return self.get_state() not in [DevState.RUNNING,DevState.MOVING,DevState.FAULT,DevState.ALARM,DevState.UNKNOWN]
+        # PROTECTED REGION END #    //  EEHGMaster.is_m_allowed
+
     def read_n_fixed(self):
         # PROTECTED REGION ID(EEHGMaster.n_fixed_read) ENABLED START #
         """Return the n_fixed attribute."""
@@ -912,6 +936,14 @@ class EEHGMaster(Device):
         pass
         # PROTECTED REGION END #    //  EEHGMaster.n_fixed_write
 
+    def is_n_fixed_allowed(self, attr):
+        # PROTECTED REGION ID(EEHGMaster.is_n_fixed_allowed) ENABLED START #
+        if attr==attr.READ_REQ:
+            return self.get_state() not in [DevState.RUNNING,DevState.MOVING]
+        else:
+            return self.get_state() not in [DevState.RUNNING,DevState.MOVING]
+        # PROTECTED REGION END #    //  EEHGMaster.is_n_fixed_allowed
+
     def read_m_fixed(self):
         # PROTECTED REGION ID(EEHGMaster.m_fixed_read) ENABLED START #
         """Return the m_fixed attribute."""
@@ -924,12 +956,25 @@ class EEHGMaster(Device):
         pass
         # PROTECTED REGION END #    //  EEHGMaster.m_fixed_write
 
+    def is_m_fixed_allowed(self, attr):
+        # PROTECTED REGION ID(EEHGMaster.is_m_fixed_allowed) ENABLED START #
+        if attr==attr.READ_REQ:
+            return self.get_state() not in [DevState.RUNNING,DevState.MOVING]
+        else:
+            return self.get_state() not in [DevState.RUNNING,DevState.MOVING]
+        # PROTECTED REGION END #    //  EEHGMaster.is_m_fixed_allowed
+
     def read_n_solution(self):
         # PROTECTED REGION ID(EEHGMaster.n_solution_read) ENABLED START #
         """Return the n_solution attribute."""
         return self._n_solution
         # PROTECTED REGION END #    //  EEHGMaster.n_solution_read
 
+    def is_n_solution_allowed(self, attr):
+        # PROTECTED REGION ID(EEHGMaster.is_n_solution_allowed) ENABLED START #
+        return self.get_state() not in [DevState.RUNNING,DevState.MOVING]
+        # PROTECTED REGION END #    //  EEHGMaster.is_n_solution_allowed
+
     def read_i_solution(self):
         # PROTECTED REGION ID(EEHGMaster.i_solution_read) ENABLED START #
         """Return the i_solution attribute."""
@@ -942,6 +987,14 @@ class EEHGMaster(Device):
         self._i_solution = value
         # PROTECTED REGION END #    //  EEHGMaster.i_solution_write
 
+    def is_i_solution_allowed(self, attr):
+        # PROTECTED REGION ID(EEHGMaster.is_i_solution_allowed) ENABLED START #
+        if attr==attr.READ_REQ:
+            return self.get_state() not in [DevState.RUNNING,DevState.MOVING]
+        else:
+            return True
+        # PROTECTED REGION END #    //  EEHGMaster.is_i_solution_allowed
+
     def read_prior_wl_seed(self):
         # PROTECTED REGION ID(EEHGMaster.prior_wl_seed_read) ENABLED START #
         """Return the prior_wl_seed attribute."""
@@ -956,6 +1009,14 @@ class EEHGMaster(Device):
             
         # PROTECTED REGION END #    //  EEHGMaster.prior_wl_seed_write
 
+    def is_prior_wl_seed_allowed(self, attr):
+        # PROTECTED REGION ID(EEHGMaster.is_prior_wl_seed_allowed) ENABLED START #
+        if attr==attr.READ_REQ:
+            return True
+        else:
+            return self.get_state() not in [DevState.RUNNING,DevState.MOVING]
+        # PROTECTED REGION END #    //  EEHGMaster.is_prior_wl_seed_allowed
+
     def read_prior_bunch(self):
         # PROTECTED REGION ID(EEHGMaster.prior_bunch_read) ENABLED START #
         """Return the prior_bunch attribute."""
@@ -969,6 +1030,14 @@ class EEHGMaster(Device):
         self._prior_wl_seed = not value
         # PROTECTED REGION END #    //  EEHGMaster.prior_bunch_write
 
+    def is_prior_bunch_allowed(self, attr):
+        # PROTECTED REGION ID(EEHGMaster.is_prior_bunch_allowed) ENABLED START #
+        if attr==attr.READ_REQ:
+            return True
+        else:
+            return self.get_state() not in [DevState.RUNNING,DevState.MOVING]
+        # PROTECTED REGION END #    //  EEHGMaster.is_prior_bunch_allowed
+
     def read_bunc_fel(self):
         # PROTECTED REGION ID(EEHGMaster.bunc_fel_read) ENABLED START #
         """Return the bunc_fel attribute."""
@@ -1000,6 +1069,14 @@ class EEHGMaster(Device):
         self.lambda_fel.set_write_value(value)
         # PROTECTED REGION END #    //  EEHGMaster.lambda_fel_write
 
+    def is_lambda_fel_allowed(self, attr):
+        # PROTECTED REGION ID(EEHGMaster.is_lambda_fel_allowed) ENABLED START #
+        if attr==attr.READ_REQ:
+            return True
+        else:
+            return self.get_state() not in [DevState.RUNNING,DevState.MOVING]
+        # PROTECTED REGION END #    //  EEHGMaster.is_lambda_fel_allowed
+
     def read_lambda_fel_curr(self):
         # PROTECTED REGION ID(EEHGMaster.lambda_fel_curr_read) ENABLED START #
         """Return the lambda_fel_curr attribute."""
@@ -1012,6 +1089,14 @@ class EEHGMaster(Device):
         pass
         # PROTECTED REGION END #    //  EEHGMaster.lambda_fel_curr_write
 
+    def is_lambda_fel_curr_allowed(self, attr):
+        # PROTECTED REGION ID(EEHGMaster.is_lambda_fel_curr_allowed) ENABLED START #
+        if attr==attr.READ_REQ:
+            return True
+        else:
+            return self.get_state() not in [DevState.RUNNING,DevState.MOVING,DevState.FAULT]
+        # PROTECTED REGION END #    //  EEHGMaster.is_lambda_fel_curr_allowed
+
     def read_a1(self):
         # PROTECTED REGION ID(EEHGMaster.a1_read) ENABLED START #
         """Return the a1 attribute."""
@@ -1077,6 +1162,14 @@ class EEHGMaster(Device):
         self._nrg_s2_fix = not value
         # PROTECTED REGION END #    //  EEHGMaster.a1_fix_write
 
+    def is_a1_fix_allowed(self, attr):
+        # PROTECTED REGION ID(EEHGMaster.is_a1_fix_allowed) ENABLED START #
+        if attr==attr.READ_REQ:
+            return True
+        else:
+            return self.get_state() not in [DevState.RUNNING,DevState.MOVING]
+        # PROTECTED REGION END #    //  EEHGMaster.is_a1_fix_allowed
+
     def read_a2(self):
         # PROTECTED REGION ID(EEHGMaster.a2_read) ENABLED START #
         """Return the a2 attribute."""
@@ -1143,6 +1236,14 @@ class EEHGMaster(Device):
 
         # PROTECTED REGION END #    //  EEHGMaster.a2_fix_write
 
+    def is_a2_fix_allowed(self, attr):
+        # PROTECTED REGION ID(EEHGMaster.is_a2_fix_allowed) ENABLED START #
+        if attr==attr.READ_REQ:
+            return True
+        else:
+            return self.get_state() not in [DevState.RUNNING,DevState.MOVING]
+        # PROTECTED REGION END #    //  EEHGMaster.is_a2_fix_allowed
+
     def read_e_nrg_fel(self):
         # PROTECTED REGION ID(EEHGMaster.e_nrg_fel_read) ENABLED START #
         """Return the e_nrg_fel attribute."""
@@ -2167,6 +2268,24 @@ class EEHGMaster(Device):
         return self.get_state() not in [DevState.RUNNING]
         # PROTECTED REGION END #    //  EEHGMaster.is_ApplyIDs_allowed
 
+    @command(
+    )
+    @DebugIt()
+    def ApplyAll(self):
+        # PROTECTED REGION ID(EEHGMaster.ApplyAll) ENABLED START #
+        """
+        with this command All Applys will b performed
+
+        :return:None
+        """
+        pass
+        # PROTECTED REGION END #    //  EEHGMaster.ApplyAll
+
+    def is_ApplyAll_allowed(self):
+        # PROTECTED REGION ID(EEHGMaster.is_ApplyAll_allowed) ENABLED START #
+        return self.get_state() not in [DevState.RUNNING,DevState.MOVING,DevState.FAULT]
+        # PROTECTED REGION END #    //  EEHGMaster.is_ApplyAll_allowed
+
 # ----------
 # Run server
 # ----------
diff --git a/src/EEHGMaster.xmi b/src/EEHGMaster.xmi
index 84341d6aeaca967f30541fdfe14ce1826d9f3b3d..1e0cc3e75aa1934e5dc6772cb892535dc0b513dd 100644
--- a/src/EEHGMaster.xmi
+++ b/src/EEHGMaster.xmi
@@ -99,6 +99,8 @@
       </argout>
       <status abstract="false" inherited="false" concrete="true" concreteHere="true"/>
       <excludedStates>RUNNING</excludedStates>
+      <excludedStates>MOVING</excludedStates>
+      <excludedStates>FAULT</excludedStates>
     </commands>
     <commands name="ApplySeeds" description="Applica la soluzione al device master del seed" execMethod="apply_seeds" displayLevel="OPERATOR" polledPeriod="0" isDynamic="false">
       <argin description="">
@@ -109,6 +111,8 @@
       </argout>
       <status abstract="false" inherited="false" concrete="true" concreteHere="true"/>
       <excludedStates>RUNNING</excludedStates>
+      <excludedStates>MOVING</excludedStates>
+      <excludedStates>FAULT</excludedStates>
     </commands>
     <commands name="ApplyIDs" description="Apply per settare gli ondulatori" execMethod="apply_ids" displayLevel="OPERATOR" polledPeriod="0" isDynamic="false">
       <argin description="">
@@ -119,6 +123,20 @@
       </argout>
       <status abstract="false" inherited="false" concrete="true" concreteHere="true"/>
       <excludedStates>RUNNING</excludedStates>
+      <excludedStates>MOVING</excludedStates>
+      <excludedStates>FAULT</excludedStates>
+    </commands>
+    <commands name="ApplyAll" description="with this command All Applys will b performed" execMethod="apply_all" displayLevel="OPERATOR" polledPeriod="0" isDynamic="false">
+      <argin description="">
+        <type xsi:type="pogoDsl:VoidType"/>
+      </argin>
+      <argout description="">
+        <type xsi:type="pogoDsl:VoidType"/>
+      </argout>
+      <status abstract="false" inherited="false" concrete="true" concreteHere="true"/>
+      <excludedStates>RUNNING</excludedStates>
+      <excludedStates>MOVING</excludedStates>
+      <excludedStates>FAULT</excludedStates>
     </commands>
     <attributes name="fel_mode" attType="Scalar" rwType="READ_WRITE" displayLevel="OPERATOR" polledPeriod="0" maxX="" maxY="" memorized="true" memorizedAtInit="true" allocReadMember="true" isDynamic="false">
       <dataType xsi:type="pogoDsl:ShortType"/>
@@ -127,6 +145,11 @@
       <dataReadyEvent fire="false" libCheckCriteria="true"/>
       <status abstract="false" inherited="false" concrete="true" concreteHere="true"/>
       <properties description="FEL operation mode:&#xA;EEHG&#xA;HGHG1&#xA;HGHG1*&#xA;HGHG2&#xA;&#xA;Specify how the FEL will be operated. &#xA;Value:&#xA;0 - EEHG is clear. &#xA;1 - HGHG1, means that one use seed1 on mod1 to to standard HGHG. &#xA;2 - HGHG1*, means that one use seed1 on mod2 to to standard HGHG. &#xA;3 - HGHG2 means that seed2 is used on mod2 for standard HGHG. &#xA;&#xA;This setting define the method to be used for calculating the required configuration" label="operation mode" unit="" standardUnit="" displayUnit="" format="" maxValue="3" minValue="0" maxAlarm="" minAlarm="" maxWarning="" minWarning="" deltaTime="" deltaValue=""/>
+      <writeExcludedStates>RUNNING</writeExcludedStates>
+      <writeExcludedStates>MOVING</writeExcludedStates>
+      <writeExcludedStates>FAULT</writeExcludedStates>
+      <writeExcludedStates>ALARM</writeExcludedStates>
+      <writeExcludedStates>UNKNOWN</writeExcludedStates>
     </attributes>
     <attributes name="n" attType="Scalar" rwType="READ_WRITE" displayLevel="OPERATOR" polledPeriod="0" maxX="" maxY="" memorized="true" allocReadMember="true" isDynamic="false">
       <dataType xsi:type="pogoDsl:ShortType"/>
@@ -147,6 +170,11 @@
       <dataReadyEvent fire="false" libCheckCriteria="true"/>
       <status abstract="false" inherited="false" concrete="true" concreteHere="true"/>
       <properties description="The harmonic of the second seed used in EEHG or in HGHG2" label="harmonic of the second seed" unit="" standardUnit="" displayUnit="" format="" maxValue="80" minValue="0" maxAlarm="" minAlarm="" maxWarning="" minWarning="" deltaTime="" deltaValue=""/>
+      <writeExcludedStates>RUNNING</writeExcludedStates>
+      <writeExcludedStates>MOVING</writeExcludedStates>
+      <writeExcludedStates>FAULT</writeExcludedStates>
+      <writeExcludedStates>ALARM</writeExcludedStates>
+      <writeExcludedStates>UNKNOWN</writeExcludedStates>
     </attributes>
     <attributes name="n_fixed" attType="Scalar" rwType="READ_WRITE" displayLevel="OPERATOR" polledPeriod="0" maxX="" maxY="" memorized="true" allocReadMember="true" isDynamic="false">
       <dataType xsi:type="pogoDsl:BooleanType"/>
@@ -155,6 +183,10 @@
       <dataReadyEvent fire="false" libCheckCriteria="true"/>
       <status abstract="false" inherited="false" concrete="true" concreteHere="true"/>
       <properties description="keep n fix in the calculation" label="n fixed" unit="" standardUnit="" displayUnit="" format="" maxValue="" minValue="" maxAlarm="" minAlarm="" maxWarning="" minWarning="" deltaTime="" deltaValue=""/>
+      <readExcludedStates>RUNNING</readExcludedStates>
+      <readExcludedStates>MOVING</readExcludedStates>
+      <writeExcludedStates>RUNNING</writeExcludedStates>
+      <writeExcludedStates>MOVING</writeExcludedStates>
     </attributes>
     <attributes name="m_fixed" attType="Scalar" rwType="READ_WRITE" displayLevel="OPERATOR" polledPeriod="0" maxX="" maxY="" memorized="true" allocReadMember="true" isDynamic="false">
       <dataType xsi:type="pogoDsl:BooleanType"/>
@@ -163,6 +195,10 @@
       <dataReadyEvent fire="false" libCheckCriteria="true"/>
       <status abstract="false" inherited="false" concrete="true" concreteHere="true"/>
       <properties description="keep m fix in the calculation" label="m fixed" unit="" standardUnit="" displayUnit="" format="" maxValue="" minValue="" maxAlarm="" minAlarm="" maxWarning="" minWarning="" deltaTime="" deltaValue=""/>
+      <readExcludedStates>RUNNING</readExcludedStates>
+      <readExcludedStates>MOVING</readExcludedStates>
+      <writeExcludedStates>RUNNING</writeExcludedStates>
+      <writeExcludedStates>MOVING</writeExcludedStates>
     </attributes>
     <attributes name="n_solution" attType="Scalar" rwType="READ" displayLevel="OPERATOR" polledPeriod="0" maxX="" maxY="" allocReadMember="true" isDynamic="false">
       <dataType xsi:type="pogoDsl:ShortType"/>
@@ -171,6 +207,8 @@
       <dataReadyEvent fire="false" libCheckCriteria="true"/>
       <status abstract="false" inherited="false" concrete="true" concreteHere="true"/>
       <properties description="Number of solutions found with the calculation" label="n solution" unit="" standardUnit="" displayUnit="" format="" maxValue="" minValue="" maxAlarm="" minAlarm="" maxWarning="" minWarning="" deltaTime="" deltaValue=""/>
+      <readExcludedStates>RUNNING</readExcludedStates>
+      <readExcludedStates>MOVING</readExcludedStates>
     </attributes>
     <attributes name="i_solution" attType="Scalar" rwType="READ_WRITE" displayLevel="OPERATOR" polledPeriod="0" maxX="" maxY="" allocReadMember="true" isDynamic="false">
       <dataType xsi:type="pogoDsl:ShortType"/>
@@ -179,6 +217,8 @@
       <dataReadyEvent fire="false" libCheckCriteria="true"/>
       <status abstract="false" inherited="false" concrete="true" concreteHere="true"/>
       <properties description="Applied solution from the ones founded" label="Applied solution" unit="" standardUnit="" displayUnit="" format="" maxValue="" minValue="" maxAlarm="" minAlarm="" maxWarning="" minWarning="" deltaTime="" deltaValue=""/>
+      <readExcludedStates>RUNNING</readExcludedStates>
+      <readExcludedStates>MOVING</readExcludedStates>
     </attributes>
     <attributes name="prior_wl_seed" attType="Scalar" rwType="READ_WRITE" displayLevel="OPERATOR" polledPeriod="0" maxX="" maxY="" allocReadMember="true" isDynamic="false">
       <dataType xsi:type="pogoDsl:BooleanType"/>
@@ -187,6 +227,8 @@
       <dataReadyEvent fire="false" libCheckCriteria="true"/>
       <status abstract="false" inherited="false" concrete="true" concreteHere="true"/>
       <properties description="priority to wl_seed closed to present" label="prior_wl_seed" unit="" standardUnit="" displayUnit="" format="" maxValue="" minValue="" maxAlarm="" minAlarm="" maxWarning="" minWarning="" deltaTime="" deltaValue=""/>
+      <writeExcludedStates>RUNNING</writeExcludedStates>
+      <writeExcludedStates>MOVING</writeExcludedStates>
     </attributes>
     <attributes name="prior_bunch" attType="Scalar" rwType="READ_WRITE" displayLevel="OPERATOR" polledPeriod="0" maxX="" maxY="" allocReadMember="true" isDynamic="false">
       <dataType xsi:type="pogoDsl:BooleanType"/>
@@ -195,6 +237,8 @@
       <dataReadyEvent fire="false" libCheckCriteria="true"/>
       <status abstract="false" inherited="false" concrete="true" concreteHere="true"/>
       <properties description="Give the priority to the solution that has larger bunching" label="prior_bunch" unit="" standardUnit="" displayUnit="" format="" maxValue="" minValue="" maxAlarm="" minAlarm="" maxWarning="" minWarning="" deltaTime="" deltaValue=""/>
+      <writeExcludedStates>RUNNING</writeExcludedStates>
+      <writeExcludedStates>MOVING</writeExcludedStates>
     </attributes>
     <attributes name="bunc_fel" attType="Scalar" rwType="READ" displayLevel="OPERATOR" polledPeriod="0" maxX="" maxY="" allocReadMember="true" isDynamic="false">
       <dataType xsi:type="pogoDsl:DoubleType"/>
@@ -219,6 +263,8 @@
       <dataReadyEvent fire="false" libCheckCriteria="true"/>
       <status abstract="false" inherited="false" concrete="true" concreteHere="true"/>
       <properties description="The FEL wavelength, it could be always in agreement with photon energy, if used" label="fel wavelength" unit="" standardUnit="" displayUnit="" format="" maxValue="25" minValue="5" maxAlarm="" minAlarm="" maxWarning="" minWarning="" deltaTime="" deltaValue=""/>
+      <writeExcludedStates>RUNNING</writeExcludedStates>
+      <writeExcludedStates>MOVING</writeExcludedStates>
     </attributes>
     <attributes name="lambda_fel_curr" attType="Scalar" rwType="READ_WRITE" displayLevel="OPERATOR" polledPeriod="0" maxX="" maxY="" allocReadMember="true" isDynamic="false">
       <dataType xsi:type="pogoDsl:DoubleType"/>
@@ -227,6 +273,9 @@
       <dataReadyEvent fire="false" libCheckCriteria="true"/>
       <status abstract="false" inherited="false" concrete="true" concreteHere="true"/>
       <properties description="The current values for thiese variable as read from the machine" label="" unit="" standardUnit="" displayUnit="" format="" maxValue="" minValue="" maxAlarm="" minAlarm="" maxWarning="" minWarning="" deltaTime="" deltaValue=""/>
+      <writeExcludedStates>RUNNING</writeExcludedStates>
+      <writeExcludedStates>MOVING</writeExcludedStates>
+      <writeExcludedStates>FAULT</writeExcludedStates>
     </attributes>
     <attributes name="a1" attType="Scalar" rwType="READ_WRITE" displayLevel="OPERATOR" polledPeriod="0" maxX="" maxY="" memorized="true" allocReadMember="true" isDynamic="false">
       <dataType xsi:type="pogoDsl:DoubleType"/>
@@ -267,6 +316,8 @@
       <dataReadyEvent fire="false" libCheckCriteria="true"/>
       <status abstract="false" inherited="false" concrete="true" concreteHere="true"/>
       <properties description="This is used to keep A1 and seed1 energy fixed in the optimization (default)" label="a1_fix" unit="" standardUnit="" displayUnit="" format="" maxValue="" minValue="" maxAlarm="" minAlarm="" maxWarning="" minWarning="" deltaTime="" deltaValue=""/>
+      <writeExcludedStates>RUNNING</writeExcludedStates>
+      <writeExcludedStates>MOVING</writeExcludedStates>
     </attributes>
     <attributes name="a2" attType="Scalar" rwType="READ_WRITE" displayLevel="OPERATOR" polledPeriod="0" maxX="" maxY="" allocReadMember="true" isDynamic="false">
       <dataType xsi:type="pogoDsl:DoubleType"/>
@@ -307,6 +358,8 @@
       <dataReadyEvent fire="false" libCheckCriteria="true"/>
       <status abstract="false" inherited="false" concrete="true" concreteHere="true"/>
       <properties description="This is used to keep A2 and seed2 energy fixed in the optimization, by default is false sto allow optimiziation of this parameter" label="a2_fix" unit="" standardUnit="" displayUnit="" format="" maxValue="" minValue="" maxAlarm="" minAlarm="" maxWarning="" minWarning="" deltaTime="" deltaValue=""/>
+      <writeExcludedStates>RUNNING</writeExcludedStates>
+      <writeExcludedStates>MOVING</writeExcludedStates>
     </attributes>
     <attributes name="e_nrg_fel" attType="Scalar" rwType="READ_WRITE" displayLevel="OPERATOR" polledPeriod="0" maxX="" maxY="" allocReadMember="true" isDynamic="false">
       <dataType xsi:type="pogoDsl:DoubleType"/>
@@ -378,7 +431,7 @@
       <archiveEvent fire="false" libCheckCriteria="false"/>
       <dataReadyEvent fire="false" libCheckCriteria="true"/>
       <status abstract="false" inherited="false" concrete="true" concreteHere="true"/>
-      <properties description="the value applied to the dispersion is changed according to r561_machine = r561*(1+r561_off_perc/100)+r561_off_abs" label="r561_off_abs" unit="um" standardUnit="" displayUnit="" format="" maxValue="" minValue="" maxAlarm="" minAlarm="" maxWarning="" minWarning="" deltaTime="" deltaValue=""/>
+      <properties description="the value applied to the dispersion is changed according to r561_machine = r561* r561_off_perc + r561_off_abs" label="r561_off_abs" unit="um" standardUnit="" displayUnit="" format="" maxValue="10" minValue="0" maxAlarm="" minAlarm="" maxWarning="" minWarning="" deltaTime="" deltaValue=""/>
     </attributes>
     <attributes name="r561_off_perc" attType="Scalar" rwType="READ_WRITE" displayLevel="OPERATOR" polledPeriod="0" maxX="" maxY="" memorized="true" allocReadMember="true" isDynamic="false">
       <dataType xsi:type="pogoDsl:DoubleType"/>
@@ -386,7 +439,7 @@
       <archiveEvent fire="false" libCheckCriteria="false"/>
       <dataReadyEvent fire="false" libCheckCriteria="true"/>
       <status abstract="false" inherited="false" concrete="true" concreteHere="true"/>
-      <properties description="the value applied to the dispersion is changed according to r561_machine = r561*(1+r561_off_perc/100)+r561_off_abs" label="r561_off_perc" unit="%" standardUnit="" displayUnit="" format="" maxValue="" minValue="" maxAlarm="" minAlarm="" maxWarning="" minWarning="" deltaTime="" deltaValue=""/>
+      <properties description="the value applied to the dispersion is changed according to r561_machine = r561*r561_off_perc + r561_off_abs" label="r561_off_perc" unit="%" standardUnit="" displayUnit="" format="" maxValue="1.6" minValue="0.4" maxAlarm="" minAlarm="" maxWarning="" minWarning="" deltaTime="" deltaValue=""/>
     </attributes>
     <attributes name="r561_machine" attType="Scalar" rwType="READ" displayLevel="OPERATOR" polledPeriod="0" maxX="" maxY="" allocReadMember="true" isDynamic="false">
       <dataType xsi:type="pogoDsl:DoubleType"/>
@@ -426,7 +479,7 @@
       <archiveEvent fire="false" libCheckCriteria="false"/>
       <dataReadyEvent fire="false" libCheckCriteria="true"/>
       <status abstract="false" inherited="false" concrete="true" concreteHere="true"/>
-      <properties description="" label="r562_off_abs" unit="um" standardUnit="" displayUnit="" format="" maxValue="" minValue="" maxAlarm="" minAlarm="" maxWarning="" minWarning="" deltaTime="" deltaValue=""/>
+      <properties description="" label="r562_off_abs" unit="um" standardUnit="" displayUnit="" format="" maxValue="300" minValue="0" maxAlarm="" minAlarm="" maxWarning="" minWarning="" deltaTime="" deltaValue=""/>
     </attributes>
     <attributes name="r562_off_perc" attType="Scalar" rwType="READ_WRITE" displayLevel="OPERATOR" polledPeriod="0" maxX="" maxY="" memorized="true" allocReadMember="true" isDynamic="false">
       <dataType xsi:type="pogoDsl:DoubleType"/>
@@ -434,7 +487,7 @@
       <archiveEvent fire="false" libCheckCriteria="false"/>
       <dataReadyEvent fire="false" libCheckCriteria="true"/>
       <status abstract="false" inherited="false" concrete="true" concreteHere="true"/>
-      <properties description="the value applied to the dispersion is changed according to R56_machine = R56*(1+r56_off_perc/100)+r56_off_abs" label="r562_off_perc" unit="%" standardUnit="" displayUnit="" format="" maxValue="" minValue="" maxAlarm="" minAlarm="" maxWarning="" minWarning="" deltaTime="" deltaValue=""/>
+      <properties description="the value applied to the dispersion is changed according to R56_machine = R56 * 56_off_perc + r56_off_abs" label="r562_off_perc" unit="%" standardUnit="" displayUnit="" format="" maxValue="1.6" minValue="0.4" maxAlarm="" minAlarm="" maxWarning="" minWarning="" deltaTime="" deltaValue=""/>
     </attributes>
     <attributes name="r562_machine" attType="Scalar" rwType="READ" displayLevel="OPERATOR" polledPeriod="0" maxX="" maxY="" allocReadMember="true" isDynamic="false">
       <dataType xsi:type="pogoDsl:DoubleType"/>