Hi Guys,
We don't currently support other MPG motions from other Plugins. Mach3 isn't well documented on how it is supposed to work. But it seems that there are some Encoder/MPG data structures where if a Plugin places MPG data the Parallel Port Kernel driver would perform the motion. Our plugin does not do this. See the description from the Mach3 Plugin "Bible" below.
I would expect other functionality of Pokeys to work. Such as basic IO and keyboard press emulation.
If someone has a Pokeys MPG and is willing to run experiments we can probably figure out where Pokeys is placing the MPG data. It isn't clear to me where the MPG count is in the structure shown. Maybe in one of the two Index counts?
But we recommend connecting MPGs directly to KFLOP for the best response. That is the only way to avoid potential delays in Windows/PC/USB.
Regards
From the bible:
Encoders & MPG's
On each interrupt the engine will also count encoder positions and track the counts.
These counts are put in the following structures of which 7 copies are maintained.
Four for simple encoders and 3 for MPG's.
struct Encoder
{
bool Active; // is the encoder turned on?
int APin; // A Pin designations
int BPin; // B Pin designations
int APort; // A Pin Ports
int BPort; // B Pin Ports
bool LastStateA;
bool LastStateB; // storage for the last known state
int Count[2]; // Index counts for each encoder
int Memory[16];
int ActiveMemory;
int Color;
};
The same rules apply as for inputs and outputs. If the port number is not 1 or 2, then
the engine will not fill those variables and a plug-in or Brain is expected to do so if
they are enabled. On each loop of the applications run it will check the MPG and
encoder values, update any DRO's involved and , if the jog mode is set to MPG will
move the axis in correspondence with the MPG mode in effect. The only reason
MPG's must be switched on is that when the MPG stops and its velocity is zero the
DEC variable of the jog registers is set to true to auto stop any jog. A rewrite of this
will likely allow for Jogging via MPG at any time and will probably be done in future.
When doing an MPG jog the current velocity of the MPG must be calculated by the
application if in printer port mode, or sent in via brain or plug-in if using plugins or
modbus devices to set the mpg. Examples of the timing clock interface are in the
current example brains showing a g100 using a MPG from its encoder inputs.