I'm trying to use the object model "move.axes[X].drivers[0]" can and driver address to use in M569.X commands to setup closed loop (1hcl) during a home without having to specifically put it in the can address into the home file. Essentially I search for the drive letter, and when I've found it I want to set a variable that has the address. Unfortunately there doesn't seem to be away to turn the string "51.0" in the object model into 51.0 (float?) in the m569.X commands. For instance.
var address = 51.0
M569.1 P{var.address} T2 C1000 S200 R150 I50 D0.1 V500 A1 E4.0:2.0 D1;
Will work fine.
But below code gives a "M569: expected numeric operand" error.
var ind = 0
var driverAddress = 0.0
while exists (move.axes[{var.ind}].letter) ;go through all axis in order till I find the correct one.
if move.axes[{var.ind}].letter == "'a"
set var.driverAddress = move.axes[{var.ind}].drivers[0]
set var.ind = var.ind +1;
M569.1 P{var.driverAddress} T2 C1000 S200 R150 I50 D0.1 V500 A1 E4.0:2.0 D1;