PLUS+1 Software > Communication

Need example on how to properly send multiple can packets

(1/3) > >>

techn0:
New to guide.  I'm learning.  I am able to use a single CAN_Tx and CAN_Rx to send and receive a single can packet without a problem but as soon as I try to configure a second CAN_Tx the data gets mixed at times.  I think it is trying to send them right on top of each other.  I have tried different oscillator values to step the sending of the packets with no success.  Eventually I am going to need to send and receive multiple packets in both directions from dp700 display and mc038 controller.  Manual and examples I have seen so far are great to get started but lacking for more complex CAN comms.

Any assistance would be greatly appreciated. Thanks

FluidPowerTom:
The oscillator values won't be the issue.  If they did try to send at the exact same time then CAN has a way of arbitrating that.  It sounds like you might have the same CAN ID for multiple messages being sent.  You want to have separate CAN ID for each message.  You might want to post an image of your program.

techn0:
I am using different IDs  The data gets parsed properly on the other end but sometimes the values are interpreted by the wrong CAN_Rx ID.  Figured it was because the packets were getting sent at the same time.

See pics.

Loader:
They seems properly managed...maybe the problem is in rx data....? You can control with CAN King if the data are correct on bus?
regards

FluidPowerTom:
Agreed - that all looks correct unless you've got some data type issues.  Are any of those signals using a Signed data type before you split them into U8 types?  My guess though is also that there's something on the receiving end that is mixing things up.

Navigation

[0] Message Index

[#] Next page

Go to full version