411
VB and the development of wizards / Re: How to get the current subroutine file name?
« on: July 18, 2010, 12:57:07 AM »
Scanning with a script may work - you'd have to do some experimenting to see.
I can think of some things that may make it difficult - consider these in the software design.
1) The macropump period is fixed at 0.1 sec - that may or may not be the sampling frequency which will work for you.
2) an alternative to the macro pump is to start a periodic script (See StartPeriodicScript call in programmer's manual). That call allows you to set the period of the periodic script. However, this is new and only available in 3.43.6+
3) scanning the code via an asynchronous routine will mean that you may need to invent software sync/locking tools between threads (if you need the scanner routine to work in conjunction with some other script like your m6). This is not trivial since Mach has no concept of such things at the cypress basic API level.
4) When mach has a gcode file open, I think that mach opens it exclusively as I seem to remember not being able to open a gcode file in an editor when mach has the file loaded. This may cause you trouble since you are wanting to scan the file that is currently loaded into mach.
Dave
I can think of some things that may make it difficult - consider these in the software design.
1) The macropump period is fixed at 0.1 sec - that may or may not be the sampling frequency which will work for you.
2) an alternative to the macro pump is to start a periodic script (See StartPeriodicScript call in programmer's manual). That call allows you to set the period of the periodic script. However, this is new and only available in 3.43.6+
3) scanning the code via an asynchronous routine will mean that you may need to invent software sync/locking tools between threads (if you need the scanner routine to work in conjunction with some other script like your m6). This is not trivial since Mach has no concept of such things at the cypress basic API level.
4) When mach has a gcode file open, I think that mach opens it exclusively as I seem to remember not being able to open a gcode file in an editor when mach has the file loaded. This may cause you trouble since you are wanting to scan the file that is currently loaded into mach.
Dave