Hello Guest it is April 19, 2024, 02:59:33 PM

Author Topic: MPG and Tick counter explaination....  (Read 2967 times)

0 Members and 1 Guest are viewing this topic.

Offline poppabear

*
  • *
  •  2,235 2,235
  • Briceville, TN, USA
    • View Profile
MPG and Tick counter explaination....
« on: February 21, 2011, 08:54:30 AM »
Here is the deal on the "Tick counter display", ignore the way it jumps........

Boris and his programmer of the PoKeys, told me to only update the call for the Tick counter at a minimum of 300ms intervals, I was updating the Tick counter display every 100ms, but that caused a lag in the True MPG following speed.....

    There is only so much band width you can put on the PoKeys USB connection. So I have to divide up into different intervals the calls made on the USB bus.

If I "Update" the Tick counter display, to "Normal" then the MPG performance suffers..........  the tick counter is not really that critical anyway, it is more for mach to see how much acceleration changes the MPG is experiencing per time slice.

Also, There is still some on-going issues in the way that MPGs are handled in Mach, Brian is aware and is working on them.

I have found it best to "Multi-Step", as opposed to Single Step mode.

Here is all I do in the PLUGIN for MPGs in Mach3.

I take the value the PoKeys sends me for the MPG count, and I put it in the Mach3 internal structure that holds the MPG count, Brain takes it from there inside mach3.
Also, A while back now, Brian also spun off "Thread" for the PoKeys to run in, since the HID/USB and they way mach updates is slow. The Thread was there to improve
MPG performance, and it did.

There is ALOT of functions that the pokeys does, and can do, so that loads the USB bus, It would be best for you to put the PoKeys as the ONLY object on a USB Root bus.
(look in Device manager).

So two things benefit from being on thier own USB bus:  The Smooth Stepper, and PoKeys.
each device that shares a USB root divides the band width by how many devices are connected........
So, a Data IO intensive device like the PoKeys or SS, should each be on thier own USB Root.

ALSO!!!   Your comps Processor speed has ALOT to do with it, the faster your processor, the faster and more data it can move along the bus in less time.

NOTE:  There is INHERENT LAG in the USB/HID funcitons that windows uses, it does NOT run in real time, not even close....
IF you using your MPG to position your machine, then it should be good for that, but if your trying to turn the MPG as fast as possible, you may see some lag, or
even lost steps.

In the end, no matter how many seperate threads I run, the Brick wall is for plugins (currently), a max update loop of 100ms, so during that time slice I have to
send/receive all the data that is in the USB/HID.

USB/HID will never be "Hardware" speed MPGs, (i.e. the Engine), or even "Modbus", the Overhead of USB/HID programming is HUGE!!!!

Scott





fun times