Hello Guest it is August 18, 2019, 01:56:45 PM

Author Topic: Should this work - Emulated Input Signal  (Read 2531 times)

0 Members and 1 Guest are viewing this topic.

Should this work - Emulated Input Signal
« on: June 11, 2013, 07:32:46 PM »
Hi,

I am a newcomer to the world of CNC, and I am just starting to play around with Mach3 (3.043.066). I have started to look at probing, and after a couple of "interesting" results I would like to try and run in some form of simulated mode, without hardware connected.

I was thinking that using Config / Ports & Pins /Input Signals and then emulating the Probe Input with a Hotkey may work. I have set it up as follows:

Probe Enabled, Port #1, Pin #13, Active Low, Emulated, HotKey 65.

Initial results looked promising, as I had a led (OEMLED(825)) on the screen that would turn green when I pressed the hotkey. I could also test the state of this LED in code and output a message showing the correct state. So far, so good.

Next part of the code uses G31 to move the probe and the IsMoving() function to determine when the probe movement has stopped. This code works ok in the "real world", but in simulation the LED goes on with the hotkey but and the probe keeps moving. I guess that some other means signals G31 that the probe has stopped moving; it does not rely directly on the state of the Probe Input pin.

Is there a way to simulate the probe making contact with the work piece that G31 will respond to.

I realise there are a number of probing routines out there, sometimes I just feel like re-inventing the wheel to keep the grey matter from stagnating too much!
Taig Lathe and Mill
G540 and Ethernet Smooth Stepper

Offline stirling

*
  • *
  •  2,188 2,188
  • UK
    • View Profile
    • www.razordance.co.uk
Re: Should this work - Emulated Input Signal
« Reply #1 on: June 13, 2013, 08:19:27 AM »
Always difficult to home in on software issues without seeing the software - maybe you could post what you have and your xml.

Offline Jeff_Birt

*
  •  1,107 1,107
    • View Profile
    • Soigeneris
Re: Should this work - Emulated Input Signal
« Reply #2 on: June 13, 2013, 09:11:03 AM »
Generally you can't simulate any 'real time' signals as they have to handled by the motion device (parallel port driver, SmoothStepper), this means the probe input needs to also be directly input into the motion device. When you do a G31 the motion device has to watch for the input and then immediately decelerate when it sees it.
Happy machining , Jeff Birt
 

Offline BR549

*
  •  6,886 6,886
    • View Profile
Re: Should this work - Emulated Input Signal
« Reply #3 on: June 13, 2013, 09:33:52 AM »
It will work IF you have the LPT driver loaded. Without it it cannot process the signal.

Just a thought, (;-) TP
Re: Should this work - Emulated Input Signal
« Reply #4 on: June 16, 2013, 04:10:11 PM »
Thanks for the responses, I'll play with the "real thing".
Taig Lathe and Mill
G540 and Ethernet Smooth Stepper
Re: Should this work - Emulated Input Signal
« Reply #5 on: June 23, 2013, 10:11:43 AM »
IIRC you can't emulate the probe signal. It has to be a real input. Just a note of caution, Using the DSPMC and Mach3 066 I had issues probing. I reverted to 032???? because it was on my thumb drive and it worked properly.
We never have the time or money to do it right the first time, but we somehow manage to do it twice and then spend the money to get it right.