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

PDO tutorial doesn't work #3

Open
MatejBartosovic opened this issue Oct 20, 2021 · 1 comment
Open

PDO tutorial doesn't work #3

MatejBartosovic opened this issue Oct 20, 2021 · 1 comment

Comments

@MatejBartosovic
Copy link

Hello.
I am following the PDO configuration tutorial however PDO's are not produced by the demo device.

What I have done so far:

  • start candump can0
  • run demo device ./demoLinuxDevice can0
  • start canopend with stdin interface ./canopend can0 -i 1 -c stdio and send commands based on tutorial

Outputs:

  • demo device
./demoLinuxDevice can0
./demoLinuxDevice[30528]: CANopen device, Node ID = 0x00, starting
./demoLinuxDevice[30528]: CAN Interface "can0" RX buffer set to 477 messages (212992 Bytes)
./demoLinuxDevice[30528]: CANopen NMT state changed to: "initializing" (0)
./demoLinuxDevice[30528]: CANopen device, Node ID = 0x04, communication reset
./demoLinuxDevice[30528]: CANopen device, Node ID = 0x04, running ...
./demoLinuxDevice[30528]: CANopen NMT state changed to: "pre-operational" (127)
  • canopend
./canopend can0 -i 1 -c stdio
./canopend[30531]: CANopen device, Node ID = 0x00, starting
./canopend[30531]: CANopen command interface on "standard IO" started
./canopend[30531]: CAN Interface "can0" RX buffer set to 477 messages (212992 Bytes)
./canopend[30531]: CANopen NMT state changed to: "initializing" (0)
./canopend[30531]: CANopen device, Node ID = 0x01, communication reset
./canopend[30531]: CANopen device, Node ID = 0x01, running ...
./canopend[30531]: CANopen NMT state changed to: "pre-operational" (127)
./canopend[30531]: CANopen Emergency message from node 0x01: errorCode=0x5000, errorRegister=0x01, errorBit=0x2F, infoCode=0x00000004
set node 4
[0] OK
preop                                          #preoperational mode
[0] OK
w 0x1802 1 u32 0x80000000
[0] OK
w 0x1A02 0 u8 0
[0] OK
w 0x1A02 1 u32 0x21100120
[0] OK
w 0x1A02 0 u8 1
[0] OK
w 0x1802 1 u32 0x00000384
[0] OK
w 0x1802 5 u16 500                   #start imer every 500ms
[0] OK
start                                            #transition to operational mode
[0] OK
  • candump
candump can0
  can0  704   [1]  00
  can0  084   [8]  00 50 01 2F 24 00 00 00
  can0  701   [1]  00
  can0  081   [8]  00 50 01 2F 04 00 00 00
  can0  000   [2]  80 04
  can0  604   [8]  23 02 18 01 00 00 00 80
  can0  584   [8]  60 02 18 01 00 00 00 00
  can0  604   [8]  2F 02 1A 00 00 00 00 00
  can0  584   [8]  60 02 1A 00 00 00 00 00
  can0  604   [8]  23 02 1A 01 20 01 10 21
  can0  584   [8]  60 02 1A 01 00 00 00 00
  can0  604   [8]  2F 02 1A 00 01 00 00 00
  can0  584   [8]  60 02 1A 00 00 00 00 00
  can0  604   [8]  23 02 18 01 84 03 00 00
  can0  584   [8]  60 02 18 01 00 00 00 00
  can0  604   [8]  2B 02 18 05 F4 01 00 00
  can0  584   [8]  60 02 18 05 00 00 00 00
  can0  000   [2]  01 04

Please note that there are no PDOs captured by candump. There should be 384 PDOs.

Is there any missing step to start the production of PDOs? Am I doing something incorrectly?

@sumitbilam
Copy link

sumitbilam commented Jan 5, 2024

Hello @MatejBartosovic,

your devices needs to go into operational state first.

Run your demodevice with some id lets say 4 and do this (I am using cocomm utility):
cocomm "1 w 0x1011 1 vs load"
cocomm "4 w 0x1011 1 vs load"
cocomm "0 reset node"

re-run them now

thanks,

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

2 participants