Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is it possible to play/repeat a CANopenDump.log file? #383

Open
klausz opened this issue Jun 23, 2023 · 0 comments
Open

Is it possible to play/repeat a CANopenDump.log file? #383

klausz opened this issue Jun 23, 2023 · 0 comments

Comments

@klausz
Copy link

klausz commented Jun 23, 2023

In using CANplayer:
canplayer vcan0=can0 -I abc.log -g 1000
is it possible to play/repeat a CANopenDump.log file?

With Jupyter notebooks and the code:

import canopen

network = canopen.Network()

node = network.add_node(0x47, 'ab.eds') 
node2 = network.add_node(01a, 'cd.eds') 

network.connect(bustype='socketcan', channel='vcan0')

for obj in node2.object_dictionary.values():
    print('0x%X: %s' % (obj.index, obj.name))
    if isinstance(obj, canopen.objectdictionary.Record):
        for subobj in obj.values():
            print('  %d: %s' % (subobj.subindex, subobj.name))

0x1000: DeviceType
0x1001: ErrorRegister
0x1002: Manufacturer status register

node.object_dictionary[0x2001][1].__dict__

{'parent': <canopen.objectdictionary.Array at 0x7f4b2f479300>,
'index': 8193,
'subindex': 1,
..False}

node.object_dictionary[0x2021][5].default_raw
'440'

I can get a lot of information.
What i miss,
(1) is it possible to get a online translation of the CANopen and .eds content (mapped) and displayed in the terminal window while CAN (real or CANplayer) is running? A terminal command in Linux displaying CANopen data thats addionaly calling CANOPEN and provides the link to the .eds file (one would be enough).
(2) Also i am not sure - maybe i just need to make the code - to get the raw data from all the nodes when i start the cell in Jupyter?

Originally posted by @klausz in #330 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant