SlideShare a Scribd company logo
1 of 34
LinuxCNC初探
DMP Electronics Inc.
intern 陳伯綸(中正資工OS-Lab)
Outline
● About CNC
● LinuxCNC:Install、Settings、compiler
● LinuxCNC Software Overview
● LinuxCNC HAL development
Wikipedia
Work Flow
Software Flow of NC System
The Progress Direction of the
CNC System
Download
● http://www.linuxcnc.org/index.php/english/downlo
ad
Install build-dev
● http://www.linuxcnc.org/hardy/dists/hardy/linuxcnc
● 2.5/source/linuxcnc_2.5.3.dsc
Install build-dev & Git
Get Source
Building LinuxCNC
Building LinuxCNC
Building LinuxCNC
Building LinuxCNC
Building LinuxCNC
Building LinuxCNC
Source File
Simple LinuxCNC
Controlled Machine
LinuxCNC Hierarchical
LinuxCNC Message Links
EMCTASK
EMCMOT
EMCIO
The Configuration Files
 INI : The ini file overrides defaults that are compiled into the
LinuxCNC code.
 HAL: The HAL files start up process modules and provide
linkages between LinuxCNC signals and specific hardware
pins.
 VAR: The var file is a way for the interpreter to save some
values from one run to the next. These values are saved from
one run to another but not always saved immediately.
 TBL:The tbl file saves tool information.
 NML: The nml file configures the communication channels
used by the LinuxCNC. It is normally setup to run all of the
communication within a single computer but can be modified
to communicate between several computers.
The Configuration Files
 The INI File Components
 Comments
 Sections
 Variables
 Custom Sections and Variables
The Configuration Files
 Hardware Abstraction Layer (HAL)
 Component
 Parameter
 Pin
 Physical_Pin
 Signal
 Type
 Function
 Thread
Hardware Abstraction Layer
(HAL)
 Component
 A HAL component is a piece of software with well-defined inputs, outputs,
and behavior, that can be installed and interconnected as needed.
 Parameter
 Many hardware components have adjustments that are not connected
to any other components but still need to be accessed. There are two
types of parameters: input & Output .
 Pin
 Hardware components have terminals which are used to interconnect
them. The HAL equivalent is a pin or HAL pin. HAL pins are software entities
that exist only inside the computer.
 Physical_Pin
 Many I/O devices have real physical pins or terminals that connect to
external hardware. To avoid confusion, these are referred to as physical
pins. These are the things that stick out into the real world.
Hardware Abstraction Layer
(HAL)
 Signal
 In a physical machine, the terminals of real hardware components are
interconnected by wires.
 Type
 Bit - a single TRUE/FALSE or ON/OFF value
 float - a 64 bit floating point value, with approximately 53 bits of resolution
and over 1000 bits of dynamic range.
 u32 - a 32 bit unsigned integer, legal values are 0 to 4,294,967,295
 s32 - a 32 bit signed integer, legal values are -2,147,483,647 to
+2,147,483,647
 Both pins and signals have types, and signals can only be connected to
pins of the same type
Hardware Abstraction Layer
(HAL)
 Function
 Each function is a block of code that performs a specific action. The
system integrator can use threads to schedule a series of functions to be
executed in a particular order and at specific time intervals.
 Thread
 A thread is a list of functions that runs at specific intervals as part of a
realtime task. When a thread is first created, it has a specific time interval
(period), but no functions. Functions can be added to the thread, and will
be executed in order every time the thread runs.
Hardware Abstraction Layer
(HAL)
 HAL Commands
 loadrt
 The command loadrt loads a real time HAL component. Real time
component functions need to be added to a thread to be updated
at the rate of the thread
 addf
 The command addf adds a real time component function to a
thread. You have to add a function from a HAL real time component
to a thread to get the function to update at the rate of the thread.
Hardware Abstraction Layer
(HAL)
 HAL Commands
 loadusr
 The command loadusr loads a user space HAL component. User
space programs are their own separate processes, which optionally
talk to other HAL components via pins and parameters. You cannot
load real time components into user space.
 net
 The command net creates a connection between a signal and and
one or more pins. If the signal does not exist net creates the new
signal.
Hardware Abstraction Layer
(HAL)
 HAL Commands
 setp
 The command setp sets the value of a pin or parameter. The valid
values will depend on the type of the pin or parameter.
 unlinkp
 The command unlinkp unlinks a pin from the connected signal. If no
signal was connected to the pin prior running the command, nothing
happens.
LinuxCNC HAL
development
Show me the coding
Thanks for your listening

More Related Content

What's hot

Jtag presentation
Jtag presentationJtag presentation
Jtag presentation
klinetik
 
UVM Update: Register Package
UVM Update: Register PackageUVM Update: Register Package
UVM Update: Register Package
DVClub
 
Implementation strategies for digital ics
Implementation strategies for digital icsImplementation strategies for digital ics
Implementation strategies for digital ics
aroosa khan
 
Verilog Lecture5 hust 2014
Verilog Lecture5 hust 2014Verilog Lecture5 hust 2014
Verilog Lecture5 hust 2014
Béo Tú
 

What's hot (20)

Pwm technique for dc motor Using Arduino
Pwm technique for dc motor Using ArduinoPwm technique for dc motor Using Arduino
Pwm technique for dc motor Using Arduino
 
Thesis report 16 bit RISC processor
Thesis report 16 bit RISC processorThesis report 16 bit RISC processor
Thesis report 16 bit RISC processor
 
Complete ASIC design flow - VLSI UNIVERSE
Complete ASIC design flow - VLSI UNIVERSEComplete ASIC design flow - VLSI UNIVERSE
Complete ASIC design flow - VLSI UNIVERSE
 
Implementation of Soft-core processor on FPGA (Final Presentation)
Implementation of Soft-core processor on FPGA (Final Presentation)Implementation of Soft-core processor on FPGA (Final Presentation)
Implementation of Soft-core processor on FPGA (Final Presentation)
 
Verilog code for 16-bit RISC processor
Verilog code for 16-bit RISC processor Verilog code for 16-bit RISC processor
Verilog code for 16-bit RISC processor
 
Code GPU with CUDA - SIMT
Code GPU with CUDA - SIMTCode GPU with CUDA - SIMT
Code GPU with CUDA - SIMT
 
FPGA Overview
FPGA OverviewFPGA Overview
FPGA Overview
 
42 PPT-5 BOUNDARY SCAN....pptx
42 PPT-5 BOUNDARY SCAN....pptx42 PPT-5 BOUNDARY SCAN....pptx
42 PPT-5 BOUNDARY SCAN....pptx
 
Jtag presentation
Jtag presentationJtag presentation
Jtag presentation
 
UVM Update: Register Package
UVM Update: Register PackageUVM Update: Register Package
UVM Update: Register Package
 
Unit v. HDL Synthesis Process
Unit v. HDL Synthesis ProcessUnit v. HDL Synthesis Process
Unit v. HDL Synthesis Process
 
S7 400 h
S7 400 hS7 400 h
S7 400 h
 
Implementation strategies for digital ics
Implementation strategies for digital icsImplementation strategies for digital ics
Implementation strategies for digital ics
 
FPGA DESIGN FLOW.pdf
FPGA DESIGN FLOW.pdfFPGA DESIGN FLOW.pdf
FPGA DESIGN FLOW.pdf
 
Event driven simulator
Event driven simulatorEvent driven simulator
Event driven simulator
 
Uvm dac2011 final_color
Uvm dac2011 final_colorUvm dac2011 final_color
Uvm dac2011 final_color
 
Zynq architecture
Zynq architectureZynq architecture
Zynq architecture
 
JTAG Interface (Intro)
JTAG Interface (Intro)JTAG Interface (Intro)
JTAG Interface (Intro)
 
Verilog Lecture5 hust 2014
Verilog Lecture5 hust 2014Verilog Lecture5 hust 2014
Verilog Lecture5 hust 2014
 
UVM ARCHITECTURE FOR VERIFICATION
UVM ARCHITECTURE FOR VERIFICATIONUVM ARCHITECTURE FOR VERIFICATION
UVM ARCHITECTURE FOR VERIFICATION
 

Similar to Linux cnc overview

Virtual platform
Virtual platformVirtual platform
Virtual platform
sean chen
 
Preparing to program Aurora at Exascale - Early experiences and future direct...
Preparing to program Aurora at Exascale - Early experiences and future direct...Preparing to program Aurora at Exascale - Early experiences and future direct...
Preparing to program Aurora at Exascale - Early experiences and future direct...
inside-BigData.com
 
Chapter 02
Chapter 02Chapter 02
Chapter 02
cclay3
 

Similar to Linux cnc overview (20)

The Basics of programming
The Basics of programmingThe Basics of programming
The Basics of programming
 
Agnostic Device Drivers
Agnostic Device DriversAgnostic Device Drivers
Agnostic Device Drivers
 
VHDL_VIKAS.pptx
VHDL_VIKAS.pptxVHDL_VIKAS.pptx
VHDL_VIKAS.pptx
 
Virtual platform
Virtual platformVirtual platform
Virtual platform
 
Cockatrice: A Hardware Design Environment with Elixir
Cockatrice: A Hardware Design Environment with ElixirCockatrice: A Hardware Design Environment with Elixir
Cockatrice: A Hardware Design Environment with Elixir
 
vhdl
vhdlvhdl
vhdl
 
Arduino reference
Arduino referenceArduino reference
Arduino reference
 
Vhdl
VhdlVhdl
Vhdl
 
Preparing to program Aurora at Exascale - Early experiences and future direct...
Preparing to program Aurora at Exascale - Early experiences and future direct...Preparing to program Aurora at Exascale - Early experiences and future direct...
Preparing to program Aurora at Exascale - Early experiences and future direct...
 
Xilinx track g
Xilinx   track gXilinx   track g
Xilinx track g
 
Chapter 02
Chapter 02Chapter 02
Chapter 02
 
VLSI
VLSIVLSI
VLSI
 
Harmonia open iris_basic_v0.1
Harmonia open iris_basic_v0.1Harmonia open iris_basic_v0.1
Harmonia open iris_basic_v0.1
 
FPGA workshop
FPGA workshopFPGA workshop
FPGA workshop
 
Raspberry pi glossary of terms dictionary extended
Raspberry pi glossary of terms dictionary extendedRaspberry pi glossary of terms dictionary extended
Raspberry pi glossary of terms dictionary extended
 
VLSI
VLSIVLSI
VLSI
 
Tutor1
Tutor1Tutor1
Tutor1
 
Eric Theis resume61.1
Eric Theis resume61.1Eric Theis resume61.1
Eric Theis resume61.1
 
Arduino Teaching Program
Arduino Teaching ProgramArduino Teaching Program
Arduino Teaching Program
 
Introduction to Blackfin BF532 DSP
Introduction to Blackfin BF532 DSPIntroduction to Blackfin BF532 DSP
Introduction to Blackfin BF532 DSP
 

Recently uploaded

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Recently uploaded (20)

What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 

Linux cnc overview

  • 1. LinuxCNC初探 DMP Electronics Inc. intern 陳伯綸(中正資工OS-Lab)
  • 2. Outline ● About CNC ● LinuxCNC:Install、Settings、compiler ● LinuxCNC Software Overview ● LinuxCNC HAL development
  • 5. Software Flow of NC System
  • 6. The Progress Direction of the CNC System
  • 23. EMCIO
  • 24. The Configuration Files  INI : The ini file overrides defaults that are compiled into the LinuxCNC code.  HAL: The HAL files start up process modules and provide linkages between LinuxCNC signals and specific hardware pins.  VAR: The var file is a way for the interpreter to save some values from one run to the next. These values are saved from one run to another but not always saved immediately.  TBL:The tbl file saves tool information.  NML: The nml file configures the communication channels used by the LinuxCNC. It is normally setup to run all of the communication within a single computer but can be modified to communicate between several computers.
  • 25. The Configuration Files  The INI File Components  Comments  Sections  Variables  Custom Sections and Variables
  • 26. The Configuration Files  Hardware Abstraction Layer (HAL)  Component  Parameter  Pin  Physical_Pin  Signal  Type  Function  Thread
  • 27. Hardware Abstraction Layer (HAL)  Component  A HAL component is a piece of software with well-defined inputs, outputs, and behavior, that can be installed and interconnected as needed.  Parameter  Many hardware components have adjustments that are not connected to any other components but still need to be accessed. There are two types of parameters: input & Output .  Pin  Hardware components have terminals which are used to interconnect them. The HAL equivalent is a pin or HAL pin. HAL pins are software entities that exist only inside the computer.  Physical_Pin  Many I/O devices have real physical pins or terminals that connect to external hardware. To avoid confusion, these are referred to as physical pins. These are the things that stick out into the real world.
  • 28. Hardware Abstraction Layer (HAL)  Signal  In a physical machine, the terminals of real hardware components are interconnected by wires.  Type  Bit - a single TRUE/FALSE or ON/OFF value  float - a 64 bit floating point value, with approximately 53 bits of resolution and over 1000 bits of dynamic range.  u32 - a 32 bit unsigned integer, legal values are 0 to 4,294,967,295  s32 - a 32 bit signed integer, legal values are -2,147,483,647 to +2,147,483,647  Both pins and signals have types, and signals can only be connected to pins of the same type
  • 29. Hardware Abstraction Layer (HAL)  Function  Each function is a block of code that performs a specific action. The system integrator can use threads to schedule a series of functions to be executed in a particular order and at specific time intervals.  Thread  A thread is a list of functions that runs at specific intervals as part of a realtime task. When a thread is first created, it has a specific time interval (period), but no functions. Functions can be added to the thread, and will be executed in order every time the thread runs.
  • 30. Hardware Abstraction Layer (HAL)  HAL Commands  loadrt  The command loadrt loads a real time HAL component. Real time component functions need to be added to a thread to be updated at the rate of the thread  addf  The command addf adds a real time component function to a thread. You have to add a function from a HAL real time component to a thread to get the function to update at the rate of the thread.
  • 31. Hardware Abstraction Layer (HAL)  HAL Commands  loadusr  The command loadusr loads a user space HAL component. User space programs are their own separate processes, which optionally talk to other HAL components via pins and parameters. You cannot load real time components into user space.  net  The command net creates a connection between a signal and and one or more pins. If the signal does not exist net creates the new signal.
  • 32. Hardware Abstraction Layer (HAL)  HAL Commands  setp  The command setp sets the value of a pin or parameter. The valid values will depend on the type of the pin or parameter.  unlinkp  The command unlinkp unlinks a pin from the connected signal. If no signal was connected to the pin prior running the command, nothing happens.
  • 34. Thanks for your listening