 |
Lydia - Printhead
|
Go to the documentation of this file.
8 #define MODBUS_CMD_WAIT 20 // Minimum time to wait for a response
9 #define MODBUS_R_RETRY 2 // max read queries
10 #define MODBUS_W_RETRY 4 // max write queries
11 #define MODBUS_MAX_LIFESPAN SECS * 3 // Maximal lifespan of a query
14 #define MAX_QUERY_BUFFER 10
17 #define MB_QUERY_TYPE_STATUS_POLL 10
19 #define MB_QUERY_TYPE_STATUS_POLL_2 50
21 #define MB_QUERY_TYPE_CMD 100
24 #define MODBUS_TCP_MAX_REGISTERS 125
26 #define MODBUS_TCP_DEFAULT_REGISTER_VALUE 0
29 #define MB_MAX_POLL_INTERVAL SECS * 10
31 #define MB_POLL_RETRY_STEP SECS * 1
49 #define MOTOR_LOAD_READ_INTERVAL 100
52 #define MOTOR_IDLE_LOAD_RANGE_MIN 5
53 #define MOTOR_IDLE_LOAD_RANGE_MAX 20
56 #define MOTOR_LOAD_RANGE_MIN 20
57 #define MOTOR_LOAD_RANGE_MAX 60
60 #define MOTOR_OVERLOAD_RANGE_MIN 80
61 #define MOTOR_OVERLOAD_RANGE_MAX 800
72 #define E_POWER_PRIM_ON 145 // Power is on whilst it shouldn't be
73 #define E_POWER_PRIM_OFF 146 // Power is off whilst it should be
75 #define E_POWER_SEC_ON 147 // Power is on whilst it shouldn't be
76 #define E_POWER_SEC_OFF 148 // Power is off whilst it should be
77 #define E_POWER 150 // Nothing is online
79 #define E_VFD_OFFLINE E_POWER_PRIM_OFF // VFD should be online
82 #define E_VFD_CURRENT 200 // VFD current abnormal: below or above average
83 #define E_OPERATING_SWITCH 220 // Operating switch invalid value
91 #define E_MOTOR_DT_IDLE 320 // Motor runs idle longer as defined
92 #define E_MOTOR_DT_OVERLOAD 321 // Motor runs overloaded longer as defined
93 #define E_BRIDGE_LOSS 400 // bridge poll timeout
96 #define E_BRIDGE_START 3000 // base offset for custom bridge errors
97 #define E_BRIDGE_CUSTOM(A) E_BRIDGE_START+A // Custom bridge error
98 #define E_BRIDGE_PARITY E_BRIDGE_CUSTOM(1) // @todo, parity check failure
99 #define E_BRIDGE_CRC E_BRIDGE_CUSTOM(2) // @todo, crc failure
100 #define E_BRIDGE_FLOOD E_BRIDGE_CUSTOM(3) // @todo, msg queue
103 #define E_EX_BASE 4000 // base offset extruder
104 #define E_EX_CUSTOM(A) E_EX_BASE+A // Custom bridge error
110 #define ANALOG_POT_READ_INTERVAL 15 // The interval to read the analog switch
111 #define ANALOG_SWITCH_READ_INTERVAL 20 // The interval to read the analog switch
114 #define ANALOG_INPUT_MAX_LEVEL_0 750 // The trigger value to detect an analog input value as HIGH or ON
116 #define ANALOG_INPUT_MAX_LEVEL_1 810 // The maximum value for the analog input (POT)
117 #define ANALOG_INPUT_THRESHOLD_1 500 // The trigger value to detect an analog input value as HIGH or ON
119 #define ANALOG_INPUT_MIN_THRESHOLD_0 700 // Minimum threshold for 3Pos switches
120 #define ANALOG_INPUT_MIN_DT_0 3 // Minimum difference to detect a change in the analog input
127 #define STEPPER_MAX_SPEED_0 1500 // For non Teknic servos, please use values below 1000, otherwise it will jitter
128 #define STEPPER_MODUBUS_RANGE 4
129 #define STEPPER_DEFAULT_SPEED_0 1
130 #define STEPPER_DEFAULT_DIR_0 1
131 #define STEPPER_PULSE_WIDTH_0 40
132 #define STEPPER_OVERLOAD_THRESHOLD_0 800