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