On Saturday 11 September 2021 05:02:47 John Dammeyer wrote:

> Hi Gene,
> Hi Gene,
>
> > I don't know much about the CAN bus, but this does sound like a
> > howto to do a relay.
>
> I'm working on the input side of things next.
>
> > But I went a different path as I am using a peristaltic pump that
> > has a std brushed motor to drive the pump. A positive displacement
> > pump quite similar to whats used at the hospital for IV drips.
>
> I'm still waiting for mine to arrive.  Latest is that it arrived at
> Canada Post in Toronto.  I'm going to guess it's going via surface
> from there to here.  So another week.

I take it you are sorta out in the toulies then? I got mine from ebay, 
bought 4 of them knowing the limited lifetime of the silicon hose the 
the pump squeezes with rollers. Its now been close to 2 years & about a 
gallon of koolmist thru it, and 3 of them are still in the bag. About $9 
usd a copy on ebay.
>
> > But the pump ran way too fast and could drain an 8oz coke bottle of
> > koolmist mix in a couple minutes, flooding the work area which had
> > no drainage or waste recovery provisions on my 6040 mill.  So I
> > setup a timer in hal to generate a variable rate PWM like signal I
> > could send to the pumps power transistor. By turning the pump on for
> > around 5 ms, and off for 250 ms, I get just enough mist to keep the
> > tool cool when that teeny pulse of the pump is pushed to the
> > workface with 3 or so lbs of air pressure with that air valve
> > controlled by the same bit that enables the pwm oscillator for the
> > motor. And I've pyvcp sliders in the gui to control how wet the
> > spray is. Now I've been looking for a suitable air pump to drive the
> > atomizer since regulators don't do well at the desired air flows and
> > it heats the shop compressor needlessly.
>
> I've gone the pressurized method with a small needle valve to regulate
> the flow and 5PSI to pressurize the reservoir.

Finding a quality needle valve is quite a challenge.

I did similar in version .001 but I didn't have adequate control, so the 
plastic coke bottle is no longer pressurized in version .01.  The pump 
is straped to the gantry riser above the little shelf the coke bottle 
sits on with a broom handle hanger loop dropped over the top of the 
bottle so if Y jerks, the bottle has to follow.

If idle for weeks, it might lose prime, but catches up and fills the weed 
eater fuel hose (that stuffs expensive) to the nozzle in around a 
minute, quicker if I speed up the motor. Sorta complex but suits my 
needs well.

I've considered doing that on the other machines but would need to 
recycle the drainage better. That plus I'd druther not get cast iron 
wet. Koolmist is wetter than water and carry's the way lube away.  
Somewhat Like a mild photoflow that was used in a chemical darkroom 
before digital cameras took over 40 years ago.

I used to do that too, in a past life, even formulated my own color print 
developer that didn't fade sitting in the warm bath for 4 hours. My 
stuff could make 8 identical 8x10 wedding photos in a row, all at the 
same filter settings on the enlarger. Commercial mix couldn't do that, 
it faded too fast.

But that was then, now I'll be 87 in a couple weeks. And alone again.

> But if there are 
> issues I will have a pump to do what you are doing.  However, I'll use
> the same module I'm using for the power draw bar.  It has PWM 0-10V
> capabilities so I can include the PWM value with the relay values.
>
> Not sure how to do sliders yet on the AXIS interface.

Piece of cake John, the pyvcp .xml file snippet that draws them:
but there's a wagon load of stuff above it too. :o)
========================
  <labelframe text= "mist motor speed">
        <vbox>
          <hbox>
        <spinbox>
              <width>("5")</width>
                  <halpin>"mist-on-adj"</halpin>
          <min_>.000</min_>
          <max_>.025</max_>
          <initval>.005</initval>
          <resolution>0.001</resolution>
          <format>".3f"</format>
          <font>("Helvitica",12)</font>
          <param_pin>0</param_pin>
        </spinbox>
        <spinbox>
                  <width>("5")</width>
                  <halpin>"mist-off-adj"</halpin>
              <min_>.000</min_>
              <max_>.250</max_>
              <initval>.100</initval>
              <resolution>0.001</resolution>
              <format>".3f"</format>
              <font>("Helvitica",12)</font>
              <param_pin>0</param_pin>
        </spinbox>
      </hbox>
    </vbox>
  </labelframe>
==============
then in postgui.hal:
================
# for mister pump motor speed ctrl
net mister-spdon        <= pyvcp.mist-on-adj  => timedelay.3.off-delay
net mister-spdoff       <= pyvcp.mist-off-adj => timedelay.3.on-delay
================
then in the main.hal:
================
6040-5i25-7i76-rs485.hal:addf  xor2.1                servo-thread
# turns mister on/off
6040-5i25-7i76-rs485.hal:net mist-on => xor2.1.in0
# turn on pump motor speed control
6040-5i25-7i76-rs485.hal:net osc-fdbck  <= xor2.1.out => timedelay.3.in
# make speed timer oscillator
6040-5i25-7i76-rs485.hal:net mister-out  <= timedelay.3.out => xor2.1.in1
================
and:
================
loadrt timedelay    count=4 #.3 is mist motor timer
loadrt xor2         count=2 #.1 one is mist-ctl
6040-5i25-7i76-rs485.hal:addf  timedelay.3  servo-thread 
# is mist oscillator
6040-5i25-7i76-rs485.hal:net osc-fdbck  <= xor2.1.out => timedelay.3.in
# make speed timer oscillator
6040-5i25-7i76-rs485.hal:net mister-out  <= timedelay.3.out => xor2.1.in1
================
The xor2.1 is the on-off switch for te oscillator, interrupting the 
feedback path when the mist button is off

Note too, that depending on what else you already have in the .hal file, 
the .number. may change.

> And I will 
> continue to post the code as it develops.  I'm already up to Rev 0.2
> now.  Moved the read routine outside the send routine as it was in the
> original serial code.   The CANUSB would signal buffer overruns
> because unless one of the outputs changed the function might not be
> called for hours.
>
> More as things progress.
> John

[...]

I think thats all of it. Cuss at me if its not.

Take care John.

Cheers, Gene Heskett
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
If we desire respect for the law, we must first make the law respectable.
 - Louis D. Brandeis
Genes Web page <http://geneslinuxbox.net:6309/gene>


_______________________________________________
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to