Ok WOW, many thanks, @jay_s_uk ! The syntax works, and it saves the value correctly in save_variables.g! Many thanks again, I was already on the verge of giving up and searched forever for a solution, but I hadn't thought of the meta commands. Thanks again!
![](/assets/uploads/system/avatar-default.png?v=1521803371351)
Posts made by tino_ber48
-
RE: Saving Variable Values Across Resets โ Is It Possible?
-
Saving Variable Values Across Resets โ Is It Possible?
Hi, I have a general question about whether I'm doing something wrong or if this is simply not possible. I'm also not sure if this is the right place to ask this question, so if thereโs a more appropriate location, feel free to move the post there.
I want to save a variable or, more specifically, the value of a variable, and keep it stored even after a board reset. The variable accumulates values during printing, and I want this value to persist until a manual reset via G-code.
I declared the variable in the config as follows:
global totalDistance = 0
After resetting or restarting the board, I want the saved value to be restored. I tried two approaches:
Using save_variables.g: M28 "0:/sys/saved_variables.g" echo "set global.totalDistance = " ^ {global.totalDistance} M29
However, the problem here is that it only saves the text and does not store the actual value behind {global.totalDistance}. When I send the command manually:
echo "set global.totalDistance = " ^ {global.totalDistance}
it outputs:
set global.totalDistance = 2357
But after restarting the board, the config resets the variable to 0, and I cannot figure out how to reload the state or value of the variable after the restart.
I also tried using M500 to save the variable's value, but this only saves axis-related information.
So my question is: Is there a way to save the value of a variable?
Some information about my hardware, although itโs irrelevant to the question:
Hardware in use:
Duet 3 Mini 5+ with RepRapFirmware 3.5.4
Duet 3 Expansion 1HCL 3.5.4
Duet Web Control 3.5.4 -
RE: Mini 5+ Need More Endstop Pins, But How?
@droftarts
First of all, thank you very much, Ian, for your quick response. If that is feasible, then that would be great. However, I still have a question about the 7xIO header. I found 5xIO headers with in & out, which means 10 slots plus 2 (only in: io5.in + io6.in), or am I overlooking io5.out and io6.out on the wiring diagram?Tino
-
Mini 5+ Need More Endstop Pins, But How?
Hi, my name is Tino,
I have tried to answer the question myself, but I want to make sure if there is another way and maybe you can help me as I was stuck.
I am building a machine that uses a Duet 3 Mini 5+ as the mainboard with an expansion 2+ and an expansion 1HCL.
Now, my question is regarding the number of stepper motors. However, I need 14 slots for sensors (11 endstops + 3 control/trigger buttons). Am I correct in assuming that I need an additional board for the number of IO pins required?
The hardware being used includes 7 stepper motors, 1 CL stepper motor, and 1 hobby servo. It might be important to mention that I do not need any heating plates or other thermal functions of the board.
With the 3 Mini 5+, Exp. 2+, and Exp. 1HCL, I can operate all the steppers, but there is no space for the sensors, is that correct?
Would I then need to switch to 2x Mini 5+, Exp. 1HCL to accommodate the sensors, or even 1x 6HC + 1x Mini 5+?
Maybe one of you can help me with my project.
Best regards, Tino
-
RE: Can't run the stepper with 1hcl board
@T3P3Tony
Thanks for that info, I actually didn't know that. I thought these two types differ with the big feature that one has a magnet on the shaft and the polarity is recognized (magnetic shaft encoder) and incremental encoder where a disc is on the shaft which gives the position to a reading head (quadrature).
The calibration "M569.6 v1" worked and at that point i always had my doubts because it is a magnetic encoder that actually needs v2 but then an error came up. But with your information i don't need v2
But now everything works.And if I first
M906 U600 ; U-CL Stepper M569.6 P50.0 V1 ;than calibrate M906 U150 ;drop the current
can i determine the torque perfect!
I only have to increase the mA to calibrate, otherwise it will give a measurement error.
@dc42 Many thanks to you both you helped me a lot!!! -
RE: Can't run the stepper with 1hcl board
@dc42 @T3P3Tony
Ok I think we can close the request. The main question in the first post was whether the motor is compatible to use it as a closed loop motor with the 1HCL board. The answer seems to be no since the board only supports "quadrature encoder" or "Duet3D magnetic shaft encoder" and my stepper is a closed loop stepper with magnetic encoder. Please correct me if I read that wrong from the HCL board documentation. -
RE: Can't run the stepper with 1hcl board
@dc42
No it's just the Stepper with a magnetic Encoder which i Drive on one axis without a linear quadrature.What we wanna get as result is simular like the mechaduino project in the torque mode.
this video show's what we try to get. we want to fake a springload which is controllable via the software without losing the original position.
and i thougt the M569.1 Hn.n would be the way we could controll the torque (in our case the fakespring load) -
RE: Can't run the stepper with 1hcl board
@dc42
Thanks dc42 for the instructions on how to wire it correctly.
I'm still a bit confused about the settings in the config. when the talk about
magnetic encoder is in the documentation every time it talks about the future Duet own PCB? or is there actually talk about a magnetic encoder?
for example
M569.1 T3 is only for Duet3D Magnetic encoder
For me, that means I have to take T2 because I also have the encoder connected to the quadrature connection, right? although the motor has a magnetic encoder. the C value should be 1000 because I have rrf3.5 but in the description it doesn't say for magnetic encoder is that meant for everyone or just related to the Duet3D magnetic encoder?Because if I have M569.1 T2 C1000 S200 in the config, I can't calibrate the magnetic encoder via M569.6 P50.0 V2.
I think it may have been overlooked, but the motor I mentioned above is a closed loop motor with magnetic encoder 1000ppr and not a motor with quadrature encoder. I'm not that deep into it to differentiate between the different feedback signals, but the mechanical structure is different. which also surprises me why I should put the magnetic encoder at the input for quadrature encoders on the 1hcl. I'm probably just acting stupid, but it's a bit confusing that sometimes there's talk about Duet3D magnetic motor shaft encoder using AS5047D and then in other parts of the documentation it reads as if it's about the general encoder type :magnetic encoder.I apologize for the long text but I hope you know what I mean even if my English is very bad.
-
RE: Can't run the stepper with 1hcl board
@dc42
I just can run the Stepper when the magnetic encoder isnt connected. I'm also Not Sure where i should connect the Encoder. I also don't know if the Stepper i use is compatible cause everytime when i read stuff About the magnetic Encoder and 1hlc i read duet mangnetic Encoder pcb which will released soon . Cause when i connect them the stepper don't move anymore. -
RE: Can't run the stepper with 1hcl board
@T3P3Tony
First of all thank you for the fast reply.
I can sent the config in 5h cause now i'm not at home:/
Cause of the wiring i thought it should be wired on the spi cause it's an magnatic encoder and not a incremental encoder.
but you are right first of all, the engine not running sounds like a general problem.Edit1.1:
Thats the config which i tried at least just for running the stepper. I renamed the CAN adress from 123.0 to 50.0.
Edit1.2:
I have no idea why but the stepper is now moving. I just deleted the Probe stuff in the config, and take all encoder cabels off. And now i can run the stepper. Step 1 done -
Can't run the stepper with 1hcl board
hi everyone,
I have the following problem and unfortunately I can't get any further. I've already searched the forum but unfortunately didn't find anything suitable, hence the post.i have a duet 3 6hc + 1hcl
rrf version 3.5.0-beta2 is installed on both.everything is currently still a test setup to see if I can use the closedloop stepper I bought.
My general question is can I operate the stepper at all via the 1hcl in closed loop mode? i use one
17HS15-1504-ME1KIn the event that the motor would be usable, I think I didn't do the wiring of the encoder correctly. maybe someone could help me there too.
I connect everything to the 'SPI Encoder Input' on the hcl board
EA+,EB+,EZ+ , VCC - +5V
EGND- - GND
EA- - A_Input
EB- - B_Input
EZ- - N_InputBut maybe there is a general problem cause i can't move the stepper in closed-loop or openloop via the hcl extension. When i connect the Stepper cabel on the 6HC the stepper runs that means the stepper isn't defect.
hopefully someone can help me.
And happy eastern to all:D