starting with CAN a...
 
Notifications
Clear all

[Solved] starting with CAN and Solo


Forum 1
(@unolittlebird)
Trusted Member
Joined: 5 months ago
Posts: 63
Topic starter  

Hi,

I am starting to try out the SOLO via CAN.

First of all, I have seen in the manual, that I must apply the 120 Ohm externally to minimize signal reflections. This is only the case if the SOLO is one end of the bus, right. For example, if I am using a Pi-hat like this , can I put the SOLO as a node between CAN A and CAN B and then not have to apply the 120 ohm externally?

Second, I looked into the CAN manual for examples and could find some at the end (on top of the page it still states UART and USB. I guess this is a typo). However, they are obviously very low-levelig and I would love if there is a convenient python library like in your UART-USB github. For now, I guess I have to write my own wrapper around this protocol I guess, right? I have seen some CANopen python libraries, for example this one. Do you happen to know if this works well together with the SOLO? (I am new to CAN)

Kind regards


SOLO Team liked
Quote
SOLO Team
(@milad)
Chief Member Moderator
Joined: 2 years ago
Posts: 395
 

Hi @unolittlebird,

Posted by: @unolittlebird

First of all, I have seen in the manual, that I must apply the 120 Ohm externally to minimize signal reflections. This is only the case if the SOLO is one end of the bus, right. For example, if I am using a Pi-hat like this , can I put the SOLO as a node between CAN A and CAN B and then not have to apply the 120 ohm externally?

The two 120 ohm resistors are required to come only at each end of the CAN network, so if you have many units connected to the CAN line, you'll still need two resistors, the same applies for 2 units in the network too, so basically if the Termination resistor is not mounted on your CAN board, you'll need to use 1 resistor on SOLO's side and 1 resistor at the CAN module side in total if you are only communicating with 1 SOLO unit.

Posted by: @unolittlebird

Second, I looked into the CAN manual for examples and could find some at the end (on top of the page it still states UART and USB. I guess this is a typo).

Yes and, sorry, that's a typo that we will fix.

Posted by: @unolittlebird

However, they are obviously very low-levelig and I would love if there is a convenient python library like in your UART-USB github. For now, I guess I have to write my own wrapper around this protocol I guess, right? I have seen some CANopen python libraries, for example this one. Do you happen to know if this works well together with the SOLO? (I am new to CAN)

Actually, our software team is very close to releasing a CANopen library based on any module that works with MCP2551/MCP2517/MCP2557 CAN transceivers which convert the SPI to CAN TX and CAN RX, these chips are used in CAN-BUS Shield v2 for Arduino or Raspberry PI as well as other CAN bus modules like this one.

The library I mentioned will be in C language and usable with Arduino or other MCUs, however after delivering this version, we are going to make the exact same thing for Raspberry Pi in Python, but that will take us at least 5-6 more weeks to deliver.

If you are in the early stages and you want to work with CAN, I recommend using KVASER modules like this one, to speed up your development process instead of using raw CAN modules with minimum software support. for instance, Kvaser Leaf Light HS v2 has been Tested with SOLO and it has good software packages.

I will remain available.

Milad

 

If you found the answers helpful and you could solve your problems, please kindly verify here to help others in the future.


ReplyQuote
Forum 1
(@unolittlebird)
Trusted Member
Joined: 5 months ago
Posts: 63
Topic starter  

Hi @milad,

thanks for your response and I am already looking forward to your release. Will it also include electronic data sheets and device configuration files?


ReplyQuote
Forum 1
(@unolittlebird)
Trusted Member
Joined: 5 months ago
Posts: 63
Topic starter  
Posted by: @unolittlebird

Will it also include electronic data sheets and device configuration files?

what I meant to ask with this is, whether I can then reuse the .eds of the Arduino release for my application, since for example these library requires those and I don't know (yet) how to create them myself.


ReplyQuote
SOLO Team
(@milad)
Chief Member Moderator
Joined: 2 years ago
Posts: 395
 

Hi @unolittlebird

sorry, I didn't get what do you need exactly, would you elaborate more? 

can we have some examples from what you are asking?

Milad

 

If you found the answers helpful and you could solve your problems, please kindly verify here to help others in the future.


ReplyQuote
Forum 1
(@unolittlebird)
Trusted Member
Joined: 5 months ago
Posts: 63
Topic starter  

@milad 

no problem. From what I understood, each CANopen device needs an Object Dictionairy (OD) for communication and configuration of the device. The standard file format for OD is then the Electronic Data Sheet (EDS). In the case of the CANopen for Python library I intend to use I would need this file to add the node to my network (source here). (I hope I am not mistaken here, but I am also new to CANopen.)

One example file would be here 

kind regards,


ReplyQuote
SOLO Team
(@milad)
Chief Member Moderator
Joined: 2 years ago
Posts: 395
 

@unolittlebird 

Ok now I get you, sure, but for the operation of CANopen those files are not mandatory, they can certainly help, but they are not necessary for the connection to be established and the commands to be sent or received, those files will certainly help for application development though and we will provide them in near future.

For instance, speaking of KVASER, using the following data packet I could read the number of Encoder lines:

image

so you can basically from the packets and send them through CAN bus and SOLO will respond back.

let me know if this was helpful.

If you found the answers helpful and you could solve your problems, please kindly verify here to help others in the future.


ReplyQuote
Forum 1
(@unolittlebird)
Trusted Member
Joined: 5 months ago
Posts: 63
Topic starter  

hi @milad ,

Posted by: @milad

but for the operation of CANopen those files are not mandatory,

ok, that is for one good. Then I have an error somewhere else.

Thing is, that I have my setup like in this video and can send can messages via the bus. By that I mean I use:

cansend can0 601#4010300000000000

 in one terminal and in another

candump -a can0

I can send and receive but SOLO is not responding, when I power it on and have it as a node on my bus. I have already set the address of this SOLO to 1

What am I missing?

kind regards,

s


ReplyQuote
Forum 1
(@unolittlebird)
Trusted Member
Joined: 5 months ago
Posts: 63
Topic starter  

@milad.

what bitrate do you use in you can-bus? I have also seen that SOLO transmits a BOOT-UP message after powering on. This means that If I have wired SOLO correctly into my can-bus and I power it on, I should see a message in the candump, right?

If I don't see such message, my errors could be: address of SOLO, bitrate, wiring, what else?

I think that right now, this is my problem and I am not sure if the KVASER modul could help me out with that, as it would be wired differently.

Kind regard,

unolittlebird


ReplyQuote
SOLO Team
(@milad)
Chief Member Moderator
Joined: 2 years ago
Posts: 395
 

Hi @unolittlebird,

The baud rate of CAN bus can be set through Motion Terminal part "CANopen baud-rate[kbits/s]", by default it's at 1000kbits/s.

Posted by: @unolittlebird

If I don't see such message, my errors could be: address of SOLO, bitrate, wiring, what else?

I have no idea how the "PiCan2 Duo" software on Python is implemented and if it really works well, so that's why I offered KVASER, a proven solution to check the CAN bus functionality, the issue might not be your wiring or SOLO ( as you receive the bootup message so the wiring seems ok, and SOLO is functional), and it can be the python library for the module, I recommend to get in touch with "PiCan2 Duo" and the people who wrote the python library for that and check your issue with them as well.

unfortunately, as we never tested SOLO with that module, I can't give you any further guides for that matter, of course, if you check the situation with KVASER or other industrial CAN transceivers, we will be able to go further more efficiently.

Let me know if you have other questions.

Milad

If you found the answers helpful and you could solve your problems, please kindly verify here to help others in the future.


ReplyQuote
Forum 1
(@unolittlebird)
Trusted Member
Joined: 5 months ago
Posts: 63
Topic starter  

hi @milad,

Posted by: @milad

as you receive the bootup message so the wiring seems ok, and SOLO is functional

I don't receive the bootup message. That is why I think that the problem is not in the python library as I am not yet using it really, bit instead in some SOLO settings or hardware wiring.

Posted by: @milad

recommend to get in touch with "PiCan2 Duo"

I will try this as well. Maybe I am overseeing something regarding that board.

In any case, thank you very much for al the help so far! I will let you know as soon as I found out what caused the issue.

Kind regards,

unolittilebird


ReplyQuote
Forum 1
(@unolittlebird)
Trusted Member
Joined: 5 months ago
Posts: 63
Topic starter  

Ok, that was faster than expected. The problem was the wrong baud-rate.

Now, I set up the can network with the command

sudo /sbin/ip link set can0 up type can bitrate 1000000
sudo /sbin/ip link set can1 up type can bitrate 1000000

and I get a response from SOLO as well as the BOOT-UP message. Before that I had a bitrate of 500000 and that did not work.

Hope that helps others and thanks again for your support. In case of future problems, I will open a new topic.

Kind regards and thanks a lot!

 


ReplyQuote
SOLO Team
(@milad)
Chief Member Moderator
Joined: 2 years ago
Posts: 395
 

Hi @unolittlebird,

Ok, great job, just don't forget to keep the firmware of SOLO at the latest version now "0x0002B00A" as in the last version we have updated some of the CANopen functions. ( I guess you have the latest firmware though)

keep me posted if you had any other issues.

Regards
Milad

 

If you found the answers helpful and you could solve your problems, please kindly verify here to help others in the future.


ReplyQuote
Share: