Updated the documentation
copy past from Marlin_main.cpp doxygen documentation d-codes
This commit is contained in:
parent
0d00db1c33
commit
4c518545f1
@ -100,16 +100,22 @@ void print_mem(uint32_t address, uint16_t count, uint8_t type, uint8_t countperl
|
||||
#ifdef DEBUG_DCODE3
|
||||
#define EEPROM_SIZE 0x1000
|
||||
/*!
|
||||
*
|
||||
### D3 - Read/Write EEPROM <a href="https://reprap.org/wiki/G-code#D3:_Read.2FWrite_EEPROM">D3: Read/Write EEPROM</a>
|
||||
This command can be used without any additional parameters. It will read the entire eeprom.
|
||||
#### Usage
|
||||
|
||||
D3 [ A | C | X ]
|
||||
|
||||
- `A` - Address (0x0000-0x0fff)
|
||||
- `C` - Count (0x0001-0x1000)
|
||||
- `X` - Data
|
||||
*
|
||||
#### Parameters
|
||||
- `A` - Address (x0000-x0fff)
|
||||
- `C` - Count (1-4096)
|
||||
- `X` - Data (hex)
|
||||
|
||||
#### Notes
|
||||
- The hex address needs to be lowercase without the 0 before the x
|
||||
- Count is decimal
|
||||
- The hex data needs to be lowercase
|
||||
|
||||
*/
|
||||
void dcode_3()
|
||||
{
|
||||
@ -206,13 +212,13 @@ void dcode__1()
|
||||
#ifdef DEBUG_DCODES
|
||||
|
||||
/*!
|
||||
*
|
||||
### D0 - Reset <a href="https://reprap.org/wiki/G-code#D0:_Reset">D0: Reset</a>
|
||||
#### Usage
|
||||
|
||||
D0 [ B ]
|
||||
|
||||
#### Parameters
|
||||
- `B` - Bootloader
|
||||
*
|
||||
*/
|
||||
void dcode_0()
|
||||
{
|
||||
@ -251,16 +257,22 @@ void dcode_1()
|
||||
}
|
||||
|
||||
/*!
|
||||
*
|
||||
### D2 - Read/Write RAM <a href="https://reprap.org/wiki/G-code#D2:_Read.2FWrite_RAM">D2: Read/Write RAM</a>
|
||||
### D2 - Read/Write RAM <a href="https://reprap.org/wiki/G-code#D2:_Read.2FWrite_RAM">D3: Read/Write RAM</a>
|
||||
This command can be used without any additional parameters. It will read the entire RAM.
|
||||
#### Usage
|
||||
|
||||
D2 [ A | C | X ]
|
||||
|
||||
- `A` - Address (0x0000-0x1fff)
|
||||
- `C` - Count (0x0001-0x2000)
|
||||
#### Parameters
|
||||
- `A` - Address (x0000-x1fff)
|
||||
- `C` - Count (1-8192)
|
||||
- `X` - Data
|
||||
*
|
||||
|
||||
#### Notes
|
||||
- The hex address needs to be lowercase without the 0 before the x
|
||||
- Count is decimal
|
||||
- The hex data needs to be lowercase
|
||||
|
||||
*/
|
||||
void dcode_2()
|
||||
{
|
||||
@ -306,17 +318,17 @@ void dcode_2()
|
||||
}
|
||||
|
||||
/*!
|
||||
*
|
||||
### D4 - Read/Write PIN <a href="https://reprap.org/wiki/G-code#D4:_Read.2FWrite_PIN">D4: Read/Write PIN</a>
|
||||
|
||||
### D4 - Read/Write PIN <a href="https://reprap.org/wiki/G-code#D4:_Read.2FWrite_PIN">D4: Read/Write PIN</a>
|
||||
To read the digital value of a pin you need only to define the pin number.
|
||||
#### Usage
|
||||
|
||||
D4 [ P | F | V ]
|
||||
|
||||
#### Parameters
|
||||
- `P` - Pin (0-255)
|
||||
- `F` - Function in/out (0/1)
|
||||
- `V` - Value (0/1)
|
||||
*
|
||||
*/
|
||||
void dcode_4()
|
||||
{
|
||||
@ -351,17 +363,23 @@ void dcode_4()
|
||||
#ifdef DEBUG_DCODE5
|
||||
|
||||
/*!
|
||||
*
|
||||
### D5 - Read/Write FLASH <a href="https://reprap.org/wiki/G-code#D5:_Read.2FWrite_FLASH">D5: Read/Write Flash</a>
|
||||
This command can be used without any additional parameters. It will read the 1kb FLASH.
|
||||
#### Usage
|
||||
|
||||
D5 [ A | C | X | E ]
|
||||
|
||||
- `A` - Address (0x00000-0x3ffff)
|
||||
- `C` - Count (0x0001-0x2000)
|
||||
#### Parameters
|
||||
- `A` - Address (x00000-x3ffff)
|
||||
- `C` - Count (1-8192)
|
||||
- `X` - Data
|
||||
- `E` - Erase
|
||||
*
|
||||
|
||||
#### Notes
|
||||
- The hex address needs to be lowercase without the 0 before the x
|
||||
- Count is decimal
|
||||
- The hex data needs to be lowercase
|
||||
|
||||
*/
|
||||
void dcode_5()
|
||||
{
|
||||
@ -427,11 +445,8 @@ void dcode_5()
|
||||
#ifdef DEBUG_DCODES
|
||||
|
||||
/*!
|
||||
*
|
||||
### D6 - Read/Write external FLASH <a href="https://reprap.org/wiki/G-code#D6:_Read.2FWrite_external_FLASH">D6: Read/Write external Flash</a>
|
||||
|
||||
Reserved
|
||||
*
|
||||
*/
|
||||
void dcode_6()
|
||||
{
|
||||
@ -439,11 +454,8 @@ void dcode_6()
|
||||
}
|
||||
|
||||
/*!
|
||||
*
|
||||
### D7 - Read/Write Bootloader <a href="https://reprap.org/wiki/G-code#D7:_Read.2FWrite_Bootloader">D7: Read/Write Bootloader</a>
|
||||
|
||||
Reserved
|
||||
*
|
||||
*/
|
||||
void dcode_7()
|
||||
{
|
||||
@ -461,16 +473,16 @@ void dcode_7()
|
||||
}
|
||||
|
||||
/*!
|
||||
*
|
||||
### D8 - Read/Write PINDA <a href="https://reprap.org/wiki/G-code#D8:_Read.2FWrite_PINDA">D8: Read/Write PINDA</a>
|
||||
#### Usage
|
||||
|
||||
D8 [ ? | ! | P | Z ]
|
||||
|
||||
#### Parameters
|
||||
- `?` - Read PINDA temperature shift values
|
||||
- `!` - Reset PINDA temperature shift values to default
|
||||
- `P` - Pinda temperature [C]
|
||||
- `Z` - Z Offset [mm]
|
||||
*
|
||||
*/
|
||||
void dcode_8()
|
||||
{
|
||||
@ -514,11 +526,12 @@ void dcode_8()
|
||||
}
|
||||
|
||||
/*!
|
||||
*
|
||||
### D9 - Read ADC <a href="https://reprap.org/wiki/G-code#D9:_Read.2FWrite_ADC">D9: Read ADC</a>
|
||||
#### Usage
|
||||
|
||||
D9 [ I | V ]
|
||||
|
||||
#### Parameters
|
||||
- `I` - ADC channel index
|
||||
- `0` - Heater 0 temperature
|
||||
- `1` - Heater 1 temperature
|
||||
@ -528,7 +541,6 @@ void dcode_8()
|
||||
- `5` - Ambient temperature
|
||||
- `6` - BED voltage
|
||||
- `V` Value to be written as simulated
|
||||
*
|
||||
*/
|
||||
const char* dcode_9_ADC_name(uint8_t i)
|
||||
{
|
||||
@ -604,10 +616,7 @@ void dcode_9()
|
||||
}
|
||||
|
||||
/*!
|
||||
*
|
||||
### D10 - Set XYZ calibration = OK <a href="https://reprap.org/wiki/G-code#D10:_Set_XYZ_calibration_.3D_OK">D10: Set XYZ calibration = OK</a>
|
||||
|
||||
*
|
||||
*/
|
||||
void dcode_10()
|
||||
{//Tell the printer that XYZ calibration went OK
|
||||
@ -616,11 +625,10 @@ void dcode_10()
|
||||
}
|
||||
|
||||
/*!
|
||||
*
|
||||
### D12 - Time <a href="https://reprap.org/wiki/G-code#D12:_Time">D12: Time</a>
|
||||
|
||||
*
|
||||
Writes the actual time in the log file.
|
||||
*/
|
||||
|
||||
void dcode_12()
|
||||
{//Time
|
||||
LOG("D12 - Time\n");
|
||||
@ -632,37 +640,60 @@ void dcode_12()
|
||||
#include "planner.h"
|
||||
#include "tmc2130.h"
|
||||
extern void st_synchronize();
|
||||
/**
|
||||
* @brief D2130 Trinamic stepper controller
|
||||
* D2130<axis><command>[subcommand][value]
|
||||
* * Axis
|
||||
* * * 'X'
|
||||
* * * 'Y'
|
||||
* * * 'Z'
|
||||
* * * 'E'
|
||||
* * command
|
||||
* * * '0' current off
|
||||
* * * '1' current on
|
||||
* * * '+' single step
|
||||
* * * * value sereval steps
|
||||
* * * '-' dtto oposite direction
|
||||
* * * '?' read register
|
||||
* * * * "mres"
|
||||
* * * * "step"
|
||||
* * * * "mscnt"
|
||||
* * * * "mscuract"
|
||||
* * * * "wave"
|
||||
* * * '!' set register
|
||||
* * * * "mres"
|
||||
* * * * "step"
|
||||
* * * * "wave"
|
||||
* * * * *0, 180..250 meaning: off, 0.9..1.25, recommended value is 1.1
|
||||
* * * '@' home calibrate axis
|
||||
/*!
|
||||
### D2130 - Trinamic stepper controller <a href="https://reprap.org/wiki/G-code#D2130:_Trinamic_stepper_controller">D2130: Trinamic stepper controller</a>
|
||||
@todo Please review by owner of the code. RepRap Wiki Gcode needs to be updated after review of owner as well.
|
||||
|
||||
#### Usage
|
||||
|
||||
D2130 [ Axis | Command | Subcommand | Value ]
|
||||
|
||||
#### Parameters
|
||||
- Axis
|
||||
- `X` - X stepper driver
|
||||
- `Y` - Y stepper driver
|
||||
- `Z` - Z stepper driver
|
||||
- `E` - Extruder stepper driver
|
||||
- Commands
|
||||
- `0` - Current off
|
||||
- `1` - Current on
|
||||
- `+` - Single step
|
||||
- `-` - Single step oposite direction
|
||||
- `NNN` - Value sereval steps
|
||||
- `?` - Read register
|
||||
- Subcommands for read register
|
||||
- `mres` - Micro step resolution. More information in datasheet '5.5.2 CHOPCONF – Chopper Configuration'
|
||||
- `step` - Step
|
||||
- `mscnt` - Microstep counter. More information in datasheet '5.5 Motor Driver Registers'
|
||||
- `mscuract` - Actual microstep current for motor. More information in datasheet '5.5 Motor Driver Registers'
|
||||
- `wave` - Microstep linearity compensation curve
|
||||
- `!` - Set register
|
||||
- Subcommands for set register
|
||||
- `mres` - Micro step resolution
|
||||
- `step` - Step
|
||||
- `wave` - Microstep linearity compensation curve
|
||||
- Values for set register
|
||||
- `0, 180 --> 250` - Off
|
||||
- `0.9 --> 1.25` - Valid values (recommended is 1.1)
|
||||
- `@` - Home calibrate axis
|
||||
|
||||
Examples:
|
||||
|
||||
D2130E?wave
|
||||
|
||||
Print extruder microstep linearity compensation curve
|
||||
|
||||
D2130E!wave0
|
||||
|
||||
Disable extruder linearity compensation curve, (sine curve is used)
|
||||
|
||||
D2130E!wave220
|
||||
|
||||
(sin(x))^1.1 extruder microstep compensation curve used
|
||||
|
||||
Notes:
|
||||
For more information see https://www.trinamic.com/fileadmin/assets/Products/ICs_Documents/TMC2130_datasheet.pdf
|
||||
*
|
||||
* Example:
|
||||
* D2130E?wave //print extruder microstep linearity compensation curve
|
||||
* D2130E!wave0 //disable extruder linearity compensation curve, (sine curve is used)
|
||||
* D2130E!wave220 // (sin(x))^1.1 extruder microstep compensation curve used
|
||||
*/
|
||||
void dcode_2130()
|
||||
{
|
||||
@ -767,18 +798,18 @@ void dcode_2130()
|
||||
|
||||
#ifdef PAT9125
|
||||
/*!
|
||||
*
|
||||
### D9125 - PAT9125 filament sensor <a href="https://reprap.org/wiki/G-code#D9:_Read.2FWrite_ADC">D9125: PAT9125 filament sensor</a>
|
||||
#### Usage
|
||||
|
||||
D9125 [ ? | ! | R | X | Y | L ]
|
||||
|
||||
#### Parameters
|
||||
- `?` - Print values
|
||||
- `!` - Print values
|
||||
- `R` - Resolution. Not active in code
|
||||
- `X` - X values
|
||||
- `Y` - Y values
|
||||
- `L` - Activate filament sensor log
|
||||
*
|
||||
*/
|
||||
void dcode_9125()
|
||||
{
|
||||
|
@ -9105,7 +9105,6 @@ Sigma_Exit:
|
||||
For more information see https://www.trinamic.com/fileadmin/assets/Products/ICs_Documents/TMC2130_datasheet.pdf
|
||||
*
|
||||
*/
|
||||
|
||||
case 2130:
|
||||
dcode_2130(); break;
|
||||
#endif //TMC2130
|
||||
|
Loading…
Reference in New Issue
Block a user