[Home]History of WatchPoints

LinuxCNCKnowledgeBase | RecentChanges | PageIndex | Preferences | LinuxCNC.org

Revision 12 . . (edit) April 9, 2012 8:22 am by MichaelHaberler
Revision 11 . . (edit) March 30, 2012 3:42 pm by MichaelHaberler
Revision 10 . . (edit) March 30, 2012 3:33 pm by MichaelHaberler
Revision 9 . . (edit) March 30, 2012 10:55 am by MichaelHaberler
Revision 8 . . March 30, 2012 10:45 am by MichaelHaberler [*add complex start condition example]
Revision 7 . . (edit) March 30, 2012 9:09 am by MichaelHaberler
Revision 6 . . (edit) March 30, 2012 5:56 am by MichaelHaberler
Revision 5 . . (edit) March 30, 2012 5:31 am by MichaelHaberler
Revision 4 . . March 30, 2012 4:30 am by MichaelHaberler
Revision 3 . . March 30, 2012 4:22 am by MichaelHaberler
Revision 2 . . (edit) March 30, 2012 4:21 am by MichaelHaberler
Revision 1 . . March 30, 2012 4:15 am by MichaelHaberler [*Describe Interpreter Watchpoints, and relation to RFL]
  

Difference (from prior major revision) (minor diff)

Removed: 68d67
** delete_watchpoint(int num)

Removed: 71d69
** modify_watchpoint(int num, int flags)

Added: 84a83,84
The watchpoint mask might change often; the Run-From-Line condition is derived as ' execute commands after watchpoint 0 has been found true for the first time'.


Added: 101a102,103
;py,this.set_watchpoint(1,0) # disable wp 1


Added: 127a130,155
Update: the easiest method to deal with it: in the action, raise InterpreterException?,"message". In the calling code, detect that and abort the interpreter with that message.

Example for a complex start condition




The watchpoint in the following example reads as:
* start executing when in Oword subroutine 'mysub' AND
* the named parameter '#<val>' exists AND
* #<val> is < 2

;load and point on the next line in Axis, then RFL - this will override the default run-from-line watchpoint
;py,this.set_watchpoint(0,"this.sub_context[this.call_level].subname == 'mysub' and this.params.exists('val') and this.params['val'] < 3")

o<mysub> sub

o200 if [#1 GT 0]
(debug, before val assignment)
#<val> = #1
(debug,val=#<val>)
o<mysub> call [#1 - 1]
o200 endif
o<mysub> endsub

o<mysub> call [5]
m2



Changed: 155c183

Update: this doesnt work - there seems to be an assumption about increasing motion id's, maybe in the tp.

LinuxCNCKnowledgeBase | RecentChanges | PageIndex | Preferences | LinuxCNC.org
Search:
Published under a Creative Commons License