http://gnipsel.com/linuxcnc/examples.html

On 6/1/2015 10:06 AM, Ralph Stirling wrote:
> I've been puzzling for a long time how one would create sequential state
> machines in hal logic, and it finally dawned on me that you guys are doing
> that in things like pyvcp or axis.  It would be nice if hal itself could have 
> a
> good mechanism for defining states and state transition logic.  Have I
> missed something?
>
> -- Ralph
> ________________________________________
> From: Kirk Wallace [[email protected]]
> Sent: Monday, June 01, 2015 7:49 AM
> To: [email protected]
> Subject: Re: [Emc-users] Classic Ladder running motor x mm.
>
> On 06/01/2015 04:50 AM, andy pugh wrote:
>> On 1 June 2015 at 04:33, Sven Wesley <[email protected]> wrote:
>>> Trying to figure out if there's any way to run a motor, either a stepper or
>>> servo, a given distance with classic ladder _without_ having a XYZ
>>> configuration.
>>
>> Yes, this is fairly easy. The stepgen and PID components don't care
>> where their setpoints come from. If the motors only need to run at one
>> speed you can simply set the stepgen max_speed and max_acc pins to the
>> required values. However typically you would use the limit3 HAL
>> component to supply position, velocity and acceleration limits for the
>> motor.
>>
>> Rather than CL I would consider making a simple Glade UI to supply the
>> setpoints and control the sequencing but if the controls are all
>> physical switches you could even run the PC without a display and
>> provide all operate feedback vial lamps and buttons.
> This could be a start to a HAL controller:
> http://www.wallacecompany.com/machine_shop/LinuxCNC/gvcpDRO/
>
> Just plug in the appropriate HAL components, such as LimitX and/or PID
> and others. The sequencing and logic can be done in Python. I used a
> similar setup (LimitX) except embedded in axis for my mill tool carousel:
> http://www.wallacecompany.com/machine_shop/Shizuoka/100_1136-1a.jpg
> http://www.wallacecompany.com/machine_shop/Shizuoka/100_1133-1a.JPG
> http://www.wallacecompany.com/machine_shop/Shizuoka/Carousel_Overview-1a.png
>
> I did some sequencing in an automated tester:
> http://wallacecompany.com/tmp/Screenshot_lathe_bd_test.png
> First pass:
> http://wallacecompany.com/tmp/auto_test_ui/
>
> which used a comp similar to my lathe turret comp.
> http://www.wallacecompany.com/cnc_lathe/HNC/emc2/turret.comp
>
>> To set up such a "HAL-only" config you need a HAL file that starts the
>> threads and loads CL and/or a Python GUI. You don't need to load
>> motmod and there is no need for a G-code interpreter.
>> One difference between such a HAL-only config HAL file and a typical
>> one is that it needs to explicitly start the realtime threads with the
>> "start" command.
>>
>> You can then create an icon that runs halrun -f myhalfile.hal for easy
>> launching.
>>
>> loadrt threads period1=50000 period2=1000000 name1=base-thread
>> name2=servo-thread
>> loadrt stepgen step_type=0,0,0
>> loadrt limit3 count=3
>> addf stepgen.0.make-pulses base-thread
>> addf stepgen.0.capture-position servo-thread
>> ...
>> setp stepgen.0.step-length 4000
>> ...
>> net limit3.0.out stepgen.0.position-cmd
>> setp limit3.0.min -100
>> ...
>> loadrt classicladder ......
>> ....
>>
>> start
>>
>
> --
> Kirk Wallace
> http://www.wallacecompany.com/machine_shop/
> http://www.wallacecompany.com/E45/
>
> ------------------------------------------------------------------------------
> _______________________________________________
> Emc-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/emc-users
>
> ------------------------------------------------------------------------------
> _______________________________________________
> Emc-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/emc-users


------------------------------------------------------------------------------
_______________________________________________
Emc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to