canopennode / canopensocket Goto Github PK
View Code? Open in Web Editor NEWObsolete repository, replaced by CANopenDemo and CANopenLinux
License: Apache License 2.0
Obsolete repository, replaced by CANopenDemo and CANopenLinux
License: Apache License 2.0
Currently CANopenSocket uses an old version of CANopenNode (v1.3-master).
Latest CANopenNode master has now almost all the functionalities from current CANopenSocket/canopend application.
CANopenNode master now includes:
So CANopenSocket/canopend is not necessary any more and will be removed in future.
However, my strategy is to keep CANopenNode as tiny as possible. So CANopenSocket can be a place for all other Linux related code and examples. Currently there is canopencomm (and canopencgi) and there are some more plans. There is also a docs directory for online html documentation (generated by doxygen from CANopenNode master, for now).
Hi,
I'm playing with the CANopenSocket.html, but is trying to load the JS files from the lib folder, but there's no lib folder, and the files are notin the project.
The files are:
Regards,
Hi,
Im trying to use canopend as a master like this:
canopend can0 -i 1 -c ""
I tried to change the state with
canopencomm 1 cmd
It accept all the commands changing the states but it never goes operational
both canopencomm 1 preop
and canopencomm 1 start
results in a 7F state and never 05
The slaves instead are working fine.
What Im doing wrong?
thanks,
Francesco
When executing the command
canopencomm 0x71 w 0x1000 0 u64 F000000000000070
I get the following error:
[1] ERROR: 101 - Syntax error.
However, when I execute the command
canopencomm 0x71 w 0x1000 0 u64 0000000000000070
the command executes without issue. I presume i am doing something, but I cannot see it. Any assistance would be appreciated.
The same as for CANopenNode/CANopenNode#47
I've added LSS to CANopenSocket (https://github.com/martinwag/CANopenSocket/tree/add-lss). Feel free to have a look, but be aware that this is still experimental. If you find errors or have other hints, please let me know :-)
Hi,
It's not much of a thing, but I did some tests with running canopen gateway inside a docker container.
It should allow application developers to ease their process.
Its building the canopend daemon from canopensocket repo from source.
Here is the dockerfile: https://github.com/Alphatronics/docker-canopensocket/blob/master/Dockerfile
You can find instructions and pull the image from docker hub: https://hub.docker.com/repository/docker/geoffreyvl/canopensocket
ARMv7 and AMD64 archs are supported.
Let me know if you're interested in having the code shared under the CANopenNode umbrella. Warning: I'm not maintaining this!
I'm wondering if there is a pre-built int deliminator I can use to signify end of command. I have tried using \r\n with no luck. I am sending commands fast enough that they will occasionally stack up and get issued as one command (which of course sends back a syntax error). Any help is appreciated!
So I am new to CANopen and wanted to run the examples/basicDevice but when I enter make, I am getting an error
../../CANopenNode/socketCAN/CO_main_basic.c:28:30: fatal error: bits/getopt_core.h: No such file or directory
after this I tried to make in the CANopenNode respository and getting the same error as well. (I am running this on Ubuntu Mate)
P.S. I already have a hardware CAN Bus where I am reading the data from a sensor by ESP32 and sending it over CAN to a Linux system. Now I want to implement CANopen on this
Can not pass negative parameter value while writing SDO.
If specified as a decimal e.g. "16 write 0x3300 0 i32 -100" help of the command usage is returned.
If specified as a hex: "16 write 0x3300 0 i32 0xFFFFFFC8" it returns: [1] ERROR: 101 - Syntax error.
I just follow the steps for making the library but it fails, maybe I am missing something. I am using Debian Jessie (8), and already installed can-utils.
Please see the attached file. It seems the error is related with CAN_ERR_CTRL_ACTIVE identifier. Do I need to install other libraries or dependencies?
Thanks for any clue
Reyan
I want to create a virtual SDO server using CANopenSocket to communicate with my SDO client device.
Is there an example how to do that and use specific eds files related to the server that I want to create ?
I've been trying to run tutorial for canopend and concretely I'm stuck on following command:
$ app/canopend vcan0 -i 4 -s od4_storage -a od4_storage_auto
.
Even when I create od4_storage and od4_storage_auto files in app directory as described, I'm still getting same error as before. I'm not able to get vcan0 into operational state. Help would be highly appreciated. Thank you very much.
Hi all,
There is a conflict between a typedef in CO_OD.h and a macro defined in math.h
typedef domain_t DOMAIN;
(l.53)
I've also notified this on the CANopenNode project repository, but I think it is more important here, regarding the philosophy of the CANopenSocket project.
As it provides a full-exploitable app to use CANopen with user-purpose entry points in the "app.c/h" source, this issue can arrive pretty fast.
For instance, I wanted to log some data with a timestamp in a file (with 1ms period). I just needed the ' round ' function, and so 'math.h'. And boom.
Of course, it is not dramatic at all, but hey, worth the shot to say it.
Regards.
After sending CO_RESET_COMM OD_performance[ODA_performance_timerCycleMaxTime] always exceed within rt_thread.
Is there a possibility to 'disable' taskRT.maxTime calculation while device is in BootUp state.
CANrx_taskTmr tasks are up and running in the meantime and if taskMain_process get called after reset 'taskMain.maxTime' differs to much.
It also happens within 'CANrx_taskTmr_process' (long dt = tmrMeasure.tv_nsec - taskRT.tmrVal->tv_nsec)
Thank you
SDO transfer works with pican2 and can0 quite nice by the information I got from the tutorial. I was wondering if there is a way to add a part which would explain how the CANopenSocket is handling SDO messages longer than 64 bits. I couldn't figure that out at all (or it is because the same problems as now).
Encoding for data types "os - octet string", "us - unicode string" and "d - domain" is currently hex-string. According to 309-3 this should be RFC2045 mime-base64.
After, execute the examples you recommended as basic introduction, I tried integrating CANopenNode stack into a very simple Qt program, but it failed when compiling with lot of errors, many are in CO_drive.c. I used extern "C" for link with C functions in C++. Please could you give me an idea what I am missing. I am using C++11 in the config flag, and Qt v5.2. I included all headers and sources in the project file.
For example I am getting many errors when compiling the stack/SocketCAN/CO_drive.c. Please attached are the screenshots with some errors, simple main program, and very simple Qt project, in case helps.
My intention is not actually to use the entire CANOpen stack, just listening the CAN frames messages in the network and be able to parse the frames, for PDO I think understand, I am not feeling too bad, but for SDO is more complicated for me.
Thank you so much for your support
Thanks
Hi, I've been to set up CAN communication with one master and two motor drivers and I have certain questions. I may misunderstood some things, but I would kindly appreciate some guidance.
I've connected my PC to PEAK-CAN USB on Linux PC which provided me with all necessary drivers for usage.
As I mentioned, I'm trying to use PC as master CAN node which will send commands to motor drivers which are slave nodes.
I've set up can0
interface on PC and I'm hearing heartbeat from motor drivers. Therefore, communication channel is established.
In basic CANopenSocket tutorial I've been writing/reading SDO commands provided in tutorial but there are few things I'm not quite sure about. With CLI interface I've been providing -s
and -a
arguments which are paths to empty OD file. It would be great if there's example of valid OD for certain device cause provided empty ODs are not of much usage.
It's also not so clear from the tutorial which node is master node. And how to properly run master or client node and distingusih between them.
I've tried to initiate SDO read with method sdoClientUpload
but it always fails in method CO_SDO_initTransfer
in CO_OD_find
method. Return error code is CO_SDO_AB_NOT_EXIST
.
It's quite clear that I don't have valid values written in OD for certain index and subindex, but I've thought that CO_SDOclient_setup
sets those Object Dictionary Variables. Could you please provide some guidance.
Main questions are:
CO_init
or method.Just to make sure, even using provided CLI with correct nodeID and sending SDO read command on socket makes my motor driver heartbeat alternate between 7F
, 05
and 85
states which is quite weird. I'm sorry if I missed something but help would mean a lot. Thank you. :)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.