Hello Guest it is December 07, 2024, 03:25:47 PM

Author Topic: MACH3 index pulse C++ implementation (How to?)  (Read 14184 times)

0 Members and 1 Guest are viewing this topic.

MACH3 index pulse C++ implementation (How to?)
« on: November 04, 2021, 11:06:06 PM »
Hi,

I need to make use of the index pulse feature of MACH3 however I can't find information RE how to implement it via C++. The goal is to have a plugin developed and send the signal real-time over the API. I have a few questions before staring this project:

1. Assuming TTL signal; How would that analog source converted to digital look like so to satisfy MACH3?
2. What is the DRO that I need to update to have that index pulse recognized by MACH3?
3. What sort of min/max update freq and periods are we talking about? and is the API built-in 40Hz able to cope?

If anyone knows above that sure would help me getting started with this. Quite early in the idea, I'll update on the progress as I get into this...

Thanks
Re: MACH3 index pulse C++ implementation (How to?)
« Reply #1 on: November 05, 2021, 05:58:01 PM »
Guys, think I need some help with this. Anyone who've seen the amount of pointers we are given in Mach3 will be overwhelmed - and terrified if you've just found out about Mach3 only a week ago (like myself). There are literally hundreds of them...

Can't complain on the environment, that's all working fine. I do struggle finding the correct method to update the "True Spindle Speed" via code though. All seems to be in-line with the index concept but still doesn't wake-up that true speed even a nano-rpm. A "reserved/locked" feature perhaps?





Sending a 5Hz pulse over the input pin 11 with a 1ms delay. LED is blinking steady and reliably on the diagnostic page. Why no true RPM? 

Offline Graham Waterworth

*
  • *
  •  2,747 2,747
  • Yorkshire Dales, England
Re: MACH3 index pulse C++ implementation (How to?)
« Reply #2 on: November 05, 2021, 09:55:22 PM »
Have you got Min and Max pulley speed set in pulley 1?
Without engineers the world stops
Re: MACH3 index pulse C++ implementation (How to?)
« Reply #3 on: November 06, 2021, 03:32:38 AM »
Good thinking, thanks. Didn't had that set. For a moment I thought, that must be it.

Pulley set to No.1, Min:0 Max:1000 ratio:1:1 same no-go result though. Kinda strange, I swear I read someone saying he didn't had the spindle enabled in mach and still could make use of the index pulse RPM feature. Leaves me to assume there aren't any correlations with the actual spindle settings and therefore just an ADC rather.

Additionally; I've read a rumor on the Great Internet that this is feature allowed only on parallel port (using Art's driver). I wouldn't know where to begin to confirm that and so I've ordered what appears to be a mach3 motion control card and a LPT kit (pci-e, cable, ect). *That's just to confirm the hardware and my mach3 installation is actually working...

Not exactly a good start :/ Let's see...
Re: MACH3 index pulse C++ implementation (How to?)
« Reply #4 on: November 07, 2021, 01:44:15 PM »
Right. Received those bits & pieces and can now confirmed the True RPM index pulse and the whole installation overhaul is indeed working (Art's parallel driver, Win7-x86, Mach3 R3.043.066).

That (inexpensive) motion control board however, no comment. No RC snubber, no buffer, nothing on the inputs/outputs, etc, straight up and so spikes AC in at -1.2V below ground and DC in 6.3V @n.freq here and there! Not all that personal computer friendly but still World's Marvels worthy...

Mach3 on the other hand is absolutely epic. Getting a stable and adjustable motor PWM output (set at 1kHz), sending 5Hz 5% duty cycle PWM via a function generator; everything-just-works, certainly does the job!

So. Next. HOW TO GET THE TRUE SPINDLE PULSE WORKING VIA SOFTWARE/API?! That part is still not working, and the feature which I desperately need to achieve. Not cool :(

Contact Artsoft during business hours and see if they are keen on giving hints? In a meantime I'm all up to hear from anyone who made that work, that'd be much appreciated guys. Thanks





« Last Edit: November 07, 2021, 01:48:59 PM by Mecanix »
Re: MACH3 index pulse C++ implementation (How to?)
« Reply #5 on: November 07, 2021, 05:03:03 PM »
Found this plugin called Turn Diag and turned it ON. Anyone able to work out those output values I've recorded?
Note I have no clue what datatypes those are for the calc logic, and can't find any relevant doc on the kernel inputs except for the last visual, which leads nowhere (I've tried).

Lost cause??  :o





 
Re: MACH3 index pulse C++ implementation (How to?)
« Reply #6 on: November 08, 2021, 08:41:37 AM »
*Quick Update*

Was officially told that custom dev on Mach3 isn't recommended, nor supported. Mach4 should be used. Was under the impression that mach4 implementations were mainly for OEMs (given the legals & bureaucracy involved). And that mach3 was the way to go, doc/knowledge-wealth wise, etc.

Happy for this thread to be deleted as it does not include a solution. I've terminated this project and looking at other options as per recommendation.