"M569: expected numeric operand" error.
-
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.0while 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;
-
@LindsayC which firmware version? SBC or standalone mode?
-
@dc42 @LindsayC I have recreated this issue in SBC and stand alone mode (3.6beta3 test build).
SBC mode:
var addr = move.axes[0].drivers[0]
then
echo var.addr
returns:
{object}
attempting to do anything numerical with that variable results in
Error: expected numeric operands
Stand alone:
var addr = move.axes[0].drivers[0]
then
echo var.addr
returns:
0.0
attempting to do anything numerical with that variable results in
Error: expected numeric operands
-
@T3P3Tony that's expected. A driver ID is not a number because it holds both the CAN address and the driver number at that address. However, it should be allowed as the P operand in a M569 command.
-
@dc42 Thanks I have tested that in Stand alone and SBC mode and confirm it works in standalone mode but not in SBC mode.
Stand alone:
M569 P{var.addr} Drive 0 runs forwards, active high enable, timing 4.0:4.0:1.3:1.3us, mode spreadCycle, ccr 0x08053, toff 3, tblank 1, thigh 200 (46.9 mm/sec), gs=32, iRun=0, iHold=0, current=25.391, hstart/hend/hdec 5/0/0, pos 8
SBC:
M569 P{var.addr} Error: M569: expected numeric operand
-
-
The OP didn't respond to my request for the firmware version. A change was made to improve this area within the last few months, which is why I asked.