Marlin固件全中文解析_第1頁
Marlin固件全中文解析_第2頁
免費(fèi)預(yù)覽已結(jié)束,剩余8頁可下載查看

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報(bào)或認(rèn)領(lǐng)

文檔簡介

1、#ifndef CONFIGURATION H #defi ne CONFIGURATION_H/ This con figurati on file contains the basic sett in gs./ Adva need setti ngs can be found in Con figurati on _adv.h/ BASIC SETTINGS: select your board type, temperature sen sor type, axis scali ng, and en dstop configurati on/基本設(shè)置包括:主板類型,溫度傳感器類型,軸設(shè)置

2、,限位開關(guān)配置/ example_c on figurati on s/delta directory./對于三角洲并聯(lián)打印機(jī),請找到固件里 “ example_configurations 文件夾下的“ delta子文件夾,并將其中的Configuration.h 和 Configuration_adv.h 兩個(gè)頭文件拷貝到固件文件夾下,替換原先固件里的這兩個(gè)頭文件,并 針 對 d e l t a 打 印 機(jī) 作 相 應(yīng) 參 數(shù) 配 置 。/ User-specified version info of this build to display in Pron terface, etc t

3、ermi nal win dow duri ng/ startup. Implementation of an idea by Prof Braino to inform user that any changes made to this/ build by the user have bee n successfully uploaded into firmware.#defi ne STRING VERSION CONFIG H DATE TIME / build date and time #defi neSTRING_CONFIG_H_AUTHOR (none, default co

4、n fig) / Who made the cha nges./ SERIAL_PORT selects which serial port should be used for com muni cati on with the host. / Thisallows the connection of wireless adapters (for in sta nee) to non-default port pins./ Serial port 0 is still used by the Arduino bootloader regardless of this setti ng.#de

5、fi ne SERIAL PORT 0/選擇用于和上位機(jī)通訊的串口,該值請保持0不動 / This determ ines the com muni cation speed of the prin ter/ This determ ines the com muni cati on speed of the prin ter#defi ne BAUDRATE 250000/波特率配置,該值必須和你的上位機(jī)波特率相匹配,否則無法通訊。常用波特率有115200 和 250000 / This en ables the serial port associated to the Bluetooth

6、 in terface#defi ne BTENABLED/ En able BT i nterface on AT90USB devicesIlliThe following define selects which electronics board you have. Please choose the one thatmatches your setupII10=Gen7custom(Alfo ns3Versio n)https:/ ns3/Ge nerati on 7 Electro nicsII 11 :=Gen7 v1.1, v1.2 = 11II 12 :=Gen7 v1.3I

7、I 13 :=Gen7 v1.4II 2 = :Cheaptro nic v1.0II 20 :=Sethi 3D 1II 3 = :MEGAIRAMPS up to 1.2 = 3II 33 :=RAMPS 1.3 I 1.4 (Power outputs:Extruder,Fan, Bed)II 34 :=RAMPS 1.3 I 1.4 (Power outputs:ExtruderO, Extruder1, Bed)II 35 :=RAMPS 1.3 I 1.4 (Power outputs:Extruder,Fan, Fan)II 4 = :Duemila nove wI ATMega

8、328P pin assig nmentII 5 = Gen6II 51 = Gen6 deluxeII 6 = San gui nololu 1.2II 62 = Sanguinololu 1.2 and aboveII 63 = MelziII 64 = STB V1.1II 65 = Azteeg X1II 66 = Melzi with ATmega1284 (MaKr3d versio n)II 67 = Azteeg X3II 68 = Azteeg X3 ProII 7 = UltimakerII 71 = Ultimaker (Older electronics. Pre 1.

9、5.4. This is rare)II 72=II 77=Ultimai nboard 2.x (Uses TEMP_SENSOR 20)=3Drag Con trollerII 8 = Teen syluII 80=RumbaII 81=Prin trboard (AT90USB1286)II 82=Brai nwave (AT90USB646)II 83=SAV Mk-I (AT90USB1286)II 9 = Gen3+II 70=Megatro nicsII 701=Megatr onics v2.0II 702= Mi ni tro nics v1.0 |II 90 = Alpha

10、 OMCA boardII 91 = Fi nal OMCA boardII 301= RamboII 21 = Elefu Ra Board (v3)/ 88 = 5DPri nt D8 Driver Board#ifndef MOTHERBOARD#defi ne MOTHERBOARD 33/ 主板類型選擇,請按以上各主板相應(yīng)代號選擇你個(gè)人的主板類型。33 是ramps1.3/1.4 (個(gè)擠出機(jī)),34 是 ramps1.3/1.4 (兩個(gè)擠出機(jī))#endif | / Define this to set a custom n ame for your gen eric Men del,

11、/ #defi ne CUSTOM_MENDEL_NAME This Men del/Define this toseta unique identifier for thisprinter , (Used bysome programs todiffere ntiate betwee n mach in es)/ You canuse an on li ne serviceto gen erate a ran dom UUID.(eg http:/ )/ #defi ne MACHINE_UUID 00000000-0000-0000-0000-000000000000 / This def

12、i nes the nu mberof extruders#defi ne EXTRUDERS 1/ The follow ing defi ne selects which power supply you have. Please choose the one that matchesyour setup/ 1 = ATX / 2 = X-Box 360 203Watts (the blue wire conn ected to PS_ON and the red wire to VCC)#defi ne POWER_SUPPLY 1 / Define this to have the e

13、lectr onics keep the power supply off on startup.If you dont know what this is leave it./ #defi ne PS_DEFAULT_OFF/=/=ThermalSett ings =/=/-NORMAL IS 4.7kohm PULLUP!- 1kohm pullup can be used on hote nd sensor, usingcorrect resistor and table/ Temperature sen sor sett in gs:/ -2 is thermocouple with

14、MAX6675 (on ly for sensor 0) / -1 is thermocouple with AD595/ 0 is not used / 1 is 100k thermistor - best choice for EPCOS 100k (4.7k pullup)/ 2 is 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup)/ 3 is Mendel-parts thermistor (4.7k pullup)/ 4 is 10k thermistor ! do not use it for a hote nd. It g

15、ives bad resoluti on at high temp. !/ 5 is 100K thermistor - ATC Semitec 104GT-2 (Used in ParCa n& J-Head) (4.7k pullup)/ 6 is 100k EPCOS - Not as accurate as table 1 (created using a fluke thermocouple) (4.7k pullup)/ 7 is 100k Honeywell thermistor 135-104LAG-J01 (4.7k pullup)/ 71 is 100k Hon eywel

16、l thermistor 135-104LAF-J01 (4.7k pullup)/ 8 is 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup)/ 9 is 100k GE Sensing AL03006-58.2K-97-G1 (4.7k pullup)/ 10 is 100k RS thermistor 198-961 (4.7k pullup)/ 11 is 100k beta 3950 1% thermistor (4.7k pullup)/ 12 is 100k 0603 SMD Vishay NTCS0603E3104FXT (

17、4.7k pullup) (calibrated for Makibox hot bed) |/ 20 is the PT100 circuit found in the Ultimainboard V2.x/ 60 is 100k Makers Tool Works Kapt on Bed Thermistor beta=3950/ 1k ohm pullup tables - This is not no rmal, you would have to have cha nged out your4.7k for 1k/(but gives greater accuracy and mor

18、e stable PID)/ 51 is 100k thermistor - EPCOS (1k pullup)/ 52 is 200k thermistor - ATC Semitec 204GT-2 (1k pullup)/ 55 is 100k thermistor - ATC Semitec 104GT-2 (Used in ParCa n& J-Head) (1k pullup)/ 1047 is Pt1000 with 4k7 pullup/ 1010 is Pt1000 with 1k pullup (non sta ndard)/ 147 is Pt100 with 4k7 p

19、ullup/ 110 is Pt100 with 1k pullup (non sta ndard) #defi ne TEMP_SENSOR_0 1 #defi ne TEMP SENSOR1 0#defi ne TEMP_SENSOR_2 0#defi ne TEMP SENSOR BED 1/ 上面這些值是溫度傳感器類型配置,是能否正常讀取溫度的重要參數(shù)。TEMP_SENSOR_0 是噴嘴溫度傳感器,TEMP_SENSOR_BED 是熱床溫度傳感器,配置為 1說明兩個(gè)都是 100K ntc 熱敏電阻。如果你使用了其它溫度傳感器需要根據(jù)情況自行更改。 如果沒有,配置為 0 / This m

20、akes temp sensor 1 a redundant sensor for sensor 0. If the temperatures differe neebetwee n these sen sors is to high the print will be aborted./#defi ne TEMP SENSOR 1 AS REDUNDANT#defi ne MAX_REDUNDANT_TEMP_SENSOR_DIFF 10ll#defi ne BED_WATTS (12.0*12.0/1.1)ll P=IA2lR/ Actual temperature must be clo

21、se to target for this long before M109 retur ns success#defi ne TEMP_RESIDENCY_TIME 10 / (seco nds)#define TEMP_HYSTERESIS 3/ (degC) range of +/- temperatures consideredclose to the target onellllllllll這個(gè)值決定當(dāng)實(shí)際溫度在正負(fù) 3 度時(shí)被認(rèn)為接近設(shè)定的目標(biāo)溫度。適當(dāng)加大該值可以減少等待升溫的時(shí)間,過大則對出絲不利,建議該值保持默認(rèn)#defi ne TEMP WINDOW1ll (degC) W

22、in dow around target to start the reside ncytimer x degC early.ll The mi nimal temperature defi nes the temperature below which the heater will not be en abled It isusedll to check that the wiri ng to the thermistor is not broke n.ll Otherwise this would lead to the heater being powered on all the t

23、ime.#define HEATER_0_MINTEMP 5 #defi ne HEATER 1 MINTEMP 5#defi ne HEATER_2_MINTEMP 5#defi ne BED MINTEMP 5llllllllll以上幾個(gè)配置是噴嘴和熱床在溫度低于5 度時(shí),打印機(jī)將不能啟動,表現(xiàn)為報(bào)錯(cuò),并且加熱頭和熱床的加熱無法打開ll When temperature exceeds max temp, your heater will be switched off.ll This feature exists to protect your hotend from overheati

24、ng accidentally, but *NOT* from thermistorshortlfailure!ll You should use MINTEMP for thermistor shortlfailure protectio n.#defi ne HEATER O MAXTEMP 275#defi ne HEATER_1_MAXTEMP 275#define HEATER 2 MAXTEMP 275#define BED MAXTEMP 150llllllllll以上是噴嘴和熱床的最高溫度配置,防止燒壞主板ll If your bed has low resistance e.

25、g. .6 ohm and throws the fuse you can duty cycle it to reduce thell average curre nt. The value should be an in teger and the heat bed will be turned on for 1in terval ofll HEATER BED DUTY CYCLE DIVIDER intervals.ll#defi ne HEATER_BED_DUTY_CYCLE_DIVIDER 4llllllllll該配置是為了防止熱床電阻太小,長時(shí)間加熱容易燒mos 管,增加這個(gè)數(shù)字

26、,可以防止 mos 管過熱,但加熱時(shí)間會增長ll If you want the M105 heater power reported in watts,define the BED WATTS, and(shared for all extruders) EXTRUDER_WATTSll#define EXTRUDER WATTS (12.0*12.0/6.7)/ P=|A2/R掉代碼前的/)/ 如果你希望用 M105 命令實(shí)時(shí)查看擠出機(jī)和熱床功率,請將這兩行取消注釋(即去/PID溫控配置,PID 參數(shù)設(shè)置,需要根據(jù)系統(tǒng)情況設(shè)置,可以通過 M303 代碼調(diào)用PID_autotune 函數(shù)獲得

27、基本 PID 參數(shù),然后參照修改下面的DEFAULT_Kp、DEFAULT_Ki、DEFAULT_Kd,例如:M303 E0 C8 S190,表示獲取打印頭 0 (第一個(gè)打印頭)、目標(biāo)溫度 190 度、循環(huán)調(diào)用 PID_autotune8 次后的相應(yīng)的 PID 參數(shù)。系統(tǒng)自動生成的 PID 參數(shù)相當(dāng)不錯(cuò), 可保持默認(rèn)。當(dāng)然機(jī)器不同,也不一定都有效/ PID setti ngs:/ Comment the following line to disable PID and enable bang-bang.#defi ne PIDTEMP#define BANG_MAX 255 / limits

28、 current to nozzle while in bang-bang mode; 255=full curre nt#defi ne PID_MAX 255/ limits curre nt to n ozzle while PID is active (seePID FUNCTIONAL RANGE below); 255=full curre nt#ifdef PIDTEMP/#defi ne PID DEBUG / Sends debug data to the serial port./#defi ne PID_OPENLOOP 1 / Puts PID in ope n loo

29、p. M104/M140 sets the output powerfrom 0 to PID MAX#define PID_FUNCTIONAL_RANGE 10 / If the temperature differenee between the targettemperature and the actual temperature/ is more the n PID FUNCTIONAL RANGE the n the PID willbe shut off and the heater will be set to min/max.#defi ne PID_INTEGRAL_DR

30、IVE_MAX 255 /limit for the in tegral term#define K1 0.95 /smoothing factor within the PID#defi ne PID_dT (OVERSAMPLENR * 8.0)/(F_CPU / 64.0 / 256.0) /sampli ng period ofthe temperature rout ine / If you are using a pre-c on figured hote nd the n you can use one of the valuesets by un comme nting it/

31、 Ultimaker |#defi ne DEFAULT Kp 22.2#defi ne DEFAULT_Ki 1.08#defi ne DEFAULT_Kd 114/ MakerGear/#defineDEFAULT_Kp 7.0/#define DEFAULT_Ki 0.1/#define DEFAULT_Kd 12/ Me ndel Parts V9 on 12V/#defineDEFAULT Kp 63.0/#defineDEFAULT_Ki 2.25/#defineDEFAULT Kd 440#en dif / PIDTEMP/ Bed Temperature Con trol/ S

32、elect PID or ban g-ba ng with PIDTEMPBED. If ban g-ba ng, BED_LIMIT_SWITCHING willen able hysteresis/ Uncomment this to enable PID on the bed. It uses the same frequency PWM as the extruder./ If your PID_dT above is the default, and correct for your hardware/c on figurati on, that mea ns7.689Hz,/ wh

33、ich is fine for driving a square wave into a resistive load and does not significantly impact you FETheati ng./ This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W heater./ If your configuration is significantly different than this and you dont understand theissues in volved, you

34、probably/ should nt use bed PID un til some one else verifies your hardware works./ If this is en abled, find your own PID con sta nts below./#defi ne PIDTEMPBED/#defi ne BED_LIMIT_SWITCHING/ This sets the max power delivered to the bed, and replaces theHEATER_BED_DUTY_CYCLE_DIVIDER optio n./ all fo

35、rms of bed con trol obey this (PID, ban g-ba ng, ban g-ba ng with hysteresis)/ setting this to anything other than 255 enables a form of PWM to the bed just likeHEATER_BED_DUTY_CYCLE_DIVIDER did,/ so you should nt use it uni ess you are OK with PWM on your bed. (see the comme nt onen abl ing PIDTEMP

36、BED)#defi ne MAX_BED_POWER 255 / limits duty cycle to bed; 255=full current #ifdef PIDTEMPBED120v 250W silico ne heater into 4mm borosilicate (Men delMax 1.5+)/from FOPDT model - kp=.39 Tp=405 Tdead=66, Tc set to 79.2, aggressive factor of .15 (vs .1, 1, 10)#defi ne DEFAULT bedKp 10.00#defi ne DEFAU

37、LT_bedKi .023#defi ne DEFAULT_bedKd 305.4120v 250W silico ne heater into 4mm borosilicate (Me ndelMax 1.5+) /from pidautot une/#defi neDEFAULT_bedKp 97.1/#defi neDEFAULT bedKi 1.41/#defi ne DEFAULT bedKd 1675.16/ FIND YOUR OWN: M303 E-1 C8 S90 to run autot une on the bed at 90 degreesC for 8 cycles.

38、/ fine en dstop sett in gs: In dividualpullups. will be ign ored if ENDSTOPPULLUPS is#en dif / PIDTEMPBED/this preve nts dan gerous Extruder moves, i.e. if the temperature is un der the limit/can be software-disabled for whatever purposes by#defi ne PREVENT_DANGEROUS_EXTRUDE/if PREVENT DANGEROUS EXT

39、RUDE is on, you can still disable (un comme nt) very long bits ofextrusi on separately.#defi ne PREVENT_LENGTHY_EXTRUDE#defi ne EXTRUDE_MINTEMP 170/ 該值防止擠出頭溫度未達(dá)到設(shè)定目標(biāo)溫度而進(jìn)行擠出操作時(shí)的潛在風(fēng)險(xiǎn)#defi ne EXTRUDE_MAXLENGTH (X_MAX_LENGTH+Y_MAX_LENGTH) /preve nt extrusion of verylarge dista nces./ 該值限制擠出的最大長度,超過該長度,擠

40、出機(jī)不動作/=/ Un comme nt the follow ing line to en able CoreXY kin ematics / #defi ne COREXY / coarse Endstop Sett ings#define ENDSTOPPULLUPS / Comment this out (using / at the start of the line) to disable the endstoppullup resistors/限位開關(guān)上拉電阻配置,如果你使用的是機(jī)械式的限位開關(guān),請保留此部分/機(jī)械式限位開關(guān)請保持該處不動#ifndef ENDSTOPPULLUP

41、S /沒有配置限位開關(guān)上拉電阻時(shí),限位開關(guān)上拉電阻細(xì)分控制defi ned/ #defi ne ENDSTOPPULLUP XMAX/ #defi ne ENDSTOPPULLUP_YMAX/ #defi ne ENDSTOPPULLUP_ZMAX/ #defi ne ENDSTOPPULLUP_XMIN / #defi ne ENDSTOPPULLUP YMIN/ #defi ne ENDSTOPPULLUP ZMIN#en dif#ifdef ENDSTOPPULLUPS /配置限位開關(guān)上拉電阻時(shí),限位開關(guān)上拉電阻細(xì)分控制#defi ne ENDSTOPPULLUP_XMAX #defin

42、e ENDSTOPPULLUP YMAX #defi ne ENDSTOPPULLUPZMAX #defi ne ENDSTOPPULLUP_XMIN _#defi ne ENDSTOPPULLUP YMIN#defi ne ENDSTOPPULLUP_ZMIN #en dif/機(jī)械限位開關(guān)通常會把連線連在NC 端,這就會有個(gè)一個(gè)數(shù)字信號1 輸入到主板中。如果你的機(jī)械限位開關(guān)的連線是連在NO 端,這就需要 ENDSTOP_INVERTING 采用 ture 從而使數(shù)字信號 0 反向變?yōu)?1。對于光學(xué)開關(guān)來說,則一般不用進(jìn)行調(diào)整。J你應(yīng)該在電腦控制軟件中實(shí)際試驗(yàn)一下限位開關(guān)的方向是否與你的預(yù)期相

43、符,如果軸運(yùn)動時(shí)觸動限位開關(guān)就停止則說明,該項(xiàng)設(shè)置正常。如果沒有停止,則應(yīng)相應(yīng)修改該值。注意! ! 在做此測試時(shí),應(yīng)該給各個(gè)軸留出足夠的運(yùn)動反應(yīng)空間。以免損壞機(jī)器/ The pullups are n eeded if you directly conn ect a mecha ni cal en dswitch betwee n thesig nal and gro und pins.con stbool X_MIN_ENDSTOP_INVERTING = true; / set to true to i nvert the logic of theen dstop.con stbool Y

44、 MIN ENDSTOP INVERTING = true; / set to true to i nvert the logic of theen dstop.con stbool Z MIN ENDSTOP INVERTING = true; / set to true to i nvert the logic of theen dstop.con stbool X_MAX_ENDSTOP_INVERTING = true; / set to true to i nvert the logic of theen dstop.con stbool Y_MAX_ENDSTOP_INVERTIN

45、G = true; / set to true to i nvert the logic of theen dstop.con stbool Z_MAX_ENDSTOP_INVERTING = true; / set to true to i nvert the logic of theen dstop./#defi ne DISABLE MAX ENDSTOPS/#defi ne DISABLE_MIN_ENDSTOPS / Disable max en dstops for compatibility with en dstop checking rout ine#if defi ned(COREXY) & !defi ned(DISABLE MAX ENDSTOPS)#defi ne DISABLE_MAX_ENDSTOPS#en dif / For In verti ng Stepper En able Pins(Activ

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

評論

0/150

提交評論