DMC1000 controls calorie of application in Laser Cutting
- Time:
- Click:134
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