get_value

Amperometer.get_value(unit: str | None = None) Current | float | int

It gets the electric current of the target motor object.

If a unit is set, then it converts the electric current to that unit and returns only the numerical value as float or integer.

Parameters

unitstr, optional

The unit to which convert the target electric current. If specified, it converts the electric current and returns only the numerical value as float or integer, otherwise it returns a Current. Default is None, so it returns a Current.

Returns

Current or float or int

Electric Current of the target motor object.

Raises

TypeError

If unit is not a str.