Logic Elements core utilities
Project description
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
Import
Import package as usual
import 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:
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.Regs.EMUL_NTC_STOCK_RES, 10000)
rtd.write(RE.Regs.EMUL_NTC_BETA, 3977)
# Write emulated temperature at output 1
rtd.write(RE.Regs.EMUL_TEMPERATURE_1, 30.5)
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
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)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
lecore-0.1.13.tar.gz
(36.0 kB
view details)
Built Distribution
lecore-0.1.13-py3-none-any.whl
(44.0 kB
view details)
File details
Details for the file lecore-0.1.13.tar.gz
.
File metadata
- Download URL: lecore-0.1.13.tar.gz
- Upload date:
- Size: 36.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.7.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 406d0bbf2732cf11e848e27f2646bad6f5e82ca67a6147000f12e1043fbbe5cd |
|
MD5 | 1038f1fdd24e94314675ff399f99d5f9 |
|
BLAKE2b-256 | f3130643e7c7465ef58c503b3cc85b07052b4f316c198fe07eccac8cbf9c1ef1 |
File details
Details for the file lecore-0.1.13-py3-none-any.whl
.
File metadata
- Download URL: lecore-0.1.13-py3-none-any.whl
- Upload date:
- Size: 44.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.7.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b52bca305d8a8891507495eb889cbad88531a7298fbd49b5bde186dbb999e371 |
|
MD5 | 851f41470dea5a12b311e8c89d241035 |
|
BLAKE2b-256 | 65838f0ccd2820f5d4812ac3b189be90a2ea8674a73dcdc7f07bc454b4234ae4 |