def init_gantry(axisIndex, joints=2, latching=True): if latching: comp = 'lgantry' else: comp = 'gantry' rt.newinst(comp, 'gantry.%i' % axisIndex, pincount=joints) rcomps.create_gantry_rcomp(axisIndex=axisIndex)