The vacuum spark as a source of metal ions with variable velocity