Hello Guest it is April 29, 2024, 03:25:31 AM

Author Topic: Signal Library - RPM change signal?  (Read 600 times)

0 Members and 1 Guest are viewing this topic.

Signal Library - RPM change signal?
« on: January 30, 2022, 11:57:21 AM »
Continuing my mission to use the Signal Library to control a VFD via MODBUS...

Is there a signal in the Signal Library that's raised when the spindle RPM is changed?

On that topic, is there a document anywhere with all the signals listed?

Thanks

Tommy
Re: Signal Library - RPM change signal?
« Reply #1 on: January 30, 2022, 02:44:08 PM »
Hi,
spindle speed is not a signal per se, its a continuously varying register quantity.

A signal, in Mach, has two states, either a 1 or a 0, or equivalently True or False, whereas spindle speed is a number.
For instance if you have a button logically connected to a Mach signal say ISIG_INPUT43, then the Signal Script will run every time
that signal changes state ie you hit the button.

A reasonable list of input and output signals are in Mach4CorAPI.chm under Mach Signals/Input signals and Mach Signals/Output Signals in Mach4Hobby/Docs folder
or alternately the <Help Docs?> button on Machs main screen.

If you want direct access to the register that Machs core uses to store its current spindle speed setting, its called a Pound Variable, which are viewable and editable in
Machs Diagnostic/Regfile/# Variables.

You will find a number of them described here:

https://www.machsupport.com/forum/index.php?topic=40051.0

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'
Re: Signal Library - RPM change signal?
« Reply #2 on: January 31, 2022, 04:54:32 PM »
You could use the 'On Update Script' of your spindle RPM DRO to send a modbus command every time it is updated
Re: Signal Library - RPM change signal?
« Reply #3 on: February 07, 2022, 06:50:29 AM »
Thanks both

@Craig - I figured it was something along those lines but you explained it very succinctly and clearly, thanks.

@SwiftyJ, good suggestion, I'll definitely look into that.

As it turns out I was trying to solve a problem that didn't exist. I didn't want Mach4 sending spindle speed updates to the VFD every cycle of the PMC but it appears that Mach4 is smart enough to only send updates if the new value written to the register is different to the previous value. Apologies to the coder(s) for my lack of faith :-)