Re: [Emc-developers] Also prepared a Hugging Face LinuxCNC assistant. Re: LinuxCNC-aware chat bot
Some of the code it gave me # Configure motors and set acceleration limits motor.0 maxvelocity := 18000 maxaccel := 10 jerk := 500 # X motor parameters motor.1 maxvelocity := 18000 maxaccel := 10 jerk := 500 # Y motor parameters motor.2 maxvelocity := 12000 maxaccel := 7 jerk := 500 # Z motor parameters Rod Webster *1300 896 832* +61 435 765 611 Vehicle Modifications Network www.vehiclemods.net.au On Wed, 7 Feb 2024 at 23:17, Steffen Möller via Emc-developers < emc-developers@lists.sourceforge.net> wrote: > > > > Gesendet: Mittwoch, 07. Februar 2024 um 10:50 Uhr > > Von: "Rod Webster" > > An: "EMC developers" > > Betreff: Re: [Emc-developers] Also prepared a Hugging Face LinuxCNC > assistant. Aw: Re: LinuxCNC-aware chat bot > > > > It lied a lot when I asked > > > > build me a hal file for a 3 axis milling machine that uses a mesa card > > > > Below I put what chatGPT came up with - if not good enough then maybe we > should help the documentation a bit more? Hugging Face was not explicitly > pointed to our documentation (did not know how to do that). > Best, > Steffen > > ChatGPT 4 (LinuxCNC Assistant): > Creating a HAL (Hardware Abstraction Layer) file for a 3-axis milling > machine that uses a Mesa card involves defining how LinuxCNC communicates > with your hardware components, such as motors, encoders, and the Mesa card > itself. The specific Mesa card model (e.g., 7i76e, 5i25, etc.) > significantly influences the HAL file configuration due to differing > capabilities and connection methods. Below, I'll provide a basic template > for a 3-axis milling machine using a generic Mesa Ethernet card (e.g., > 7i76e) as an example. This should serve as a starting point, which you can > then customize based on your specific hardware setup and requirements. > > Before proceeding, ensure you've installed and configured LinuxCNC and > have the necessary information about your Mesa card, including its model > and IP address (if using an Ethernet card). The Mesa card should also be > configured correctly, following the Mesa documentation. > > ### Basic HAL File Template for a 3-Axis Mill with a Mesa Card > > ```hal > # Load the required modules for a Mesa card > loadrt hm2_eth board_ip="192.168.1.121" # Replace with your Mesa card IP > address > loadrt [KINS]KINEMATICS > loadrt stepgen step_type=0,0,0 > > # Load the hardware driver for the Mesa card > loadrt hostmot2 > > # Associate the Mesa card configuration > loadrt hm2_eth config="num_stepgens=3 num_encoders=3 sserial_port_0=000xxx" > > # Define step generator for each axis > net x-step <= hm2_7i76e.0.stepgen.00.step > net x-dir <= hm2_7i76e.0.stepgen.00.dir > net y-step <= hm2_7i76e.0.stepgen.01.step > net y-dir <= hm2_7i76e.0.stepgen.01.dir > net z-step <= hm2_7i76e.0.stepgen.02.step > net z-dir <= hm2_7i76e.0.stepgen.02.dir > > # Connect the step generator to the LinuxCNC motion component > net x-pos-cmd joint.0.motor-pos-cmd => hm2_7i76e.0.stepgen.00.position-cmd > net y-pos-cmd joint.1.motor-pos-cmd => hm2_7i76e.0.stepgen.01.position-cmd > net z-pos-cmd joint.2.motor-pos-cmd => hm2_7i76e.0.stepgen.02.position-cmd > > net x-vel-cmd joint.0.vel-cmd => hm2_7i76e.0.stepgen.00.velocity-cmd > net y-vel-cmd joint.1.vel-cmd => hm2_7i76e.0.stepgen.01.velocity-cmd > net z-vel-cmd joint.2.vel-cmd => hm2_7i76e.0.stepgen.02.velocity-cmd > > net x-enable joint.0.amp-enable-out => hm2_7i76e.0.stepgen.00.enable > net y-enable joint.1.amp-enable-out => hm2_7i76e.0.stepgen.01.enable > net z-enable joint.2.amp-enable-out => hm2_7i76e.0.stepgen.02.enable > > # Define feedback for each axis (if encoders are used) > # net x-encoder-pos <= hm2_7i76e.0.encoder.00.position > # net y-encoder-pos <= hm2_7i76e.0.encoder.01.position > # net z-encoder-pos <= hm2_7i76e.0.encoder.02.position > > # Feedback to LinuxCNC > # net x-pos-fb hm2_7i76e.0.encoder.00.position => joint.0.pos-fb > # net y-pos-fb hm2_7i76e.0.encoder.01.position => joint.1.pos-fb > # net z-pos-fb hm2_7i76e.0.encoder.02.position => joint.2.pos-fb > > # Estop and machine enable chains > net estop-in <= hm2_7i76e.0.gpio.00.in_not > net estop-out => hm2_7i76e.0.watchdog.timeout > net machine-enable <= iocontrol.0.machine-enable => > hm2_7i76e.0.watchdog.enable > > # Make sure to add additional configuration as needed for your specific > setup, > # such as spindle control, coolant control, additional axes, or other I/O. > ``` > > This template provides a basic structure. You'll need to adjust it to fit > your specific Mesa card model and setup, especially the `loadrt hm2_eth > config` line, which depends on the capabilities of your Mesa card and the > exact hardware you're interfacing with. Also, uncomment and configure the > encoder sections if your machine uses encoders for feedback. > > For detailed customization, consult the LinuxCNC documentation, the Mesa > card manual for your specific model, and possibly the LinuxCNC forums for > community support. > > > >
Re: [Emc-developers] Also prepared a Hugging Face LinuxCNC assistant. Re: LinuxCNC-aware chat bot
> Gesendet: Mittwoch, 07. Februar 2024 um 10:50 Uhr > Von: "Rod Webster" > An: "EMC developers" > Betreff: Re: [Emc-developers] Also prepared a Hugging Face LinuxCNC > assistant. Aw: Re: LinuxCNC-aware chat bot > > It lied a lot when I asked > > build me a hal file for a 3 axis milling machine that uses a mesa card > Below I put what chatGPT came up with - if not good enough then maybe we should help the documentation a bit more? Hugging Face was not explicitly pointed to our documentation (did not know how to do that). Best, Steffen ChatGPT 4 (LinuxCNC Assistant): Creating a HAL (Hardware Abstraction Layer) file for a 3-axis milling machine that uses a Mesa card involves defining how LinuxCNC communicates with your hardware components, such as motors, encoders, and the Mesa card itself. The specific Mesa card model (e.g., 7i76e, 5i25, etc.) significantly influences the HAL file configuration due to differing capabilities and connection methods. Below, I'll provide a basic template for a 3-axis milling machine using a generic Mesa Ethernet card (e.g., 7i76e) as an example. This should serve as a starting point, which you can then customize based on your specific hardware setup and requirements. Before proceeding, ensure you've installed and configured LinuxCNC and have the necessary information about your Mesa card, including its model and IP address (if using an Ethernet card). The Mesa card should also be configured correctly, following the Mesa documentation. ### Basic HAL File Template for a 3-Axis Mill with a Mesa Card ```hal # Load the required modules for a Mesa card loadrt hm2_eth board_ip="192.168.1.121" # Replace with your Mesa card IP address loadrt [KINS]KINEMATICS loadrt stepgen step_type=0,0,0 # Load the hardware driver for the Mesa card loadrt hostmot2 # Associate the Mesa card configuration loadrt hm2_eth config="num_stepgens=3 num_encoders=3 sserial_port_0=000xxx" # Define step generator for each axis net x-step <= hm2_7i76e.0.stepgen.00.step net x-dir <= hm2_7i76e.0.stepgen.00.dir net y-step <= hm2_7i76e.0.stepgen.01.step net y-dir <= hm2_7i76e.0.stepgen.01.dir net z-step <= hm2_7i76e.0.stepgen.02.step net z-dir <= hm2_7i76e.0.stepgen.02.dir # Connect the step generator to the LinuxCNC motion component net x-pos-cmd joint.0.motor-pos-cmd => hm2_7i76e.0.stepgen.00.position-cmd net y-pos-cmd joint.1.motor-pos-cmd => hm2_7i76e.0.stepgen.01.position-cmd net z-pos-cmd joint.2.motor-pos-cmd => hm2_7i76e.0.stepgen.02.position-cmd net x-vel-cmd joint.0.vel-cmd => hm2_7i76e.0.stepgen.00.velocity-cmd net y-vel-cmd joint.1.vel-cmd => hm2_7i76e.0.stepgen.01.velocity-cmd net z-vel-cmd joint.2.vel-cmd => hm2_7i76e.0.stepgen.02.velocity-cmd net x-enable joint.0.amp-enable-out => hm2_7i76e.0.stepgen.00.enable net y-enable joint.1.amp-enable-out => hm2_7i76e.0.stepgen.01.enable net z-enable joint.2.amp-enable-out => hm2_7i76e.0.stepgen.02.enable # Define feedback for each axis (if encoders are used) # net x-encoder-pos <= hm2_7i76e.0.encoder.00.position # net y-encoder-pos <= hm2_7i76e.0.encoder.01.position # net z-encoder-pos <= hm2_7i76e.0.encoder.02.position # Feedback to LinuxCNC # net x-pos-fb hm2_7i76e.0.encoder.00.position => joint.0.pos-fb # net y-pos-fb hm2_7i76e.0.encoder.01.position => joint.1.pos-fb # net z-pos-fb hm2_7i76e.0.encoder.02.position => joint.2.pos-fb # Estop and machine enable chains net estop-in <= hm2_7i76e.0.gpio.00.in_not net estop-out => hm2_7i76e.0.watchdog.timeout net machine-enable <= iocontrol.0.machine-enable => hm2_7i76e.0.watchdog.enable # Make sure to add additional configuration as needed for your specific setup, # such as spindle control, coolant control, additional axes, or other I/O. ``` This template provides a basic structure. You'll need to adjust it to fit your specific Mesa card model and setup, especially the `loadrt hm2_eth config` line, which depends on the capabilities of your Mesa card and the exact hardware you're interfacing with. Also, uncomment and configure the encoder sections if your machine uses encoders for feedback. For detailed customization, consult the LinuxCNC documentation, the Mesa card manual for your specific model, and possibly the LinuxCNC forums for community support. ___ Emc-developers mailing list Emc-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-developers
Re: [Emc-developers] Also prepared a Hugging Face LinuxCNC assistant. Aw: Re: LinuxCNC-aware chat bot
On Wed, 7 Feb 2024 at 11:31, Rod Webster wrote: > > It lied a lot when I asked > > build me a hal file for a 3 axis milling machine that uses a mesa card I got decent answers to "Can I use the carousel HAL component with a Fanuc encoder" and "Can I write a HAL realtime component in Python" Overall I am rather awed. -- atp "A motorcycle is a bicycle with a pandemonium attachment and is designed for the especial use of mechanical geniuses, daredevils and lunatics." — George Fitch, Atlanta Constitution Newspaper, 1912 ___ Emc-developers mailing list Emc-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-developers
Re: [Emc-developers] Also prepared a Hugging Face LinuxCNC assistant. Aw: Re: LinuxCNC-aware chat bot
It lied a lot when I asked build me a hal file for a 3 axis milling machine that uses a mesa card Rod Webster *1300 896 832* +61 435 765 611 Vehicle Modifications Network www.vehiclemods.net.au On Wed, 7 Feb 2024 at 19:38, Steffen Möller via Emc-developers < emc-developers@lists.sourceforge.net> wrote: > Hello again, > > The chatGPT Open Source competitor "Hugging Face" now also came up with > custom chat bots, calling them "Assistants". You cannot upload your own > data, yet, but you can instruct the behaviour for the bot. You find the > result publicly accessible on > > https://hf.co/chat/assistant/65c27657be7d1bc1ec217560 > > The instruction I gave was: You will act as a an expert in CNC machining > who helps new users to get their mill or lathe controlled by LinuxCNC. > > That is all I did. And this works just very well. Have not tested if the > regular version is any better or worse, would expect that regular one to > perform just as well. I is just - very good, I tend to think. > > Have fun! > Steffen > > > ___ > Emc-developers mailing list > Emc-developers@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/emc-developers > ___ Emc-developers mailing list Emc-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-developers
[Emc-developers] Also prepared a Hugging Face LinuxCNC assistant. Aw: Re: LinuxCNC-aware chat bot
Hello again, The chatGPT Open Source competitor "Hugging Face" now also came up with custom chat bots, calling them "Assistants". You cannot upload your own data, yet, but you can instruct the behaviour for the bot. You find the result publicly accessible on https://hf.co/chat/assistant/65c27657be7d1bc1ec217560 The instruction I gave was: You will act as a an expert in CNC machining who helps new users to get their mill or lathe controlled by LinuxCNC. That is all I did. And this works just very well. Have not tested if the regular version is any better or worse, would expect that regular one to perform just as well. I is just - very good, I tend to think. Have fun! Steffen ___ Emc-developers mailing list Emc-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-developers