User Tools

Site Tools


eeros_architecture:hal:configuration_file

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
eeros_architecture:hal:configuration_file [2017/06/29 15:40] – [Available Keywords] grafeeros_architecture:hal:configuration_file [2019/08/14 14:13] (current) – [Available Keywords] graf
Line 1: Line 1:
 ====== Configuration File ====== ====== Configuration File ======
-The external hardware is decribed by means of a configuration file in [[http://json.org|JSON]] format. Every available hardware must be grouped into device, subdevice and channel. A device could be a data acquisition card, an external FPGA, or a pointing device such as a mouse. The subdevice denotes a certain function such as a group of digital-to-analog outputs or a bank of digital inputs. Finally, a channel is one of such a group of inputs or outputs.\\+The external hardware is decribed by means of a configuration file in [[http://json.org|JSON]] format. Every available hardware must be grouped into device, subdevice and channel. A device could be a data acquisition card, an external FPGA, or a pointing device such as a mouse. The subdevice denotes a certain function such as a group of digital-to-analog outputs or a bank of digital inputs. Finally, a channel is one of such a group of inputs or outputs. The complete list of available keywords can be found at [[eeros_architecture:hal:configuration_file#available_keywords|Available Keywords]].\\
 Let's consider a first example  Let's consider a first example 
 <code> <code>
Line 26: Line 26:
                        "minOut": -10.0, "maxOut":  10.0 },                        "minOut": -10.0, "maxOut":  10.0 },
                    ],                    ],
 +          "safe": 0.0,
           "unit": "V"           "unit": "V"
         }         }
Line 39: Line 40:
  
 ===== Type ===== ===== Type =====
-A subdevice must contain a ''type'' key. This type must coincide with the subdevice type of the hardware library in use. Some subdevices contain channels of different types, e.g. a subdevice might hold several digital i/o's. Some will work as inputs while some other will be outputs. In this case you define the subdevice as being of type ''DigIn''single input channel inherits its type from the subdevice. If it is an output you can redefine the type for the channel.+A subdevice must contain a ''type'' key. This type must coincide with the subdevice type of the hardware library in use. Some subdevices contain channels of different types, e.g. a subdevice might hold several digital i/o's. Some will work as inputs while some other will be outputs. In this case you define the subdevice as being of type ''DigIn''single input channel inherits its type from the subdevice. If it is an output you can redefine the type for the channel.
 <code> <code>
   "subdevice5": {   "subdevice5": {
Line 57: Line 58:
  
 ===== Scale and Range ===== ===== Scale and Range =====
-Channels carrying an analog signal must be assigned a ''scale'' and ''range'' key. With these values the HAL is able to translate between the analog signal and its digital value as this digital value is necessary when accessing the hardware converter (counter, adc, dac). For examples in how to setup the scale and range properly see [[eeros_architecture:hal:scaling|]].+Channels carrying an analog signal or channels with counter inputs must be assigned a ''scale'' and ''range'' key. With these values the HAL is able to translate between the analog signal and its digital value as this digital value is necessary when accessing the hardware converter (counter, adc, dac). For examples in how to setup the scale and range properly see [[eeros_architecture:hal:scaling|]]. There are cases where the HAL should account for several stages on a scalable input or output, see [[eeros_architecture:hal:scaling_multi|]].
  
 +===== Safe Value for Analog Output =====
 +An analog output can have an associated //safe// value. If a //NAN// of //INF// value would be written to its output, the output value will instead be set to its //safe// value. This helps to guarantee that a drive will not get out of control. //NAN// or //INF// can occur, if a connection between blocks is open, if a block does not run or if an algorithm within a block produces this result due to an error. If the configuration does not specify a //safe// value, it is set to //NAN//
 ===== Available Keywords ===== ===== Available Keywords =====
 ^ Keyword ^ Type ^ Remarks ^ ^ Keyword ^ Type ^ Remarks ^
 | deviceX | object | device, X is the device number | | deviceX | object | device, X is the device number |
-| library | string | EEROS wrapper library, give full name of library including fileending (*.so) and version (*.so.0.1.2) | +| library | string | EEROS wrapper library, give full name of library including file ending and version (e.g. *.so.0.1.2) | 
-| devHandle | string | device node which will be used for this device/group of subdevices |+| devHandle | string | device node which will be used for this device/group of subdevices, must correspond to device file |
 | subdeviceY | object | subdevice, group of channels with specific type | | subdeviceY | object | subdevice, group of channels with specific type |
 | type | string | describes the type of this subdevice group, name has to be the same as the library-name in your wrapper library | | type | string | describes the type of this subdevice group, name has to be the same as the library-name in your wrapper library |
 | channelZ | object | describes one channel of this type | | channelZ | object | describes one channel of this type |
 | signalId | string | unique signal id for this channel, with this name you can claim the signal in your EEROS application | | signalId | string | unique signal id for this channel, with this name you can claim the signal in your EEROS application |
-| inverted | bool | invert value of this channel (working for digital in/outputs) |+| inverted | bool | invert value of this channel (for digital in/outputs) |
 | scale | object/array | scale for scalable channel | | scale | object/array | scale for scalable channel |
 | range | object/array | range values for scalable channel | | range | object/array | range values for scalable channel |
Line 78: Line 81:
 | scale | double | scale value to set scale of scalable in-/output directly, do not mix with scale object! | | scale | double | scale value to set scale of scalable in-/output directly, do not mix with scale object! |
 | offset | double | offset value to set offset of scalable in-/output directly | | offset | double | offset value to set offset of scalable in-/output directly |
 +| safe | double | safe value, used for scalable outputs|
 | unit | string | unit of this in-/output, used for scalable in-/outputs| | unit | string | unit of this in-/output, used for scalable in-/outputs|
 +| additionalArguments | string | used for communicating with ROS, see [[hardware_libraries#ros|ROS]], configuration file for ROS see [[config_ros]]|
  
  
  
eeros_architecture/hal/configuration_file.1498743632.txt.gz · Last modified: 2017/06/29 15:40 by graf