Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
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 f...
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
 ...
Hardware Abstraction Layer
(HAL)
 Component
 A HAL component is a piece of software with well-defined inputs, outputs,
a...
Hardware Abstraction Layer
(HAL)
 Signal
 In a physical machine, the terminals of real hardware components are
interconn...
Hardware Abstraction Layer
(HAL)
 Function
 Each function is a block of code that performs a specific action. The
system...
Hardware Abstraction Layer
(HAL)
 HAL Commands
 loadrt
 The command loadrt loads a real time HAL component. Real time
c...
Hardware Abstraction Layer
(HAL)
 HAL Commands
 loadusr
 The command loadusr loads a user space HAL component. User
spa...
Hardware Abstraction Layer
(HAL)
 HAL Commands
 setp
 The command setp sets the value of a pin or parameter. The valid
...
LinuxCNC HAL
development
Show me the coding
Thanks for your listening
Upcoming SlideShare
Loading in …5
×

Linux cnc overview

2,590 views

Published on

Published in: Technology
  • Login to see the comments

Linux cnc overview

  1. 1. LinuxCNC初探 DMP Electronics Inc. intern 陳伯綸(中正資工OS-Lab)
  2. 2. Outline ● About CNC ● LinuxCNC:Install、Settings、compiler ● LinuxCNC Software Overview ● LinuxCNC HAL development
  3. 3. Wikipedia
  4. 4. Work Flow
  5. 5. Software Flow of NC System
  6. 6. The Progress Direction of the CNC System
  7. 7. Download ● http://www.linuxcnc.org/index.php/english/downlo ad
  8. 8. Install build-dev ● http://www.linuxcnc.org/hardy/dists/hardy/linuxcnc ● 2.5/source/linuxcnc_2.5.3.dsc
  9. 9. Install build-dev & Git
  10. 10. Get Source
  11. 11. Building LinuxCNC
  12. 12. Building LinuxCNC
  13. 13. Building LinuxCNC
  14. 14. Building LinuxCNC
  15. 15. Building LinuxCNC
  16. 16. Building LinuxCNC
  17. 17. Source File
  18. 18. Simple LinuxCNC Controlled Machine
  19. 19. LinuxCNC Hierarchical
  20. 20. LinuxCNC Message Links
  21. 21. EMCTASK
  22. 22. EMCMOT
  23. 23. EMCIO
  24. 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. 25. The Configuration Files  The INI File Components  Comments  Sections  Variables  Custom Sections and Variables
  26. 26. The Configuration Files  Hardware Abstraction Layer (HAL)  Component  Parameter  Pin  Physical_Pin  Signal  Type  Function  Thread
  27. 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. 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. 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. 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. 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. 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.
  33. 33. LinuxCNC HAL development Show me the coding
  34. 34. Thanks for your listening

×