SMfsrc


NameSMfsrc JSON
Version 1.0.1 PyPI version JSON
download
home_pagehttps://sequentmicrosystems.com
SummaryLibrary to control Flagstaff Research Controller
upload_time2024-10-25 20:12:21
maintainerNone
docs_urlNone
authorSequent Microsystems
requires_pythonNone
licenseMIT
keywords industrial raspberry power 4-20ma 0-10v optoisolated
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Welcome to SMfsrc’s documentation!

# Install

```bash
sudo pip install SMfsrc
```

or

```bash
sudo pip3 install SMfsrc
```

# Update

```bash
sudo pip install SMfsrc -U
```

or

```bash
sudo pip3 install SMfsrc -U
```

# Initiate class

```console
$ python
Python 3.9.2 (default, Feb 28 2021, 17:03:44)
[GCC 10.2.1 20210110] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import SMfsrc.SMfsrc
>>> fsrc = SMfsrc()
>>>
```

# Documentation

<a id="module-SMfsrc"></a>

### *class* SMfsrc.SMfsrc(stack=0, i2c=1)

Bases: `object`

Python class to control the Flagstaff-Research for Raspberry Pi.

* **Parameters:**
  * **stack** (*int*) – Stack level/device number.
  * **i2c** (*int*) – i2c bus number

#### get_all_digi()

Get all digital inputs status as a bitmask.

* **Returns:**
  (int) Digital bitmask

#### get_all_fets()

Get all fets state as bitmask.

* **Returns:**
  (int) Fets state bitmask

#### get_digi(channel)

Get digital input status.

* **Parameters:**
  **channel** (*int*) – Channel number
* **Returns:**
  (bool) Channel status

#### get_digi_counter(channel)

Get digital inputs counter for one channel.

* **Parameters:**
  **channel** (*int*) – Channel number
* **Returns:**
  (int) Digi counter

#### get_digi_edge(channel)

Get digital inputs counting edges status.

* **Parameters:**
  **channel** (*int*) – Channel number
* **Returns:**
  (int) Counting edge status
  : 0(none)/1(rising)/2(falling)/3(both)

#### get_fet(fet)

Get fet state.

* **Parameters:**
  **fet** (*int*) – Fet number
* **Returns:**
  (int) Fet state

#### get_owb_id(channel)

Get the 64bit ROM ID of the One Wire Bus connected sensor

* **Parameters:**
  **channel** (*int*) – Channel number
* **Returns:**
  (int) 64bit ROM ID

#### get_owb_no()

Get the number of Onw Wire Bus sensors connected

* **Returns:**
  (int) Number of sensors connected

#### get_owb_scan()

Start One Wire Bus scanning procedure.

#### get_owb_temp(channel)

Get the temperature from a one wire bus connected sensor.

* **Parameters:**
  **channel** (*int*) – Channel number
* **Returns:**
  (float) Temperature read from connected sensor

#### get_pump(channel)

Get pump value in %.

* **Parameters:**
  **channel** (*int*) – Channel number
* **Returns:**
  (float) Pump value in % for specified channel.

#### 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_u10_out(channel)

Get 0-10V output channel value in volts.

* **Parameters:**
  **channel** (*int*) – Channel number
* **Returns:**
  (float) 0-10V output value

#### get_u5_in(channel)

Get 0-5V input channel value in volts.

* **Parameters:**
  **channel** (*int*) – Channel number
* **Returns:**
  (float) Input value in volts

#### get_version()

Get firmware version.

Returns: (int) Firmware version number

#### reset_digi_counter(channel)

Reset digital inputs counter.

* **Parameters:**
  **channel** (*int*) – Channel number

#### set_all_fets(val)

Set all fets states as bitmask.

* **Parameters:**
  **val** (*int*) – Fets bitmask

#### set_digi_edge(channel, value)

Set digital inputs counting edges status.

* **Parameters:**
  * **channel** (*int*) – Channel number
  * **value** (*int*) – Counting edge status
    0(none)/1(rising)/2(falling)/3(both)

#### set_fet(fet, val)

Set fet state.

* **Parameters:**
  * **fet** (*int*) – Fet number
  * **val** – 0(OFF) or 1(ON)

#### set_pump(channel, value)

Set pump value in %.

* **Parameters:**
  * **channel** (*int*) – Channel number
  * **value** (*float*) – Pump value in %

#### set_pump_prescaler(value)

Set pump prescaler.

* **Parameters:**
  **value** (*int*) – Pump prescaler[0..65535]

#### 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_u10_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": "SMfsrc",
    "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/46/69/00dc45718de17fd7879dcdd5f9481c983d57e00e8543e54814e7e4bb8abe/SMfsrc-1.0.1.tar.gz",
    "platform": null,
    "description": "# Welcome to SMfsrc\u2019s documentation!\n\n# Install\n\n```bash\nsudo pip install SMfsrc\n```\n\nor\n\n```bash\nsudo pip3 install SMfsrc\n```\n\n# Update\n\n```bash\nsudo pip install SMfsrc -U\n```\n\nor\n\n```bash\nsudo pip3 install SMfsrc -U\n```\n\n# Initiate class\n\n```console\n$ python\nPython 3.9.2 (default, Feb 28 2021, 17:03:44)\n[GCC 10.2.1 20210110] on linux\nType \"help\", \"copyright\", \"credits\" or \"license\" for more information.\n>>> import SMfsrc.SMfsrc\n>>> fsrc = SMfsrc()\n>>>\n```\n\n# Documentation\n\n<a id=\"module-SMfsrc\"></a>\n\n### *class* SMfsrc.SMfsrc(stack=0, i2c=1)\n\nBases: `object`\n\nPython class to control the Flagstaff-Research for Raspberry Pi.\n\n* **Parameters:**\n  * **stack** (*int*) \u2013 Stack level/device number.\n  * **i2c** (*int*) \u2013 i2c bus number\n\n#### get_all_digi()\n\nGet all digital inputs status as a bitmask.\n\n* **Returns:**\n  (int) Digital bitmask\n\n#### get_all_fets()\n\nGet all fets state as bitmask.\n\n* **Returns:**\n  (int) Fets state bitmask\n\n#### get_digi(channel)\n\nGet digital input status.\n\n* **Parameters:**\n  **channel** (*int*) \u2013 Channel number\n* **Returns:**\n  (bool) Channel status\n\n#### get_digi_counter(channel)\n\nGet digital inputs counter for one channel.\n\n* **Parameters:**\n  **channel** (*int*) \u2013 Channel number\n* **Returns:**\n  (int) Digi counter\n\n#### get_digi_edge(channel)\n\nGet digital inputs 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_fet(fet)\n\nGet fet state.\n\n* **Parameters:**\n  **fet** (*int*) \u2013 Fet number\n* **Returns:**\n  (int) Fet state\n\n#### get_owb_id(channel)\n\nGet the 64bit ROM ID of the One Wire Bus connected sensor\n\n* **Parameters:**\n  **channel** (*int*) \u2013 Channel number\n* **Returns:**\n  (int) 64bit ROM ID\n\n#### get_owb_no()\n\nGet the number of Onw Wire Bus sensors connected\n\n* **Returns:**\n  (int) Number of sensors connected\n\n#### get_owb_scan()\n\nStart One Wire Bus scanning procedure.\n\n#### get_owb_temp(channel)\n\nGet the temperature from a one wire bus connected sensor.\n\n* **Parameters:**\n  **channel** (*int*) \u2013 Channel number\n* **Returns:**\n  (float) Temperature read from connected sensor\n\n#### get_pump(channel)\n\nGet pump value in %.\n\n* **Parameters:**\n  **channel** (*int*) \u2013 Channel number\n* **Returns:**\n  (float) Pump value in % for specified channel.\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_u10_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_u5_in(channel)\n\nGet 0-5V 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_version()\n\nGet firmware version.\n\nReturns: (int) Firmware version number\n\n#### reset_digi_counter(channel)\n\nReset digital inputs counter.\n\n* **Parameters:**\n  **channel** (*int*) \u2013 Channel number\n\n#### set_all_fets(val)\n\nSet all fets states as bitmask.\n\n* **Parameters:**\n  **val** (*int*) \u2013 Fets bitmask\n\n#### set_digi_edge(channel, value)\n\nSet digital inputs 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_fet(fet, val)\n\nSet fet state.\n\n* **Parameters:**\n  * **fet** (*int*) \u2013 Fet number\n  * **val** \u2013 0(OFF) or 1(ON)\n\n#### set_pump(channel, value)\n\nSet pump value in %.\n\n* **Parameters:**\n  * **channel** (*int*) \u2013 Channel number\n  * **value** (*float*) \u2013 Pump value in %\n\n#### set_pump_prescaler(value)\n\nSet pump prescaler.\n\n* **Parameters:**\n  **value** (*int*) \u2013 Pump prescaler[0..65535]\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_u10_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\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Library to control Flagstaff Research Controller",
    "version": "1.0.1",
    "project_urls": {
        "Homepage": "https://sequentmicrosystems.com"
    },
    "split_keywords": [
        "industrial",
        " raspberry",
        " power",
        " 4-20ma",
        " 0-10v",
        " optoisolated"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "8141e4175e8110139ad3f77ad6c50914a8d097efc9f5a173845b4bf3a04bddaa",
                "md5": "47d1a5a34b1aa615533dd6f941ad121e",
                "sha256": "5097d1d7f6897e83d1a9a79683a386b262566911a95165d778d505f9048ed1b4"
            },
            "downloads": -1,
            "filename": "SMfsrc-1.0.1-py2.py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "47d1a5a34b1aa615533dd6f941ad121e",
            "packagetype": "bdist_wheel",
            "python_version": "py2.py3",
            "requires_python": null,
            "size": 6582,
            "upload_time": "2024-10-25T20:12:20",
            "upload_time_iso_8601": "2024-10-25T20:12:20.314347Z",
            "url": "https://files.pythonhosted.org/packages/81/41/e4175e8110139ad3f77ad6c50914a8d097efc9f5a173845b4bf3a04bddaa/SMfsrc-1.0.1-py2.py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "466900dc45718de17fd7879dcdd5f9481c983d57e00e8543e54814e7e4bb8abe",
                "md5": "ef98bf18925afc0f32d3ec9339dab225",
                "sha256": "ddb3d7a5f9f4153d64421f7d0700f13c735f579ddf3e186e7395137678d8c43f"
            },
            "downloads": -1,
            "filename": "SMfsrc-1.0.1.tar.gz",
            "has_sig": false,
            "md5_digest": "ef98bf18925afc0f32d3ec9339dab225",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 7830,
            "upload_time": "2024-10-25T20:12:21",
            "upload_time_iso_8601": "2024-10-25T20:12:21.881343Z",
            "url": "https://files.pythonhosted.org/packages/46/69/00dc45718de17fd7879dcdd5f9481c983d57e00e8543e54814e7e4bb8abe/SMfsrc-1.0.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-10-25 20:12:21",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "smfsrc"
}
        
Elapsed time: 0.55280s