7
« on: May 30, 2006, 11:51:56 AM »
Hi Art,
I am sure I will learn much more by a bit more reading and trying some code. Art does give us license to "play" - and doubtless break a toy or two. A few question relevant to where I am now are:
(a) Would it be possible for the InitControl () routine to be called later in Mach initialization? It feels to me that I might have to have a "first time" flag and test it in Update () so I can be sure all the Mach variables are set up before I do my initialization which is unfortunate. Config is not generally a useful place to initialize things as it will generally not be called in a working system.
(b) Art says that the plugin is not a separate thread when called during Init - Is the plugin always called in the main Mach3 thread (I am not sure I know what I mean by that). What are the "critical section/mutex" issues accessing data in Mach if one gives up control by (e.g.) using a modal dialog box? In particular the engine is obviously a separate thread so one needs to be very careful with its data (e.g. the TrajBuffer).
(c) Is there any mechanism by which a plugin can see the press on an OEM button (e.g. what could a button or macro script do to raise a flag)?
(d) By multiple threading you can "run at speeds up to 100 times per second". Does this implay one can get a latency in a plugin of 10mS? If so can you eaplain a bit further please?
(e) Very usefully it looks as though a G100 (or any other pulser) will be able to co-exist with parallel ports - not to split axes between I/O routes of course but to allow encoders or switches on the parallel. This means that the Mach "port" number range will need extending and Config in plugins needs to be able to say which "port" the plugin "drives" At present Modbus is hardwired to Port 0 and G100 to Port 1 (was 0). The config is needed because of arbitrary combinations of plugins. It may be a bit hard to explain to the user too!
Probably more later :=)
John Prentice