. .
Page 1 of 2 12 LastLast
  1. #1
    Neale's Avatar
    Lives in Plymouth, United Kingdom. Last Activity: 14 Hours Ago Has been a member for 9-10 years. Has a total post count of 1,672. Received thanks 292 times, giving thanks to others 10 times.
    I have recently bought a second-hand CNC mill. The control system uses Mach3 plus Ethernet SmoothStepper. It came with both a table-mounted tool height setter and a spindle-mounted touch probe - nothing fancy, not exactly Renishaw, but electrically it seems to work OK. The control box has dedicated sockets for both tool-setter and probe, Mach3 is configured (ports and pins) to recognise both devices, and in the "Diagnostics" page you can see both inputs trip when their respective devices are triggered. Mach3 also has the "Probe" input set to the same port and pin as the tool-setter. That all works fine - there are macros for auto toolheight setting on tool change, etc, and that seems OK.

    Tonight I was trying to get the probe working. The problem seems to be that both tool-setter and probe macros use G31 for probing (the standard mach3 probe command - nothing surprising there) but of course G31 uses the "Probe" input - and that is set to the tool-setter port/pin. I cannot see how I can use the probe without doing a Mach3 config change to switch the "Probe" input to the probe port/pin - which would be a pain!

    Have I missed something here? As the TS and the probe have separate dedicated inputs, I would assume that the system builder intended them to be used simultaneously, but I can't see how to tell Mach3 to use one for TS operations and one for probing. I would be happy to tweak the relevant macros if there is an alernative to G31 to use a different input pin, but I'm not aware of how I could do this.

    Any thoughts, guys?

    Thanks,

  2. #2
    Neale's Avatar
    Lives in Plymouth, United Kingdom. Last Activity: 14 Hours Ago Has been a member for 9-10 years. Has a total post count of 1,672. Received thanks 292 times, giving thanks to others 10 times.
    I've been doing some digging and experimenting on this. I'm going to document my thoughts and findings just in case someone else - so many years after Mach3 was officially obsolete - happens to want to do the same thing.

    Problem - I have a Mach3/SmoothStepper setup, with a probe and a toolsetter connected to different ports on the ESS. How can I use G31 probe commands for both probing and tool-height setting without going into "ports and pins" to reset the probe input setting each time?

    I started with a possible electronic solution. Take both inputs, clean them up (Schmitt trigger?) and combine the outputs (possibly nothing more complicated than a couple of isolating diodes) into one output. Not easy to do outside the existing control box as I would need a 5V supply. Not really difficult but a bit messy. So put a small board with relevant components inside the box. I find that all the signal connectors are actually mounted on a motherboard so not easy to break into the existing pin connections to go to my proposed signal combiner. I also notice that the ESS board is not quite standard. They have turned over two of the 26-pin ports so that they are on the print, not component, side of the board so that the ESS actually plugs on to the motherboard to pick up all the active signals. However, the third port has been left on the top of the board and is accessible. So, an electronic solution would be possible but a bit messy with either an external box plus PSU or hacking the motherboard.

    Next thought - how about using Mach3 brains? That is, the Mach3 version of a PLC capability. So, quick brain thrown together so that the two input signals are OR'ed together and feed the Probe input as their output. Doesn't work - the probe input doesn't seem to respond. Fiddle about with various options for probe (enable/disable/port+pin settings, etc) but can't get it to work. Seems like, in common with most motion controllers, the ESS takes over the probe input and monitors it in firmware, and the brain output is ignored. No way forward there.

    But what if I direct the brain output to a pin on the currently-unused port 3? Then connect that output pin to an input pin, and use that as the source of the probe signal? Sounds promising, especially as the port has a pair of adjacent input/output pins that I can connect with a standard .1" pitch jumper. Try that - the dianostic screen shows it all working, but when I come to run the various macros, it does not work as expected. I do eventually notice that after running the tool-height macro, the probe input pin has been reset to match the TH input pin. How did that happen?

    Back to the macro and start reading the code more carefully. I find something I've never seen before - the SetInputData command. Can't find any documentation on it, except for a single comment that it seems to have been introduced in version .066 - the last one released. The comments in the macro code around it give me a clue - it appears to select a specified port and pin for the Probe input. This is probably why I was seeing the probe input definition changing during testing. I keep the TH macros as they are, and modify the probing macros (I'm using the Probe Wizard freeby set for probing) to use the same command but switching to the external "probe" pin before G31 is called. And now, when I run a TH macro, it uses the TH setter on the machine bed, and when I run a probing macro (any of the dozen or so that I had to modify), it uses the probe input. Magic!

    I reckon my brain-to-ouput-pin-jumper-to-input-pin would have also worked, but it came down to using a brain and a jumper plus modifying the TH macros or just modifying the probing macros. I took the second approach, which does involve using a command that I cannot find documented, but it works fine. Now, the last job remaining is making a new probe and spindle for the actual probe itself which I managed to break during testing, when the input didn't switch when it should...

    As I say, no idea if anyone will ever use this information but seemed better to publish it than sit on it, just so that Google can pick it up one day for others to maybe use.

  3. The Following User Says Thank You to Neale For This Useful Post:


  4. #3
    I'd be interested in your quest.

  5. #4
    Neale's Avatar
    Lives in Plymouth, United Kingdom. Last Activity: 14 Hours Ago Has been a member for 9-10 years. Has a total post count of 1,672. Received thanks 292 times, giving thanks to others 10 times.
    I've tried to summarise what I have found out about SetInputData in the Machsupport forum (see here).

    However, I've only found two sources of information - one is a comment on that other forum that this command was only introduced in .066, and the other is in the comments in the macro code that uses the command. Not a lot to go on!

    There appears to be three parameters - the first seems to correspond to the ESS port in a way that I do not understand, the second is the pin number, and the third whether it's active low or high. What I can say is that it certainly seems to work, and I have a full set of tool-setter and probe macros that switch between input pins for probing reliably.

    I would be pretty sure that my other approach would work as well, that avoids the need for SetDataInput altogether and so would work on any version of Mach3. That is, using a brain to OR together two inputs, send that to an output, and jumper that to a single input pin to be used for all G31 calls. However, in my case. either approach would have meant modifying existing macros and I chose to use the SetDataInput call as the lesser of the two evils.

    Happy to try to answer any specific questions or discuss further.

  6. #5
    I vaguely remember this from the Mach3 Yahoo group and how it came about. The yahoo group is now finished but I might still have some access to it because I used to save all the messages so I could access them later if needed. However, these are on an HD on an old PC which I'll have to dig out.

    I've got a feeling it was simply for this exact reason so probe and tool setter could be used together.
    -use common sense, if you lack it, there is no software to help that.

    Email: dean@jazzcnc.co.uk

    Web site: www.jazzcnc.co.uk

  7. #6
    Neale's Avatar
    Lives in Plymouth, United Kingdom. Last Activity: 14 Hours Ago Has been a member for 9-10 years. Has a total post count of 1,672. Received thanks 292 times, giving thanks to others 10 times.
    Be great if you could find that some time, but no rush at all as I've figured out enough to get that bit working.

    I'm banging my head on a brick wall at the moment trying to get an auto-zero Z probe macro working. I've managed to fix small problems in a bunch of the other probing macros and they're all fine - it's what should be the easiest one that driving me potty. I'll get there - I'm not letting a little bit of code beat me. I've written one for the CSMIO, and that didn't even use G31 so it should be simple...

  8. #7
    Quote Originally Posted by Neale View Post
    ...

    Back to the macro and start reading the code more carefully. I find something I've never seen before - the SetInputData command. Can't find any documentation on it, except for a single comment that it seems to have been introduced in version .066 - the last one released. The comments in the macro code around it give me a clue - it appears to select a specified port and pin for the Probe input. This is probably why I was seeing the probe input definition changing during testing. I keep the TH macros as they are, and modify the probing macros (I'm using the Probe Wizard freeby set for probing) to use the same command but switching to the external "probe" pin before G31 is called. And now, when I run a TH macro, it uses the TH setter on the machine bed, and when I run a probing macro (any of the dozen or so that I had to modify), it uses the probe input. Magic!

    ...
    Hi Neale,

    I got exactly the same problem. I tried to user the "SetDataInput(22,12,0) " in a m1s launched thru a Version R3.043.066 FR, but unfortunately i got a "scripter compile error". Can SetDataInput be integrated into a m1s macro file? Is it my french version who do dot support SetDataInput?

    FYI, it seems first parameter is Mach3 pin, not ESS pin. If you open the machine definition file (XML), you'll see 22 seems to be the probe input.

    I know this is an old thread, but thank you per advance of your answer, and sorry for my poor english :). Fortunately i'm better in French :)..

  9. #8
    Neale's Avatar
    Lives in Plymouth, United Kingdom. Last Activity: 14 Hours Ago Has been a member for 9-10 years. Has a total post count of 1,672. Received thanks 292 times, giving thanks to others 10 times.
    Malheureusement, j’écris mieux en anglais! En particulier, quand on a besoin de parler des trucs techniques…

    I have just checked some of my macros and I definitely have a copy of M6end.m1s which has a "setdatainput" command in it. Unfortunately, I have replaced the original Ethernet SmoothStepper in my CNC mill with a UC300ETH and changed from Mach3 to UCCNC at the same time so I cannot do any testing. Perhaps there is an issue with the .066 french version? I believe that this command is only implemented in .066 but perhaps the French version is not identical? I do not know if there is any chance that you could test using the English version?

  10. #9
    Quote Originally Posted by Neale View Post
    Malheureusement, j’écris mieux en anglais! En particulier, quand on a besoin de parler des trucs techniques…

    I have just checked some of my macros and I definitely have a copy of M6end.m1s which has a "setdatainput" command in it. Unfortunately, I have replaced the original Ethernet SmoothStepper in my CNC mill with a UC300ETH and changed from Mach3 to UCCNC at the same time so I cannot do any testing. Perhaps there is an issue with the .066 french version? I believe that this command is only implemented in .066 but perhaps the French version is not identical? I do not know if there is any chance that you could test using the English version?
    I managed it to wok, see my post : https://civade-com.translate.goog/po...en&_x_tr_hl=en

    Or in french : https://civade.com/post/2022/05/24/U...%29-dans-MACH3

    Yours,
    JPC

  11. Quote Originally Posted by Neale View Post
    Malheureusement, j’écris mieux en anglais! En particulier, quand on a besoin de parler des trucs techniques…

    I have just checked some of my macros and I definitely have a copy of M6end.m1s which has a "setdatainput" command in it. Unfortunately, I have replaced the original Ethernet SmoothStepper in my CNC mill with a UC300ETH and changed from Mach3 to UCCNC at the same time so I cannot do any testing. Perhaps there is an issue with the .066 french version? I believe that this command is only implemented in .066 but perhaps the French version is not identical? I do not know if there is any chance that you could test using the English version?
    Do the probes only activate an input if contact is made?.
    As in the input is not active when probes not in use?.
    Usually classed as NO connection.

    If uccnc can't do multi:
    A workaround in this case could be connecting probes / setters to an optocoupler module and connecting the module outputs in parallel to a single input on the UC300eth.
    Any one of the opto channels going active will activate the uc300 input.

    Or something like that.

    Most of my control system is 24v, I use cheapish 24v npn/pnp input > 5v npn output opto mudules directly onto the inputs of ports 4 & 5.
    On the outputs of 4 & 5, I use 5v pnp/npn in > 24v npn out.
    They work a treat for switching.
    Last edited by dazp1976; 1 Week Ago at 11:29 PM.

Page 1 of 2 12 LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 3
    Last Post: 24-10-2020, 09:06 AM
  2. Multiple EMI filters versus a single filter for multiple drives
    By johnsattuk in forum General Electronics
    Replies: 3
    Last Post: 29-01-2018, 02:34 PM
  3. Edge Probe + tool length probe on same input
    By Noplace in forum General Electronics
    Replies: 1
    Last Post: 18-06-2016, 10:12 AM
  4. Help with Mach3 inputs and VB script ?
    By EddyCurrent in forum Artsoft Mach (3 & 4)
    Replies: 6
    Last Post: 27-11-2013, 05:35 PM
  5. Are VFD 0-10V inputs isolated or tied to gnd?
    By m_c in forum Motor Drivers & Controllers
    Replies: 3
    Last Post: 21-09-2013, 08:50 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •