Coder Social home page Coder Social logo

Comments (10)

CANopenNode avatar CANopenNode commented on May 27, 2024 1

I think, it is not outdated. See also standard IEC 61800-7 (this is CiA402), you may be able to buy it.

It is not so complex to use 8 drives with single node-id device. Make 8 copies of device profile objects (0x6000+) with an offset 0x800. For example, second drive has objects at index 0x6800+, third at 0x7000+, etc.

Then make enough PDOs, for example 8*4=32, depending on your needs. Then configure PDOs by hand. Just smartly choose COB IDs and mappings for each PDO, so you won't have a mess. And make some documentation about your configuration.

from canopennode.

martinwag avatar martinwag commented on May 27, 2024

Object Entries are not directly linked to addresses. You need to use PDOs for this (TPDO for transmitter, RPDO for receiver(s) ). If you do this correctly, updating the value will lead to TPDO transmission, which in turn will update on all devices with configured RPDO.

from canopennode.

TimK456 avatar TimK456 commented on May 27, 2024

Okey but I configure the Tx RX PDO like in the picture.

image

I think that's waht you mean, but if I update the object now, it will send to both devices and I will send different values to each device e.g. 0x01 to device 1 and 0x02 to device 2 at the same time. Or is there a function to update the object correspond the the COB-ID, that I might have overlooked.

from canopennode.

martinwag avatar martinwag commented on May 27, 2024

you need to configure txpdo in sending device (0x1800 registers) and rxpdo in receiving device (0x1600 registers). for two independent transmission you need two tpdo in sending device (e.g. 181+1800 and 182+1801) and one rpdo each in receiving device (e.g. rx1: 181 + 1600, rx2: 182 + 1600)

from canopennode.

BenjaminLangeEmbedded avatar BenjaminLangeEmbedded commented on May 27, 2024

I probably have a similar problem as Tim if I understand correctly or at least the part he will come to next.
I have 4 motors of the same kind and i want to controll them independently. They all use the same mapping and I have no way to change it.

I can controll each motor alone when setting the eds file and change the values of the object. I also understand that i need to make 4 txpdo's with the COB-ID and Index (e.g. 181+1800, 182+1801, 183+1802, 184+1803). But how can I differentiate the objects? All 4 of them work with 0x6040 for the controlword. Can you point out how to change the value independently or isn't this possible and I have to change the value send txpdo1, change value send txpdo2 and so on?

Really appreciate your help.

from canopennode.

martinwag avatar martinwag commented on May 27, 2024

@BenjaminLangeEmbedded sprichtst du deutsch, das bekomme ich auf enlisch nicht erklärt...

  • Mit dem R/TPDO Mapping erstellst du eine Verknüpfungstabelle zwischen Objekteinträgen in zwei Geräten. Eines davon (Motoren) kann eine feste Konfiguration haben. Das kannst du auf der anderen Seite durch entsprechendes Mapping geraderichten (ist CANopen Seitig auch so gedacht).
  • Du kannst dein Mapping jetzt so einstellen, dass ein beliebiger Objekteintrag von deinem Gerät auf den fest vorgegebenen Eintrag auf dem anderen Gerät übertragen wird.
    Bsp: Deine 4 Motoren möchten jeweils 0x6040 auf dem ersten Byte des PDO sehen. Du erstellst nun 4 TPDOs, der erste mappt in deinem lokalen OD 0x2000, der zweite 0x2001, usw. jeweils auf das erste Byte des TPDO. Jeder der TPDOs bekommt eine COB-ID, diese ist im lokalen Gerät und in den Motoren einzustellen. Das korrekte RPDO Mapping im Motor ist bereits fest vorgegeben. Der PDO Mechanismus sorgt nun automatisch dafür, dass jede Änderung in 0x2000 im Motor 1 in 0x6040, 0x2001 in Motor 2 in 6040 usw übernommen wird.

english machine translation:
With R/TPDO mapping, you create a linking table between object entries in two devices. One of them (motors) can have a fixed configuration. You can align that on the other side through corresponding mapping (similarly intended in CANopen).

Now, configure your mapping so that any object entry from your device is transmitted to the predefined entry on the other device.
Example: Your 4 motors each want to see 0x6040 at the first byte of the PDO. You now create 4 TPDOs, the first maps in your local OD 0x2000, the second 0x2001, etc., each to the first byte of the TPDO. Each of the TPDOs gets a COB-ID, which is to be set in the local device and in the motors. The correct RPDO mapping in the motor is already predefined. The PDO mechanism now automatically ensures that any change in 0x2000 in Motor 1 is transferred to 0x6040, 0x2001 in Motor 2 to 0x6040, and so on.

from canopennode.

BenjaminLangeEmbedded avatar BenjaminLangeEmbedded commented on May 27, 2024

@martinwag Das passt ja gut :) Erstmal vielen Dank für deine Hilfe.
CanOpen ist neu für mich und hier stoße ich auch vom programmieren her an meine Grenze daher echt nett von dir.
Ich habe jetzt mal im Editor die Objekte erstellt. Node-ID dann dementsprechen 1,2,3,4. Passt das so?

Und dann bin ich mir auch unsicher beim Zugriff auf die Parameter/Variablen. Wenn ich dich richtig verstehen liegen diese jetzt bei den TPDO's bei 0x1A00 bis 0x1A0F und für die RPDO's bei 0x1600 bis 0x1607 richtig?

Wie greife ich dann auf diese zu?
Geht das auch über OD_set oder OD_get also OD_set_u32(OD_find(OD, 0x1A00), 0x00, val, odOrig) ? Aber wie komme ich dann bei diesem an die 3 verschiedenen Einträge ran (0x6081, 0x6083, 0x6084)?

Wäre super wenn du mir hier noch einen Tipp geben kannst.

Translation:

Firstly, thank you very much for your help.
CanOpen is new to me and I'm reaching my programming limits here, so that's really nice of you.
I have now created the objects in the editor. Node ID then corresponds to 1,2,3,4. does that fit?

And then I'm also unsure about accessing the parameters/variables. If I understand you correctly, these are now at 0x1A00 to 0x1A0F for the TPDOs and at 0x1600 to 0x1607 for the RPDOs, right?

How do I access them then?
Is this also possible via OD_set or OD_get, i.e. OD_set_u32(OD_find(OD, 0x1A00), 0x00, val, odOrig) ? But how do I get to the 3 different entries (0x6081, 0x6083, 0x6084)?

Would be great if you could give me a tip here.

TX Motors (manufacturer):
image
RX Device (me) :
image

RX Motors (manufacturer):
image
TX Device (me):
image

from canopennode.

BenjaminLangeEmbedded avatar BenjaminLangeEmbedded commented on May 27, 2024

Or is it better to write directly?
Like:
OD_RAM.x1A00_TPDOMappingParameter.applicationObject1 = xxx;
OD_RAM.x1A00_TPDOMappingParameter.applicationObject2 = xxx;

Can't get my hands on the hardware until tomorrow to test it.
Thanks again.

from canopennode.

martinwag avatar martinwag commented on May 27, 2024

If you are completely new to CANopen, I would recommend having a look at "embedded networking with can and canopen" (https://www.canopenbook.com/) this explains SDO/PDO stuff quite extensively. I don't have time to go trough your post right now, sorry.

from canopennode.

sicrisembay avatar sicrisembay commented on May 27, 2024

In DSP402 (v2 26-July-2002), PDO's from different motor (axle) has offset of 64. In this proposal, up to 8 motor (axle) controllers can be supported.

image

Note: I don't have access to the official CiA-402 specification document. This is definitely outdated.

best regards,
Sicris

from canopennode.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.