================================================================================ CANopen test frames ================================================================================ ## Init - open two shells, i.e. async & telnet log level verbose can can1 start active 500000 copen can1 start copen status can can1 status # …optional: can log trace can log crtd /store/crtd1 vfs cat /store/crtd1 vfs tail /store/crtd1 ## Heartbeat/state can can1 rx standard 701 00 can can1 rx standard 701 04 can can1 rx standard 701 05 can can1 rx standard 701 7f metrics list co. ## EMCY can can1 rx standard 081 12 34 56 11 22 33 44 55 metrics list co. ## NMT # shell 1: copen can1 nmt stop 1 5000 # shell 2: can can1 rx standard 701 04 ↓ NMT command result: OK I (6203824) canopen: can1 node 1 new state: Stopped I (6203824) events: Signal(canopen.node.state) ## Read SDO [expedited] # shell 1: copen can1 readsdo 1 2720 01 5000 # shell 2: can can1 rx standard 581 4B 20 27 01 03 00 00 00 ↓ ReadSDO #1 0x2720.01: size=2 dec=3 hex=0x3 txt='(binary)' # shell 1: copen can1 readsdo 1 2720 01 5000 # shell 2: can can1 rx standard 581 47 20 27 01 43 41 4e 00 ↓ ReadSDO #1 0x2720.01: size=3 dec=5128515 hex=0x4e4143 txt='CAN' ## Read SDO [segmented] # shell 1: copen can1 readsdo 1 2720 02 5000 # shell 2: can can1 rx standard 581 40 20 27 02 00 00 00 00 # … can can1 rx standard 581 00 48 65 6c 6c 6f 20 57 # … can can1 rx standard 581 15 6f 72 6c 64 21 00 00 ↓ ReadSDO #1 0x2720.02: size=12 dec=1819043144 hex=0x6c6c6548 txt='Hello World!' ## Write SDO [expedited] # shell 1: copen can1 writesdo 1 2720 02 0x11223344 5000 # shell 2: can can1 rx standard 581 60 20 27 02 00 00 00 00 ↓ WriteSDO #1 0x2720.02: size=4 hex=0x11223344 => OK ## Write SDO [expedited] # shell 1: copen can1 writesdo 1 2720 02 "Hello World!" 5000 # shell 2: can can1 rx standard 581 60 20 27 02 00 00 00 00 # … can can1 rx standard 581 20 00 00 00 00 00 00 00 # … can can1 rx standard 581 30 00 00 00 00 00 00 00 ↓ WriteSDO #1 0x2720.02: size=12 str='Hello World!' => OK ## Node info copen can1 info 1 ## Node scan copen can1 scan 1-10 # full scan (~20 seconds): copen can1 scan ## SEVCON login # get login level: copen can1 readsdo 1 5000 1 → 0 # login: copen can1 writesdo 1 5000 3 0 copen can1 writesdo 1 5000 2 0x4bdf # get login level: copen can1 readsdo 1 5000 1 → 4