resonance_tester: Disable input shaping for resonance testing
Signed-off-by: Dmitry Butyugin <dmbutyugin@google.com>
This commit is contained in:
parent
0fb2449be0
commit
a8b282d67a
|
@ -6,6 +6,11 @@ All dates in this document are approximate.
|
|||
|
||||
# Changes
|
||||
|
||||
20210201: The `TEST_RESONANCES` command will now disable input shaping
|
||||
if it was previously enabled (and re-enable it after the test). In order
|
||||
to override this behavior and keep the input shaping enabled, one can
|
||||
pass an additional parameter `INPUT_SHAPING=1` to the command.
|
||||
|
||||
20210201: The `ACCELEROMETER_MEASURE` command will now append the name
|
||||
of the accelerometer chip to the output file name if the chip was given
|
||||
a name in the corresponding adxl345 section of the printer.cfg.
|
||||
|
|
|
@ -728,12 +728,15 @@ is enabled (also see the
|
|||
all enabled accelerometer chips.
|
||||
- `TEST_RESONANCES AXIS=<axis> OUTPUT=<resonances,raw_data>
|
||||
[NAME=<name>] [FREQ_START=<min_freq>] [FREQ_END=<max_freq>]
|
||||
[HZ_PER_SEC=<hz_per_sec>]`: Runs the resonance test in all
|
||||
configured probe points for the requested axis (X or Y) and measures
|
||||
the acceleration using the accelerometer chips configured for the
|
||||
respective axis. `OUTPUT` parameter is a comma-separated list of
|
||||
which outputs will be written. If `raw_data` is requested, then the
|
||||
raw accelerometer data is written into a file or a series of files
|
||||
[HZ_PER_SEC=<hz_per_sec>] [INPUT_SHAPING=[<0:1>]]`: Runs the resonance
|
||||
test in all configured probe points for the requested axis (X or Y)
|
||||
and measures the acceleration using the accelerometer chips configured
|
||||
for the respective axis. If `INPUT_SHAPING=0` or not set (default),
|
||||
disables input shaping for the resonance testing, because it is not valid
|
||||
to run the resonance testing with the input shaper enabled.
|
||||
`OUTPUT` parameter is a comma-separated list of which outputs will be
|
||||
written. If `raw_data` is requested, then the raw accelerometer data
|
||||
is written into a file or a series of files
|
||||
`/tmp/raw_data_<axis>_[<point>_]<name>.csv` with (`<point>_` part of
|
||||
the name generated only if more than 1 probe point is configured).
|
||||
If `resonances` is specified, the frequency response is calculated
|
||||
|
|
|
@ -130,18 +130,15 @@ max_accel: 7000
|
|||
max_accel_to_decel: 7000
|
||||
```
|
||||
(after you are done with the measurements, revert these values to their old,
|
||||
or the newly suggested values). Also, if you have enabled input shaper already,
|
||||
you will need to disable it prior to this test as follows:
|
||||
```
|
||||
SET_INPUT_SHAPER SHAPER_FREQ_X=0 SHAPER_FREQ_Y=0
|
||||
```
|
||||
as it is not valid to run the resonance testing with the input shaper enabled.
|
||||
or the newly suggested values).
|
||||
|
||||
Run the following command:
|
||||
```
|
||||
TEST_RESONANCES AXIS=X
|
||||
```
|
||||
Note that it will create vibrations on X axis.
|
||||
Note that it will create vibrations on X axis. It will also disable input
|
||||
shaping if it was enabled previously, as it is not valid to run the resonance
|
||||
testing with the input shaper enabled.
|
||||
|
||||
**Attention!** Be sure to observe the printer for the first time, to make sure
|
||||
the vibrations do not become too violent (`M112` command can be used to abort
|
||||
|
|
|
@ -127,6 +127,13 @@ class ResonanceTester:
|
|||
if csv_output:
|
||||
helper = shaper_calibrate.ShaperCalibrate(self.printer)
|
||||
|
||||
input_shaper = self.printer.lookup_object('input_shaper', None)
|
||||
if input_shaper is not None and not gcmd.get_int('INPUT_SHAPING', 0):
|
||||
input_shaper.disable_shaping()
|
||||
gcmd.respond_info("Disabled [input_shaper] for resonance testing")
|
||||
else:
|
||||
input_shaper = None
|
||||
|
||||
currentPos = toolhead.get_position()
|
||||
Z = currentPos[2]
|
||||
E = currentPos[3]
|
||||
|
@ -176,6 +183,10 @@ class ResonanceTester:
|
|||
helper, axis, data)
|
||||
gcmd.respond_info(
|
||||
"Resonances data written to %s file" % (csv_name,))
|
||||
if input_shaper is not None:
|
||||
input_shaper.enable_shaping()
|
||||
gcmd.respond_info(
|
||||
"Re-enabled [input_shaper] after resonance testing")
|
||||
|
||||
def cmd_SHAPER_CALIBRATE(self, gcmd):
|
||||
toolhead = self.printer.lookup_object('toolhead')
|
||||
|
|
Loading…
Reference in New Issue