From the release 2.0.0 of sardana there is a change in the interface of the macro arguments. This change affects only the arguments of the type ParamRepeat and it was needed in order to avoid some restrictions in the order or setting of default values of the macro arguments. The old and the new implementation are not compatible. Macros satisfying one of these conditions are affected by the change and have to be adapted to the new interface:
execMacro("mv", mymot, 10) createMacro("mv", mymot,10) self.mv(mymot,10)
The format:
execMacro("mv mymotname 10") createMacro("mv mymotname 10")
is not affected.
What has to be changed for each case is:
def prepare(self, *scan_regions): def run(self, *scan_regions):
and now you have to change this to:
def prepare(self, scan$\_$regions): def run(self, scan$\_$egions):
execMacro("mv", mymot, 10) createMacro("mv", mymot,10) self.mv(mymot,10)
will be changed to:
execMacro("mv", [[mymot, 10]]) createMacro("mv", [[mymot,10]]) self.mv([[mymot,10]])
And extended to a case with more pairs:
execMacro("mv", mymot1, 10, mymot2, 30)
changed to:
execMacro("mv", [[mymot1, 10], [mymot2, 30]])
ParamRepeat for the macro mv is defined as pairs of motors and positions, so the elements of the external list have to be given as a list of two elements.
If you want to apply a solution compatible with both sardana versions, you can change to the sintax:
execMacro("mv mymotname 10") createMacro("mv mymotname 10")