DMC1000 controls calorie of application in Laser Cutting

  • Time:
  • Click:134
One, function and craft ask 1. Accept file of common planar vector graph, be like PLT, DXF. 2. Handle graphical treatment early or late ordinal, reach treatment way. 3. Can handle a figure simply, if choose, rotate, translation, mirror, duplicate, arrange etc. 4. But the hand is moved debug equipment, reach detect input output. 5. Treatment control can adjust speed, need pauses, continue, interrupt wait for control. 6. When treatment needs to show, spend, time, the partial user information such as the position 7. But set machines working origin, laser switch control (do not care laser energy to adjust here) 2, systematic flow 3, use function hand uses the function that debugs need to finish: The input outputs a test, the hand uses drive pulse, detect moving condition, suspend an action, look for mechanical origin: Corresponding function attune is: D1000_out_bit number outputs function, controallable the open of laser or shut D1000_get_in_bit to read hand of D1000_start_tr_move of input opening position to use hair pulse, can use odd axis to nod a moving D1000_check_done to detect D1000_decel_stop of athletic condition function stops pulse to output (it is better that decelerate stops) D1000_home_move odd axis looks for much axis of origin function D1000_home_move_all to look for origin function D1000_board_init to control calorie of initialization D1000_board_close to control calorie of release position to display the function that reachs cleared need: D1000_get_abs_position obtains function of position of set of absolutely position D1000_set_position, it is when the value 0 when the function that cleared treatment control needs the place: Speed of D1000_change_speed of speed of interpolation of vector of set of D1000_set_vector_profile of function of two axes interpolation changes D1000_start_ta_line2 speed 4, the process designing of core part is among actual process designing, more detail needs to solve: 1. Need considers to answer treatment time-out, continue, discontinuous operation, the position shows etc 2. Position of the XY after time-out needs a record, possible XY is moved to removed by the hand 3. Machine whole graph, need is returned quit the position, so that take,expect 4. Open laser to close laser, the reaction time that needs to consider laser 5. Between actual application, when laser not when open, to raise rate, can use directly nod a motion 6. The adjustment that needs to need rate handles an attention: The following code reflects only practical process designing idea only, won't can pass compile implement compile leisure of Const UINT NORUN =00000; // , or interrupt condition Const UINT RUNNING =00001; // to run status label Const UINT ConTINUE =00002; // to continue to mark record of UINT M_nWorkStatus = NORUN; // of label of time-out of Const UINT PAUSE =00003 // machines condition, NORUN Void OnButtonStart of initiative melt into () { / / begin pushbutton (can become time-out, continue, begin to use, below certain circumstance, continue to be separated with time-out betterer) If (RunData.

GetSize ()<1) { MessageBox (" do not have treatment data or did not make treatment way " , " clew " ) ; Return; , } Switch (M_nWorkStatus) if { Case NORUN:// is disengaged, immediate treatment M_nWorkStatus = RUNNING; // runs RunData () if moving,; // calls Break; Case RUNNING:// of treatment core function, interrupt M_nWorkStatus = PAUSE; StopMove (X, y) if continue to handle Nextpagevoid OnButtonStop of } of Break; } to suspend M_nWorkStatus = CONTINUE;// ,; // stops XY drive Break; Case PAUSE:// () { / / interrupt treatment to handle M_nWorkStatus = NORUN; StopMove (X, y) Double FRunSpeed of; } (10.

0) Void RunData of speed of; // treatment () { / / the definition of data RunData is: The definition of CarrayrunData //CDPoint, can refer to [process designing technology] data Const Int NSize = RunData.

GetSize () rate of progress planned speed of; // processing spends Progress.

SetRang (0, NSize) the breakpoint BOOL BPause=false; For that when; CDPoint PntBreak; // pauses, records (Int I (0) ; I { : DoEvent () message of a system handles; // function Switch (M_nWorkStatus) if { Case PAUSE:// is time-out, simply Continue; Case CONTINUE of message of abide check system: M_nWorkStatus = RUNNING; Case RUNNING: { If (IsMove (X, y) ) Break;// if XY is moving, continue Const CDPoint &pt = RunData[I]; If of testing system message (I==0 | | BPause) { BPause = False; // arrives quickly the a bitth or breakpoint I==0? Fast_moveto (Pt.

X, pt.

Y) : / / achieve the a bitth Fast_moveto (PntBreak.

X, pntBreak.

Y) ;// achieves breakpoint While (IsMove (X, y) ) : DoEvent () ;// waits to achieve positional If (M_nWorkStatus==RUNNING) { OpenLasert (Nio) Sleep of laser of; // open (Ti_open) Con_Line_move of } of Continue; of } of delay time of; // open (Pt.

X, pt.

Y, FRunSpeed) ; // here uses divide evenly fast, because of While of discomfort of Laser Cutting speed (IsMove (X, y) ) : DoEvent () ; If (M_nWorkStatus==PAUSE) { CloseLasert (NIO) ;// shuts laser Sleep (Ti_close) ;// shuts delay time BPause = True;// to have suspensive PntBreak.

X = GetX () ; PntBreak.

Y = GetY () Else If of } of position of;// record breakpoint (M_nWorkStatus==RUNNING) { / / finish I ++; Progress of a several foothold normally.

PostMessage (PM_POS, i, 0) ; // replaces plan } } / / } of End Case Running / / } of End Switch Workstatus / / End For I CloseLasert (NIO) ;// shuts laser Sleep (Ti_close) ;// shuts delay time If (M_nWorkStatus! = NORUN) { / / machine Fast_moveto orderly (StopX, stopY) ;// achieves quit the position / / { of Else of } of other computation processing / / clew treatment interrupts } } Void OnVscrollSpeed () { / / response speed incident adjusts FRunSpeed += 1; or FRunSpeed -=1; D1000_change_speed (FRunSpeed) ;// speed watch changes } to notice: : : DoEvent function is in [process designing technology] medium or " process designing ace " OpenLasert and CloseLasert function can be found to finish a D1000_out_bit to operate two axes of Fast_moveto embedded XY to nod only in the book or the interpolation drive function of two axes of embedded XY of Con_line_move of interpolation drive function (it is commonly often fast) . This program did not consider pulse equivalent relation, need processing of user proper motion, offer;2 of train of thought of a kind of process designing only here. Partial parameter needs an user to adopt set, it is simple introduction;3 only here. Use partial structure needs referenced other data, or the incoming telegram seeks advice from;4. Control operation is among actual application, the character that needs to change pushbutton shows, the user needs advertent;5. Whole system, need demarcate speed and;6 of demarcate XY limits. In system of certain Laser Cutting, the control of laser is relatively complex, thought of its process designing agrees basically. CNC Milling