Name | lecore JSON |
Version |
0.1.30
JSON |
| download |
home_page | None |
Summary | Logic Elements core utilities |
upload_time | 2024-07-29 14:00:26 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.7 |
license | None |
keywords |
logicelements
looger
development
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# LE core package
This is package of core python utils for LE containing:
- Looger
- Proprietary LeBin protocol
- Proprietary Modbus RTU register map handling - VisualModbus
- Test frame
- Logic Elements devices
## Install
Install or update version
```
pip install lecore
pip install --upgrade lecore
```
# LE devices - Modbus RTU slave
The following Modbus RTU devices are supported:
## RTD Emulator
4-channel RTD emulator, see https://logicelements.cz/en/products/rtd-emulator.
Example of usage:
```python
import lecore.Devices.RtdEmul as RE
# Create RTD emulator object
rtd = RE.RtdEmul()
# Open communication at COM2 (default is COM1) with default COM parameters
rtd.open(comport='COM2')
# Read serial number
sn = rtd.read(RE.Reg.FACT_SERIAL_NUMBER)
# Write stock resistance and beta
rtd.write(RE.Reg.EMUL_NTC_STOCK_RES, 10000)
rtd.write(RE.Reg.EMUL_NTC_BETA, 3977)
# Write emulated temperature at output 1
rtd.write(RE.Reg.EMUL_TEMPERATURE_1, 30.5)
```
## VMS-1502 RTD Meter
6-channel RTD meter, see https://logicelements.cz/en/products/rtd-meter.
Example of usage:
```python
import lecore.Devices.VmsRtd as RTD
# Create RTD meter object
rtd = RTD.VmsRtd()
# Open communication at COM2 (default is COM1) with default COM parameters
rtd.open(comport='COM2')
# Read fixed-point temperature at input 1 (fix-point is multiplied by 100)
temp_fp = rtd.read(RTD.Reg.RTD_TEMPER_1) / 100
# Read floating-point temperature at input 1
temp_float = rtd.read(RTD.Reg.RTDE_TEMPER_FLOAT_1)
# Write RTD type to PT1000 for input 1
rtd.write(RTD.Reg.RTD_TYPE_1, 1)
```
## Phase Detector
6-channel Power Grid Voltage Detector, see https://logicelements.cz/en/products/power-grid-voltage-detector.
Example of usage:
```python
import lecore.Devices.PhaseDet as PE
# Create Phase Detector object
pe = PE.PhaseDet()
# Open communication at COM2 (default is COM1) with default COM parameters
pe.open(comport='COM2')
# Read Pulse count on phase input L1
count = pe.read(PE.Reg.PH_COUNTER_1)
# Clear counts on all phase inputs
pe.write(PE.Reg.PH_CLEAR_ALL, 1)
```
# Third-party devices
## FG-320
Function generator, see https://www.profess.cz/en/mms/products/accessories/service-instruments/fg320
Example of usage:
```python
import lecore.Fg320 as FG
# Create FG-320 object
fg = FG.Fg320('COM6')
# Print FG-320 parameters (serial number, firmware version, etc.)
fg.identify()
# Generate analog signal with key phase mark
fg.normal(function="SQ", frequency=10, amplitude=1, dc=0, angle=90, kp_high=11, kp_low=1)
fg.write()
# Generate current loop signal
fg.current_dc(dc=5)
fg.write()
# Generate speed signal
fg.speed(frequency=10)
fg.write()
```
# Looger
Class Looger allows for sending debug data into Development Debug Server (DDS) a.k.a.
Looger. Public instance run at https://looger.jablotron.cz
Create instance when default public endpoint is to be used
```python
import lecore
# Create Looger object
looger = lecore.Looger()
# Set device properties
looger.set_device(0x111CC1234, 0, None)
# Send data collection and text message
data = {'data_1': 1, 'data_2': 2}
log = f"Message to log"
looger.send(data, log, 0)
# Send just log message
looger.send_log(log)
```
Raw data
{
"_id": null,
"home_page": null,
"name": "lecore",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": null,
"keywords": "logicelements, looger, development",
"author": null,
"author_email": "Jan Bartovsk\u00fd <jan.bartovsky@logicelements.cz>",
"download_url": "https://files.pythonhosted.org/packages/d0/90/b4e2b4a13396447ee4533ce80564091da9dc19db84d3a610b18cfea0e8f2/lecore-0.1.30.tar.gz",
"platform": null,
"description": "# LE core package\r\n\r\nThis is package of core python utils for LE containing:\r\n- Looger\r\n- Proprietary LeBin protocol\r\n- Proprietary Modbus RTU register map handling - VisualModbus\r\n- Test frame\r\n- Logic Elements devices\r\n\r\n## Install\r\n\r\nInstall or update version\r\n```\r\npip install lecore\r\npip install --upgrade lecore\r\n```\r\n\r\n\r\n# LE devices - Modbus RTU slave\r\n\r\nThe following Modbus RTU devices are supported:\r\n\r\n## RTD Emulator\r\n\r\n4-channel RTD emulator, see https://logicelements.cz/en/products/rtd-emulator.\r\n\r\nExample of usage:\r\n```python\r\nimport lecore.Devices.RtdEmul as RE\r\n\r\n# Create RTD emulator object\r\nrtd = RE.RtdEmul()\r\n\r\n# Open communication at COM2 (default is COM1) with default COM parameters\r\nrtd.open(comport='COM2')\r\n\r\n# Read serial number\r\nsn = rtd.read(RE.Reg.FACT_SERIAL_NUMBER)\r\n\r\n# Write stock resistance and beta\r\nrtd.write(RE.Reg.EMUL_NTC_STOCK_RES, 10000)\r\nrtd.write(RE.Reg.EMUL_NTC_BETA, 3977)\r\n\r\n# Write emulated temperature at output 1\r\nrtd.write(RE.Reg.EMUL_TEMPERATURE_1, 30.5)\r\n```\r\n\r\n\r\n## VMS-1502 RTD Meter\r\n\r\n6-channel RTD meter, see https://logicelements.cz/en/products/rtd-meter.\r\n\r\nExample of usage:\r\n\r\n\r\n```python\r\nimport lecore.Devices.VmsRtd as RTD\r\n\r\n# Create RTD meter object\r\nrtd = RTD.VmsRtd()\r\n\r\n# Open communication at COM2 (default is COM1) with default COM parameters\r\nrtd.open(comport='COM2')\r\n\r\n# Read fixed-point temperature at input 1 (fix-point is multiplied by 100)\r\ntemp_fp = rtd.read(RTD.Reg.RTD_TEMPER_1) / 100\r\n\r\n# Read floating-point temperature at input 1\r\ntemp_float = rtd.read(RTD.Reg.RTDE_TEMPER_FLOAT_1)\r\n\r\n# Write RTD type to PT1000 for input 1\r\nrtd.write(RTD.Reg.RTD_TYPE_1, 1)\r\n```\r\n\r\n\r\n## Phase Detector\r\n\r\n6-channel Power Grid Voltage Detector, see https://logicelements.cz/en/products/power-grid-voltage-detector.\r\n\r\nExample of usage:\r\n\r\n```python\r\nimport lecore.Devices.PhaseDet as PE\r\n\r\n# Create Phase Detector object\r\npe = PE.PhaseDet()\r\n\r\n# Open communication at COM2 (default is COM1) with default COM parameters\r\npe.open(comport='COM2')\r\n\r\n# Read Pulse count on phase input L1\r\ncount = pe.read(PE.Reg.PH_COUNTER_1)\r\n\r\n# Clear counts on all phase inputs\r\npe.write(PE.Reg.PH_CLEAR_ALL, 1)\r\n```\r\n\r\n\r\n# Third-party devices\r\n\r\n## FG-320\r\n\r\nFunction generator, see https://www.profess.cz/en/mms/products/accessories/service-instruments/fg320\r\n\r\nExample of usage:\r\n\r\n```python\r\nimport lecore.Fg320 as FG\r\n\r\n# Create FG-320 object\r\nfg = FG.Fg320('COM6')\r\n\r\n# Print FG-320 parameters (serial number, firmware version, etc.)\r\nfg.identify()\r\n\r\n# Generate analog signal with key phase mark \r\nfg.normal(function=\"SQ\", frequency=10, amplitude=1, dc=0, angle=90, kp_high=11, kp_low=1)\r\nfg.write()\r\n\r\n# Generate current loop signal\r\nfg.current_dc(dc=5)\r\nfg.write()\r\n\r\n# Generate speed signal\r\nfg.speed(frequency=10)\r\nfg.write()\r\n```\r\n\r\n# Looger\r\n\r\nClass Looger allows for sending debug data into Development Debug Server (DDS) a.k.a. \r\nLooger. Public instance run at https://looger.jablotron.cz\r\n\r\nCreate instance when default public endpoint is to be used \r\n\r\n```python\r\nimport lecore\r\n\r\n# Create Looger object\r\nlooger = lecore.Looger()\r\n\r\n# Set device properties\r\nlooger.set_device(0x111CC1234, 0, None)\r\n\r\n# Send data collection and text message\r\ndata = {'data_1': 1, 'data_2': 2}\r\nlog = f\"Message to log\"\r\nlooger.send(data, log, 0)\r\n\r\n# Send just log message\r\nlooger.send_log(log)\r\n```\r\n\r\n\r\n\r\n\r\n\r\n",
"bugtrack_url": null,
"license": null,
"summary": "Logic Elements core utilities",
"version": "0.1.30",
"project_urls": {
"Homepage": "https://github.com/LogicElements/lecore"
},
"split_keywords": [
"logicelements",
" looger",
" development"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "3bc7722dbd78ec7f6ab18f86f66cad1350fba2cffde63562b5ece2b2e52be263",
"md5": "c88fe0448d3d5a4ac921e140e540f489",
"sha256": "0ac7e90320c6a12de6e51fc36005606f8b3dfacd428651cf2703305aa751a364"
},
"downloads": -1,
"filename": "lecore-0.1.30-py3-none-any.whl",
"has_sig": false,
"md5_digest": "c88fe0448d3d5a4ac921e140e540f489",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 83693,
"upload_time": "2024-07-29T14:00:24",
"upload_time_iso_8601": "2024-07-29T14:00:24.815048Z",
"url": "https://files.pythonhosted.org/packages/3b/c7/722dbd78ec7f6ab18f86f66cad1350fba2cffde63562b5ece2b2e52be263/lecore-0.1.30-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "d090b4e2b4a13396447ee4533ce80564091da9dc19db84d3a610b18cfea0e8f2",
"md5": "5b70b4c6ac51eafe08a41d6021b6f4e2",
"sha256": "eeca30192674603f12ec5c71626766146d4b6b8dd7a6f0b35787189adea9c728"
},
"downloads": -1,
"filename": "lecore-0.1.30.tar.gz",
"has_sig": false,
"md5_digest": "5b70b4c6ac51eafe08a41d6021b6f4e2",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 65959,
"upload_time": "2024-07-29T14:00:26",
"upload_time_iso_8601": "2024-07-29T14:00:26.419328Z",
"url": "https://files.pythonhosted.org/packages/d0/90/b4e2b4a13396447ee4533ce80564091da9dc19db84d3a610b18cfea0e8f2/lecore-0.1.30.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-07-29 14:00:26",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "LogicElements",
"github_project": "lecore",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "lecore"
}