Hej hej,
since I am currently working on an CANopen HLA, that uses basically the EDS file (a reduced version in TOML) to dissect the CAN frames and provide the individual values in the xPDOs as frames, I noticed a couple of things about the HLA, that I would like to list and get feedback on, if I am missing an obvious solution or if there is one in the making currently… Sorry, if I just missed a solution …
But before I start the list, thanks for the great product and the LLAs and HLAs until now… let’s make them even better
Using a “hidden” Python installation
If I understand it correctly, the HLAs are executed by a Python 3.8 installation, that is part of Logic, and I was not able to use that environment directly (see later why I wanted to do that)
Why is Logic structured that way and will there be chances soon, that one can provide an environment? For example 3.10 with the switch/case options would be really nice for state machines in HLAs… or installing packages the easy way and being able to use them with HLAs as well…
I found the environment somewhat around here: C:\Program Files\Logic\resources\windows-x64, but no obvious, at least for me, to directly call it… from the structure is looks like the “Windows embeddable package (64-bit)”… Though that one has a python.exe “exposed”…
and it reports the following as the version:
python version:
3.8.2 (default, Apr 18 2020, 17:07:21) [MSC v.1925 64 bit (AMD64)]
Fixed Issue
When using the exact python version “3.8.2”, the workaround works as well for the bitstring module…
Additional issue with that:
I am trying to use the module “bitstring” (Overview — bitstring 4.2 documentation)…
I installed it via PIP with python38 and python312 and added the folder to the PATH, but Logic still reports
"ModuleNotFoundError("No module named 'bitarray._bitarray'")" from
File "C:\ZZZ\..\lib\bitarray\__init__.py", line 14, in <module> from bitarray._bitarray import (bitarray, decodetree, _sysinfo,
I suspect, there is an issue with these precompiled C-Libraries…
No IntelliSense / auto complete in editors
Given, that the saleae python modules “saleae.analyzers” and “saleae.data” are in that hidden installation, VS Code cannot find them directly, which makes auto complete not working (I’m sure that there is a solution, it just is one of the things, I like to work out-of-the-box…
no good option to use additional python modules
Python lives and dies with its large ecosystem of additional modules, all easily installed via pip or something similar… But due to the hidden Python environment, this is not so easy…
There are workarounds (install them from a different python environment into a folder and add the folder at runtime to your path), which work, until the installed packages depend on the python version, you use (for example due to CPython PYDs…)
Then installating from your own environment requires you to have the same / correct version of python so that the CPython PYDs are correct version…
For now, I am trying to get a similar embedded distribution going and perform the pip from there to folder, that is than added again to the PATH variable at runtime…
Creating multiple AnalyzerFrames at the same time
Given the nature of fieldbusses in general (i.e. CAN), it is a given, that within a packet, you get tightly packed data, and unpacking that is the beauty of a HLA…
So it came as a somewhat of a disappointment, that I cannot use the CAN frame overall start_time and end_time, but need to do artifical timing to get them shown after each other instead of on top of each other… The HLA row might get quite large vertically, but if it would be collasible (all visible or just a single line), it would make it so much better…
Thanks for any input / pointer to solution!
Cheers
Niels Göran