getting_started:overview
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | Next revisionBoth sides next revision | ||
getting_started:overview [2017/03/17 08:57] – [Control System] graf | getting_started:overview [2017/04/07 13:06] – [Hardware Abstraction Layer (HAL)] graf | ||
---|---|---|---|
Line 51: | Line 51: | ||
==== Hardware Abstraction Layer (HAL)==== | ==== Hardware Abstraction Layer (HAL)==== | ||
- | The HAL provides an interface between the program and the robot. Any command in the program must pass through the HAL in order to be carried out. Additionally, | + | The HAL provides an interface between the program and the robot. Any command in the program must pass through the HAL in order to be carried out. Additionally, |
- | <box 100% green> | ||
- | The safety system and the HAL are strongly coupled together. Make sure that all inputs and outputs in the HAL are handled by the safety system. | ||
- | </ | ||
- | |||
- | === Getting the HAL === | ||
- | <code c> | ||
- | HAL& hal = HAL:: | ||
- | </ | ||
- | |||
- | === Inputs and Outputs === | ||
- | All input and output should be observed by the safety system. The safety system decides if a in- or output can be applied or not. | ||
- | |||
- | * Define inputs and outputs: | ||
- | To access the digital I/O hardware within the comedi framework, you have to define the inputs and outputs and add them to the HAL. | ||
- | <code c> | ||
- | ComediDevice* comedi0 = new ComediDevice("/ | ||
- | ComediDevice* comedi1 = new ComediDevice("/ | ||
- | | ||
- | hal.addSystemInput(new ComediFqd(" | ||
- | hal.addSystemOutput(new ComediDigOut(" | ||
- | hal.addSystemOutput(new ComediDigOut(" | ||
- | hal.addSystemOutput(new ComediDigOut(" | ||
- | </ | ||
- | |||
- | * **Note:** The class // | ||
getting_started/overview.txt · Last modified: 2021/04/01 14:04 by jonasfrei