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.

> 
> 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.  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.  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 cut out a couple chuck wrenches from 1/2" thick alu plate, one to fit
> that spindle motors double flatted shaft and one to fit the ER nut, on
> half of that 8oz bottle of koolmist. And that was almost too much.
> 
> But it added to linuxcnc's job by making it do the pump timing. It does
> it, but I would have preferred to put that timing on the end of a cable
> that only had to be updated when the desired status changed. I think
> this might be the method I would have used had it been available 2 years
> ago, so thank you John. I believe you have added to linuxcnc's
> capabilities.
> 
> > > -----Original Message-----
> > > From: John Dammeyer [mailto:jo...@autoartisans.com]
> > > Sent: September-10-21 10:11 AM
> > > To: 'Enhanced Machine Controller (EMC)'
> > > Subject: Re: [Emc-users] Serial Port access
> > >
> > > Hi Andy,
> > >
> > > The output below shows CANopen PDO message #2 (0x300) to ID 0x18, 1
> > > byte, alternating between 0x01 and 0x00 being issued once per
> > > second.
> > >
> > > pi@raspberrypi:~/projects/python $ python TestSerial.py
> > > Sent CAN message with relay value = t318101
> > > Sent CAN message with relay value = t318100
> > > Sent CAN message with relay value = t318101
> > > Sent CAN message with relay value = t318100
> > > Sent CAN message with relay value = t318101
> > >
> > > The little module shown in that photo I posted last time is
> > > connected to a pneumatic valve on Output #1.  It clicks ON and OFF
> > > once per second.   The code is running as a Python Command line
> > > program on a standard Raspian distro.  I'll bring out the Pi4 with
> > > LinuxCNC and take a look at linking into the HAL file.
> > >
> > > IMHO the Python serial is very clumsy for dealing with serial with
> > > all the format and .encode parameters for simple character strings.
> > > The source code is attached.
> > >
> > > John Dammeyer
> > >
> > > > From: andy pugh [mailto:bodge...@gmail.com]
> > > >
> > > > On Thu, 9 Sept 2021 at 05:31, John Dammeyer <
> <mailto:jo...@autoartisans.com> jo...@autoartisans.com> wrote:
> > > > > I've been reading
> > > > >  <http://linuxcnc.org/docs/2.4/html/hal_comp.html>
> > > > > http://linuxcnc.org/docs/2.4/html/hal_comp.html
> > > >
> > > > For this application I think that a Python userspace component
> > > > using Pyserial is probably the easier approach.
> > > >
> > > >  <http://linuxcnc.org/docs/2.8/html/hal/halmodule.html>
> > > > http://linuxcnc.org/docs/2.8/html/hal/halmodule.html
> > > >
> > > > --
> > > > atp
> 
> 
> 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



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

Reply via email to