Jump to content

Recommended Posts

I am using a V350 to send and receive data from 2 can nodes for the purpose of I/O expansion. 

If the unitronics expanded I/O were more compact, this would never have started. The Unitronics I/O could be like the Beckoff terminal modules. That would be nice, but anyway............

I can send 8bytes of data with one PDO. I am sending a speed reference to 2 motors for differential steering with two drive wheels. (time sensitive data)

If I change the data during the same scan as I want to send the data over canopen, the data is "zero".

(This is confirmed and discussed with Emil, this is not speculation. I spent a long time nailing that down. The issue is the fact that the canopen PDO contains a pointer to the data and does not grab the data and put the data in a buffer to send, it only has a pointer to the data. And if you are writing to that memory location when the canopen PDO is actually sent, the data is not available and a zero is sent instead. The canopen PDO is not completed at the time the command is called in the ladder, the actual send happens sometime during the scan, somewhat independent of the ladder.)

So I must not update the data on the scan that I send the data. So now my data update is every other scan.

I also must send other data in other PDOs.

So currently, I have a bit that allows sending can messages every other scan and then only allows updating the data on the off scan.

Then I send PDO1 , scan update data, send PDO2, scan update data, send PDO3, scan update data, repeat................With a scan time of 10msec, it takes a relatively long time to get back around to the speed reference in PDO1.

By the time the data is refreshed it is too late to work properly. There are other issues that contribute to the problem, but this is the canopen Unitronics portion of the issue.


Is the canbus buffer 8 bytes total, or 8 bytes per PDO? Is there a separate buffer for each PDO? I think there might be separate buffers, but I am not sure.

Can I write all the PDOs in one scan ? This would send for example 8 x 5 bytes total, but with 5 different PDOs.

If this is possible I only have the issue of not being able to send the data every scan, but this is still much better.

So I hope I will be able to send all PDOs to both nodes on every other scan.  I would prefer to be able to send on every scan.

When I get some time to return to this hardware, I will see if I can move the PDO send section to the last Subroutine or try to find some way to make it more solid.

I remember something about some of the canopen blocks must be in the main, but I think the PDOs can be sent from a SUB. I haven't looked at this in awhile, and it is coming up soon. I will revisit the software, but I wanted to get a head start on some feedback on these issues as I begin.


Link to comment
Share on other sites


i'm not sure why the value you send is zero.

Are you using struct or Bit to Num for structing the data? Are you activating those function every scan?

If yes then please activate it only when buffer of the relevant message is equal to 0.

This is 8 bytes per PDO. For each PDO send there is a buffer of 8 messages.

Yes you can write all PDOs in one scan.(you cannot send 5 PDOs - Unitronics CANOPEN supports 4 PDOs (PDO1,2,3 and 4))

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...