# Welcome to SMmultiio’s documentation!
# Install
```bash
sudo pip install SMmultiio
```
or
```bash
sudo pip3 install SMmultiio
```
# Update
```bash
sudo pip install SMmultiio -U
```
or
```bash
sudo pip3 install SMmultiio -U
```
# Initiate class
```console
$ python
Python 3.11.8 (main, Feb 12 2024, 14:50:05) [GCC 13.2.1 20230801] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import multiio
>>> mio = multiio.SMmultiio()
>>>
```
# Documentation
<a id="module-multiio"></a>
### *class* multiio.SMmultiio(stack=0, i2c=1)
Bases: `object`
Python class to control the Multiio Card for Raspberry Pi.
* **Parameters:**
* **stack** (*int*) – Stack level/device number.
* **i2c** (*int*) – i2c bus number
#### cal_i_in(channel, value)
Calibrate 4-20mA input channel.
Calibration must be done in 2 points at min 10mA apart.
* **Parameters:**
* **channel** (*int*) – Channel number
* **value** (*float*) – Real(measured) amperage value
#### cal_i_out(channel, value)
Calibrate 4-20mA output channel.
Calibration must be done in 2 points at min 10mA apart.
* **Parameters:**
* **channel** (*int*) – Channel number
* **value** (*float*) – Real(measured) amperage value
#### cal_rtd_res(channel, value)
Calibrate rtd resistance.
* **Parameters:**
* **channel** (*int*) – RTD channel number to calibrate
* **value** (*float*) – Real(measured) resistance in ohm
#### cal_u_in(channel, value)
Calibrate 0-10V input channel.
Calibration must be done in 2 points at min 5V apart.
* **Parameters:**
* **channel** (*int*) – Channel number
* **value** (*int*) – Voltage value
#### cal_u_out(channel, value)
Calibrate 0-10V output channel.
Calibration must be done in 2 points at min 5V apart.
* **Parameters:**
* **channel** (*int*) – Channel number
* **value** (*float*) – Real(measured) voltage value
#### calib_status()
Get current calibration status of device.
* **Returns:**
(int) Calib status
#### get_all_leds()
Get all leds state as bitmask.
* **Returns:**
(int) Leds state bitmask
#### get_all_opto()
Get all optocoupled input status as a bitmask.
* **Returns:**
(int) Optocoupled bitmask
#### get_all_relays()
Get all relays state as bitmask.
* **Returns:**
(int) Relays state bitmask
#### get_button()
Get button status.
* **Returns:**
(bool) status
: True(ON)/False(OFF)
#### get_button_latch()
Get button latch status.
* **Returns:**
(bool) status
: True(ON)/False(OFF)
#### get_i_in(channel)
Get 4-20mA input channel value in mA.
* **Parameters:**
**channel** (*int*) – Channel number
* **Returns:**
(float) 4-20mA input channel value in mA
#### get_i_out(channel)
Get 4-20mA output channel value in mA.
* **Parameters:**
**channel** (*int*) – Channel number
* **Returns:**
(float) 4-20mA output value in mA
#### get_led(led)
Get led state.
* **Parameters:**
**led** (*int*) – Led number
* **Returns:**
0(OFF) or 1(ON)
#### get_motor()
Get motor speed value in %.
* **Returns:**
(float) Motor speed value in %
#### get_opto(channel)
Get optocoupled input status.
* **Parameters:**
**channel** (*int*) – Channel number
* **Returns:**
(bool) Channel status
#### get_opto_counter(channel)
Get optocoupled inputs edges counter for one channel.
* **Parameters:**
**channel** (*int*) – Channel number
* **Returns:**
(int) opto counter
#### get_opto_edge(channel)
Get optocoupled channel counting edges status.
* **Parameters:**
**channel** (*int*) – Channel number
* **Returns:**
(int) Counting edge status
: 0(none)/1(rising)/2(falling)/3(both)
#### get_opto_encoder_counter(channel)
Get optocoupled encoder counter for one channel.
* **Parameters:**
**channel** (*int*) – Channel number
* **Returns:**
(int) Opto encoder counter
#### get_opto_encoder_state(channel)
Get optocoupled quadrature encoder state.
* **Parameters:**
**channel** (*int*) – Encoded channel number
* **Returns:**
(int) state 0(disabled)/1(enabled)
#### get_relay(relay)
Get relay state.
* **Parameters:**
**relay** (*int*) – Relay number
* **Returns:**
(int) Relay state
#### get_rtc()
Get rtc time.
* **Returns:**
(tuple) date(year, month, day, hour, minute, second)
#### get_rtd_res(channel)
Get RTD resistance in ohm.
* **Parameters:**
**channel** (*int*) – RTD channel number
* **Returns:**
(float) RTD resistance value
#### get_rtd_temp(channel)
Get RTD temperature in Celsius.
* **Parameters:**
**channel** (*int*) – RTD channel number
* **Returns:**
(float) RTD Celsius value
#### get_servo(channel)
Get servo position value in %.
* **Parameters:**
**channel** (*int*) – Channel number
* **Returns:**
(float) Servo position value in % for specified channel.
#### get_u_in(channel)
Get 0-10V input channel value in volts.
* **Parameters:**
**channel** (*int*) – Channel number
* **Returns:**
(float) Input value in volts
#### get_u_out(channel)
Get 0-10V output channel value in volts.
* **Parameters:**
**channel** (*int*) – Channel number
* **Returns:**
(float) 0-10V output value
#### get_version()
Get firmware version.
Returns: (int) Firmware version number
#### reset_opto_counter(channel)
Reset optocoupled inputs edges counter.
* **Parameters:**
**channel** (*int*) – Channel number
#### reset_opto_encoder_counter(channel)
Reset optocoupled encoder counter for one channel.
* **Parameters:**
**channel** (*int*) – Channel number
#### set_all_leds(val)
Set all leds states as bitmask.
* **Parameters:**
**val** (*int*) – Led bitmask
#### set_all_relays(val)
Set all relays states as bitmask.
* **Parameters:**
**val** (*int*) – Relay bitmask
#### set_i_out(channel, value)
Set 4-20mA output channel value in mA.
* **Parameters:**
* **channel** (*int*) – Channel number
* **value** (*float*) – Amperage value in mA
#### set_led(led, val)
Set led state.
* **Parameters:**
* **led** (*int*) – Led number
* **val** – 0(OFF) or 1(ON)
#### set_motor(value)
Set motor speed value in %.
* **Parameters:**
**value** (*float*) – Speed value in %
#### set_opto_edge(channel, value)
Set optocoupled channel counting edges status.
* **Parameters:**
* **channel** (*int*) – Channel number
* **value** (*int*) – Counting edge status
0(none)/1(rising)/2(falling)/3(both)
#### set_opto_encoder_state(channel, state)
Set optocoupled quadrature encoder state.
* **Parameters:**
* **channel** (*int*) – Encoded channel number
* **state** (*int*) – 0(disabled)/1(enabled)
#### set_relay(relay, val)
Set relay state.
* **Parameters:**
* **relay** (*int*) – Relay number
* **val** – 0(OFF) or 1(ON)
#### set_rtc(year, month, day, hour, minute, second)
Set rtc time.
* **Parameters:**
* **year** (*int*) – current year
* **month** (*int*) – current month
* **day** (*int*) – current day
* **hour** (*int*) – current hour
* **minute** (*int*) – current minute
* **second** (*int*) – current second
#### set_servo(channel, value)
Set servo position value in %.
* **Parameters:**
* **channel** (*int*) – Channel number
* **value** (*float*) – Servo position value in %
#### set_u_out(channel, value)
Set 0-10V output channel value in volts.
* **Parameters:**
* **channel** (*int*) – Channel number
* **value** (*float*) – Voltage value
#### wdt_clear_reset_count()
Clear watchdog counter.
#### wdt_get_init_period()
Get watchdog initial period.
* **Returns:**
(int) Initial watchdog period in seconds
#### wdt_get_off_period()
Get watchdog off period in seconds.
* **Returns:**
(int) Watchfog off period in seconds.
#### wdt_get_period()
Get watchdog period in seconds.
* **Returns:**
(int) Watchdog period in seconds
#### wdt_get_reset_count()
Get watchdog reset count.
* **Returns:**
(int) Watchdog reset count
#### wdt_reload()
Reload watchdog.
#### wdt_set_init_period(period)
Set watchdog initial period.
* **Parameters:**
**period** (*int*) – Initial period in second
#### wdt_set_off_period(period)
Set off period in seconds
* **Parameters:**
**period** (*int*) – Off period in seconds
#### wdt_set_period(period)
Set watchdog period.
* **Parameters:**
**period** (*int*) – Channel number
<!-- vi:se ts=4 sw=4 et: -->
Raw data
{
"_id": null,
"home_page": "https://sequentmicrosystems.com",
"name": "SMmultiio",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": "industrial, raspberry, power, 4-20mA, 0-10V, optoisolated",
"author": "Sequent Microsystems",
"author_email": "olcitu@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/a6/63/e199e7077217f972fca6c21f8084c1c2702b9bb739cae3457f53c2d384ec/smmultiio-1.2.5.tar.gz",
"platform": null,
"description": "# Welcome to SMmultiio\u2019s documentation!\n\n# Install\n\n```bash\nsudo pip install SMmultiio\n```\n\nor\n\n```bash\nsudo pip3 install SMmultiio\n```\n\n# Update\n\n```bash\nsudo pip install SMmultiio -U\n```\n\nor\n\n```bash\nsudo pip3 install SMmultiio -U\n```\n\n# Initiate class\n\n```console\n$ python\nPython 3.11.8 (main, Feb 12 2024, 14:50:05) [GCC 13.2.1 20230801] on linux\nType \"help\", \"copyright\", \"credits\" or \"license\" for more information.\n>>> import multiio\n>>> mio = multiio.SMmultiio()\n>>>\n```\n\n# Documentation\n\n<a id=\"module-multiio\"></a>\n\n### *class* multiio.SMmultiio(stack=0, i2c=1)\n\nBases: `object`\n\nPython class to control the Multiio Card for Raspberry Pi.\n\n* **Parameters:**\n * **stack** (*int*) \u2013 Stack level/device number.\n * **i2c** (*int*) \u2013 i2c bus number\n\n#### cal_i_in(channel, value)\n\nCalibrate 4-20mA input channel.\nCalibration must be done in 2 points at min 10mA apart.\n\n* **Parameters:**\n * **channel** (*int*) \u2013 Channel number\n * **value** (*float*) \u2013 Real(measured) amperage value\n\n#### cal_i_out(channel, value)\n\nCalibrate 4-20mA output channel.\nCalibration must be done in 2 points at min 10mA apart.\n\n* **Parameters:**\n * **channel** (*int*) \u2013 Channel number\n * **value** (*float*) \u2013 Real(measured) amperage value\n\n#### cal_rtd_res(channel, value)\n\nCalibrate rtd resistance.\n\n* **Parameters:**\n * **channel** (*int*) \u2013 RTD channel number to calibrate\n * **value** (*float*) \u2013 Real(measured) resistance in ohm\n\n#### cal_u_in(channel, value)\n\nCalibrate 0-10V input channel.\nCalibration must be done in 2 points at min 5V apart.\n\n* **Parameters:**\n * **channel** (*int*) \u2013 Channel number\n * **value** (*int*) \u2013 Voltage value\n\n#### cal_u_out(channel, value)\n\nCalibrate 0-10V output channel.\nCalibration must be done in 2 points at min 5V apart.\n\n* **Parameters:**\n * **channel** (*int*) \u2013 Channel number\n * **value** (*float*) \u2013 Real(measured) voltage value\n\n#### calib_status()\n\nGet current calibration status of device.\n\n* **Returns:**\n (int) Calib status\n\n#### get_all_leds()\n\nGet all leds state as bitmask.\n\n* **Returns:**\n (int) Leds state bitmask\n\n#### get_all_opto()\n\nGet all optocoupled input status as a bitmask.\n\n* **Returns:**\n (int) Optocoupled bitmask\n\n#### get_all_relays()\n\nGet all relays state as bitmask.\n\n* **Returns:**\n (int) Relays state bitmask\n\n#### get_button()\n\nGet button status.\n\n* **Returns:**\n (bool) status\n : True(ON)/False(OFF)\n\n#### get_button_latch()\n\nGet button latch status.\n\n* **Returns:**\n (bool) status\n : True(ON)/False(OFF)\n\n#### get_i_in(channel)\n\nGet 4-20mA input channel value in mA.\n\n* **Parameters:**\n **channel** (*int*) \u2013 Channel number\n* **Returns:**\n (float) 4-20mA input channel value in mA\n\n#### get_i_out(channel)\n\nGet 4-20mA output channel value in mA.\n\n* **Parameters:**\n **channel** (*int*) \u2013 Channel number\n* **Returns:**\n (float) 4-20mA output value in mA\n\n#### get_led(led)\n\nGet led state.\n\n* **Parameters:**\n **led** (*int*) \u2013 Led number\n* **Returns:**\n 0(OFF) or 1(ON)\n\n#### get_motor()\n\nGet motor speed value in %.\n\n* **Returns:**\n (float) Motor speed value in %\n\n#### get_opto(channel)\n\nGet optocoupled input status.\n\n* **Parameters:**\n **channel** (*int*) \u2013 Channel number\n* **Returns:**\n (bool) Channel status\n\n#### get_opto_counter(channel)\n\nGet optocoupled inputs edges counter for one channel.\n\n* **Parameters:**\n **channel** (*int*) \u2013 Channel number\n* **Returns:**\n (int) opto counter\n\n#### get_opto_edge(channel)\n\nGet optocoupled channel counting edges status.\n\n* **Parameters:**\n **channel** (*int*) \u2013 Channel number\n* **Returns:**\n (int) Counting edge status\n : 0(none)/1(rising)/2(falling)/3(both)\n\n#### get_opto_encoder_counter(channel)\n\nGet optocoupled encoder counter for one channel.\n\n* **Parameters:**\n **channel** (*int*) \u2013 Channel number\n* **Returns:**\n (int) Opto encoder counter\n\n#### get_opto_encoder_state(channel)\n\nGet optocoupled quadrature encoder state.\n\n* **Parameters:**\n **channel** (*int*) \u2013 Encoded channel number\n* **Returns:**\n (int) state 0(disabled)/1(enabled)\n\n#### get_relay(relay)\n\nGet relay state.\n\n* **Parameters:**\n **relay** (*int*) \u2013 Relay number\n* **Returns:**\n (int) Relay state\n\n#### get_rtc()\n\nGet rtc time.\n\n* **Returns:**\n (tuple) date(year, month, day, hour, minute, second)\n\n#### get_rtd_res(channel)\n\nGet RTD resistance in ohm.\n\n* **Parameters:**\n **channel** (*int*) \u2013 RTD channel number\n* **Returns:**\n (float) RTD resistance value\n\n#### get_rtd_temp(channel)\n\nGet RTD temperature in Celsius.\n\n* **Parameters:**\n **channel** (*int*) \u2013 RTD channel number\n* **Returns:**\n (float) RTD Celsius value\n\n#### get_servo(channel)\n\nGet servo position value in %.\n\n* **Parameters:**\n **channel** (*int*) \u2013 Channel number\n* **Returns:**\n (float) Servo position value in % for specified channel.\n\n#### get_u_in(channel)\n\nGet 0-10V input channel value in volts.\n\n* **Parameters:**\n **channel** (*int*) \u2013 Channel number\n* **Returns:**\n (float) Input value in volts\n\n#### get_u_out(channel)\n\nGet 0-10V output channel value in volts.\n\n* **Parameters:**\n **channel** (*int*) \u2013 Channel number\n* **Returns:**\n (float) 0-10V output value\n\n#### get_version()\n\nGet firmware version.\n\nReturns: (int) Firmware version number\n\n#### reset_opto_counter(channel)\n\nReset optocoupled inputs edges counter.\n\n* **Parameters:**\n **channel** (*int*) \u2013 Channel number\n\n#### reset_opto_encoder_counter(channel)\n\nReset optocoupled encoder counter for one channel.\n\n* **Parameters:**\n **channel** (*int*) \u2013 Channel number\n\n#### set_all_leds(val)\n\nSet all leds states as bitmask.\n\n* **Parameters:**\n **val** (*int*) \u2013 Led bitmask\n\n#### set_all_relays(val)\n\nSet all relays states as bitmask.\n\n* **Parameters:**\n **val** (*int*) \u2013 Relay bitmask\n\n#### set_i_out(channel, value)\n\nSet 4-20mA output channel value in mA.\n\n* **Parameters:**\n * **channel** (*int*) \u2013 Channel number\n * **value** (*float*) \u2013 Amperage value in mA\n\n#### set_led(led, val)\n\nSet led state.\n\n* **Parameters:**\n * **led** (*int*) \u2013 Led number\n * **val** \u2013 0(OFF) or 1(ON)\n\n#### set_motor(value)\n\nSet motor speed value in %.\n\n* **Parameters:**\n **value** (*float*) \u2013 Speed value in %\n\n#### set_opto_edge(channel, value)\n\nSet optocoupled channel counting edges status.\n\n* **Parameters:**\n * **channel** (*int*) \u2013 Channel number\n * **value** (*int*) \u2013 Counting edge status\n 0(none)/1(rising)/2(falling)/3(both)\n\n#### set_opto_encoder_state(channel, state)\n\nSet optocoupled quadrature encoder state.\n\n* **Parameters:**\n * **channel** (*int*) \u2013 Encoded channel number\n * **state** (*int*) \u2013 0(disabled)/1(enabled)\n\n#### set_relay(relay, val)\n\nSet relay state.\n\n* **Parameters:**\n * **relay** (*int*) \u2013 Relay number\n * **val** \u2013 0(OFF) or 1(ON)\n\n#### set_rtc(year, month, day, hour, minute, second)\n\nSet rtc time.\n\n* **Parameters:**\n * **year** (*int*) \u2013 current year\n * **month** (*int*) \u2013 current month\n * **day** (*int*) \u2013 current day\n * **hour** (*int*) \u2013 current hour\n * **minute** (*int*) \u2013 current minute\n * **second** (*int*) \u2013 current second\n\n#### set_servo(channel, value)\n\nSet servo position value in %.\n\n* **Parameters:**\n * **channel** (*int*) \u2013 Channel number\n * **value** (*float*) \u2013 Servo position value in %\n\n#### set_u_out(channel, value)\n\nSet 0-10V output channel value in volts.\n\n* **Parameters:**\n * **channel** (*int*) \u2013 Channel number\n * **value** (*float*) \u2013 Voltage value\n\n#### wdt_clear_reset_count()\n\nClear watchdog counter.\n\n#### wdt_get_init_period()\n\nGet watchdog initial period.\n\n* **Returns:**\n (int) Initial watchdog period in seconds\n\n#### wdt_get_off_period()\n\nGet watchdog off period in seconds.\n\n* **Returns:**\n (int) Watchfog off period in seconds.\n\n#### wdt_get_period()\n\nGet watchdog period in seconds.\n\n* **Returns:**\n (int) Watchdog period in seconds\n\n#### wdt_get_reset_count()\n\nGet watchdog reset count.\n\n* **Returns:**\n (int) Watchdog reset count\n\n#### wdt_reload()\n\nReload watchdog.\n\n#### wdt_set_init_period(period)\n\nSet watchdog initial period.\n\n* **Parameters:**\n **period** (*int*) \u2013 Initial period in second\n\n#### wdt_set_off_period(period)\n\nSet off period in seconds\n\n* **Parameters:**\n **period** (*int*) \u2013 Off period in seconds\n\n#### wdt_set_period(period)\n\nSet watchdog period.\n\n* **Parameters:**\n **period** (*int*) \u2013 Channel number\n\n<!-- vi:se ts=4 sw=4 et: -->\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Library to control Multi-IO Automation Card",
"version": "1.2.5",
"project_urls": {
"Homepage": "https://sequentmicrosystems.com"
},
"split_keywords": [
"industrial",
" raspberry",
" power",
" 4-20ma",
" 0-10v",
" optoisolated"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "75c469b0aaf1976e89a79a2936455b5b716c036e321e9b00acbe3bc2734244ad",
"md5": "665d6641d9c17ca0eadd16ef56f2de01",
"sha256": "714f864397d7544d32fee75e6f5a178334f608e670890214de9de47111f12d2b"
},
"downloads": -1,
"filename": "SMmultiio-1.2.5-py2.py3-none-any.whl",
"has_sig": false,
"md5_digest": "665d6641d9c17ca0eadd16ef56f2de01",
"packagetype": "bdist_wheel",
"python_version": "py2.py3",
"requires_python": null,
"size": 12122,
"upload_time": "2024-11-04T20:39:58",
"upload_time_iso_8601": "2024-11-04T20:39:58.419624Z",
"url": "https://files.pythonhosted.org/packages/75/c4/69b0aaf1976e89a79a2936455b5b716c036e321e9b00acbe3bc2734244ad/SMmultiio-1.2.5-py2.py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "a663e199e7077217f972fca6c21f8084c1c2702b9bb739cae3457f53c2d384ec",
"md5": "0a8720fee74960e91ede37a29805ea22",
"sha256": "fbcfcc61c7cf673f9c5ce169c6b77c458151479bd42e69cd43d4848e7872f7b2"
},
"downloads": -1,
"filename": "smmultiio-1.2.5.tar.gz",
"has_sig": false,
"md5_digest": "0a8720fee74960e91ede37a29805ea22",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 7482,
"upload_time": "2024-11-04T20:39:59",
"upload_time_iso_8601": "2024-11-04T20:39:59.580066Z",
"url": "https://files.pythonhosted.org/packages/a6/63/e199e7077217f972fca6c21f8084c1c2702b9bb739cae3457f53c2d384ec/smmultiio-1.2.5.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-11-04 20:39:59",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "smmultiio"
}