Hello all,

It has been a long time since posting on this forum. I hope everyone is well. I am currently working (or thinking about working) on a circuit for one of my cnc machines. It currently exists in analog discrete form, but I thought a pic version would be well suited for an upgrade...but my thoughts are scattered with it! Hopefully one of you fine folks can lead me down the right path.

Description of machine: 3 axis cnc plasma cutting gantry

Description of circuit: torch height control

Circuit operation:
  1. Torch voltage is scaled from 120vdc to 1.2vdc.
  2. Torch voltage is then fed into a window comparator.
  3. Window comparator threshold voltage is variable from .06vdc to 1.85vdc. (representing 60-185vdc)
    Comparator has hysteresis of .01vdc + and - of the set threshold voltage. (representing a 2vdc "lock range")
  4. As the torch voltage swings out of the lock range, either comparator goes high, causing the cnc software
    to "servo" the torch back into range.
  5. The circuit also has an enable input, provided by the plasma cutter itself.
    It is simply a dry contact, "ok to move" signal which indicates the torch is cutting.

My thoughts for the pic are:

The cnc software allows direct commands to be sent from the serial port of the PC, via VB scripting.
Therefore:


1. Include all of the above features.
2. Add the option of changing the comparator threshold voltage through serial with say...
Code:
SERIN2 SerPin,84,["V",dec3 TargetVDC]
3. Add the option of changing the comparator hysteresis through serial with say...
Code:
SERIN2 SerPin,84,["H",dec1 TargetHyst]
Are these thoughts doable, and if so, can you fine folks lead me in the right direction?

Thanks to you all,
Chris