User Tools

Site Tools


eeros_architecture:hal:using_hal

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
eeros_architecture:hal:using_hal [2017/04/30 10:45] – created grafeeros_architecture:hal:using_hal [2017/04/30 10:46] (current) – external edit 127.0.0.1
Line 1: Line 1:
-===== Using HAL Objects =====+====== Using HAL Objects ======
 Hal objects are all the input and output channels given in the configuration. You can use these objects either from the safety system, the control system or the sequencer.  Hal objects are all the input and output channels given in the configuration. You can use these objects either from the safety system, the control system or the sequencer. 
  
-==== Inputs and Outputs of the Safety System ====+===== Inputs and Outputs of the Safety System =====
 The safety system can check for each of its safety levels whether the level of certain channels meet given criterias. Such channels are called critical inputs and outputs and have to be defined as such, see [[eeros_architecture:safety_system:properties#Critical Inputs and Outputs|]]. If the criterias are not met you can choose what action has to be taken, see [[eeros_architecture:safety_system:io_actions|]]. \\ The safety system can check for each of its safety levels whether the level of certain channels meet given criterias. Such channels are called critical inputs and outputs and have to be defined as such, see [[eeros_architecture:safety_system:properties#Critical Inputs and Outputs|]]. If the criterias are not met you can choose what action has to be taken, see [[eeros_architecture:safety_system:io_actions|]]. \\
 The safety system will get a handle to tha HAL object with: The safety system will get a handle to tha HAL object with:
Line 10: Line 10:
 Here, you get a reference to an digital input representing the emergency button. Please make sure that the id ("emergency") is the same as given in the configuration file. Here, you get a reference to an digital input representing the emergency button. Please make sure that the id ("emergency") is the same as given in the configuration file.
  
-==== Inputs and Outputs of the Control System ====+===== Inputs and Outputs of the Control System =====
 The control system can read from or write to the hardware solely through its [[eeros_architecture:control_system:available_blocks:peripheralinput|]] or [[eeros_architecture:control_system:available_blocks:peripheraloutput|]] block. When you declare one of these blocks you have to give an id as parameter to its constructor. The control system can read from or write to the hardware solely through its [[eeros_architecture:control_system:available_blocks:peripheralinput|]] or [[eeros_architecture:control_system:available_blocks:peripheraloutput|]] block. When you declare one of these blocks you have to give an id as parameter to its constructor.
  
Line 19: Line 19:
 Please make sure that the ids ("q0", "dac0") are the same as given in the configuration file. Please make sure that the ids ("q0", "dac0") are the same as given in the configuration file.
  
-==== Accessing Inputs and Outputs from the Sequencer ====+===== Accessing Inputs and Outputs from the Sequencer =====
 The sequencer usually does not access hardware channels directly but reads from or writes to the control system. However, it is well possible to get a direct handle to a HAL object. The sequencer usually does not access hardware channels directly but reads from or writes to the control system. However, it is well possible to get a direct handle to a HAL object.
  
-==== Exclusive Access ====+===== Exclusive Access =====
 Whenever you request an input or output from the HAL manager you will get exclusive access to this channel. This could be the safety system or the control system but not both. There might be a case where an input is a critical input to the safety system and at the same time serves as an input to to control system. In this case you can request the input with   Whenever you request an input or output from the HAL manager you will get exclusive access to this channel. This could be the safety system or the control system but not both. There might be a case where an input is a critical input to the safety system and at the same time serves as an input to to control system. In this case you can request the input with  
 <code cpp> <code cpp>
eeros_architecture/hal/using_hal.txt · Last modified: 2017/04/30 10:46 by 127.0.0.1