User stock removal programs
14.6 Calculate circle data (CALCDAT)
Job planning
14-16 Programming Manual, 03/2006 Edition, 6FC5398-2BP10-1BA0
Example
The program determines whether the three points lie along the arc of a circle.
(5*>@
;
<
(5*>@
(5*>@
N10 DEF REAL PT[3,2]=(20,50,50,40,65,20) ;Points definition
N20 DEF REAL RES[3] ;Result
N30 DEF BOOL STATUS ;Variable for the status
N40 STATUS = CALCDAT(PT,3,RES) ;Call calculated circle data
N50 IF STATUS == FALSE GOTOF ERROR ;Jump to error