Hello Guest it is March 28, 2024, 06:30:41 PM

Poll

feed rate, oem button

feed rate
0 (0%)
oem button
0 (0%)

Total Members Voted: 0

Author Topic: Mach 4  (Read 962 times)

0 Members and 1 Guest are viewing this topic.

Mach 4
« on: December 23, 2018, 07:13:31 AM »
Hello
I have just installed Mach 4 with the IP-M controller.
And now I have 2 questions
1. I have installed a potentiometer for the feed, when I turn it also changes the feed rate on the screen but not the jog, you can change that.
2. I can not find any settings for OEM switches eg. Start-Stop break.

greeting
Torsten
Re: Mach 4
« Reply #1 on: December 23, 2018, 01:49:08 PM »
Hi,
1) Yes you can do this, note that typically the jog rate and the feed rate are separate. If you wish to link them you can use this API:

Quote
LUA Syntax:
rc = mc.mcJogSetRate(
      number mInst,
      number axisId,
      number percent)

Description:
Set the jog rate of the given axis as a percentage of the axis' maximum velocity.

You could write a small script in the PLC script which would then continuously cause the jog rate to be the same or some fixed percentage of the feed rate.

Quote
2. I can not find any settings for OEM switches eg. Start-Stop break.

OEMs are a Mach3 term and do not occur in Mach4 at all. You need to read the manual:
Quote
Mach4 CNC Controller
Lua Scripting Guide

found in the Docs folder of your Mach4Hobby directory, particularly section 5.1 page 18. You will find that Mach4 signals
are handled in a different manner to Mach3, in particular they are not polled as in Mach3 and consequently lend themselves to treatment
in a Signal Library Table. Understanding how the Signal Library Table works is a major breakthrough in your understanding of Mach4
and a perfect example of the 'function as a first class value' programming paradigm that is offered by Lua. A simple concept.....but Oh so
valuable!

Thereafter you will find input signal (ISIG_INPUT*********) and output signals (OSIG_OUTPUT*********) listed in the API.chm in the docs folder.
I have attached aof list, I find it useful enough I have put it in the Docs folder as well. There are hundreds of signals defined.

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'
Re: Mach 4
« Reply #2 on: December 23, 2018, 05:47:48 PM »
thank you