An Example of How To Use the Package
from pycat3 import PyCat3, EdgeTrigger
pc3 = PyCat3()
OR
pc3 = PyCat3(ip='127.0.0.1.1.1', port=851)
write a tag
pc3.write_tag('MAIN.nAlive', 9)
read a tag
print(pc3.read_tag('MAIN.nAlive')
Tags change notification subscription
Make lists of the tags to be monitored (Types: Integer, REAL, BOOL)
tags_int = ['MAIN.Int1', 'MAIN.Int2']
tags_real = ['MAIN.Real1']
tags_bool = ['MAIN.Bool1']
call monitor method from ads instance
pc3.monitor(monitored_int=tags_int, monitored_real=tags_real, monitored_bool=tags_bool)
Access 'data' dictionary to read a certain tag
print(pc3.data['MAIN.Int1'])
Use of Edge Detector
Create your callback function
def my_callback(oldVal, newVal):
print(f"Value changed from {oldVal} to {newVal}.")
Create EdgeTrigger object wit callback function as argument
detector = EdgeTrigger(my_callback)
Call the detector with the monitored PLC tag
detector1(pc3.data['MAIN.Int1'])
Metadata
Release files for pycat3 0.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pycat3-0.6.tar.gz | 3.3 kB | Without provenance | Details for pycat3-0.6.tar.gz |
Release files / pycat3-0.6.tar.gz
| Download URL | pycat3-0.6.tar.gz |
|---|---|
| Size | 3.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c285329256ccf3247cd0c13ec27483e15f6c6ca7509d6bf2c4f69b4514a8a8a7
|
|
BLAKE2b-256 checksum How to use checksums |
079a8236971ff45dd8ce3f3b9285de60e3c2238c2c8450e860ee25cf7cb528f1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7
|
Security for pycat3 0.6
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.