blockPhysicalDataRead

Read physical value (in volts or milliamps) from Comedi ADC channel
Diagram of PhysicalDataRead

Extends from Modelica_DeviceDrivers.Utilities.Icons.ComediBlockIcon (Icon for (Linux) Comedi blocks).

Information

The parameter comedi needs to be set to a valid Comedi device handle, i.e., needs to be set to the record member dh of a ComediConfig record instance.

Uses the Comedi function comedi_to_phys(..) to convert a raw input obtained from the ADC to a physical value (volts or milliamps) . See the Comedi documentation for the meanings of the parameters subDevice, channel, range, aref.

Note

Only supported for Linux, since Comedi is only available for linux (http://www.comedi.org/). Requires that Comedilib is installed and that the simulation process has sufficient privileges to access the intended device (usually that means "root" privileges).

Parameters

TypeNameDefaultDescription
Modelica.Units.SI.PeriodsampleTime0.01Sample time of block
ComedicomediHandle to comedi device
IntegersubDevice0Subdevice
Integerchannel0Channel
Integerrange0Range
Types.ArefarefTypes.Aref.AREF_GROUND(ground) Reference to use

Connectors

TypeNameDefaultDescription
Modelica.Blocks.Interfaces.RealOutputy