Jump to content

Recommended Posts

Witam serdecznie. Mam kilka pytań odnośnie CanOpen. Czytanie pomocy i przeglądanie projektów pomogło mi zrozumieć niektóre z nich, ale nadal mam następujące:

1. Jaka jest różnica między PDO a SDO?

2. Czy wszystkie kroki konfiguracji wysyłania i odbierania muszą zostać wykonane?

3. Jeśli wysyłam SDO, które w zawartości ma 4 bajty słowa sterującego i 4 wartości zadanej to jak je połączyć?

4. Czy falownik zapamiętuje ostatnio wysłane polecenie? Czy jego bufor wejściowy powinien zostać zresetowany?

Poznaje tajniki CanOpen na V130-33-B1 z kartą V100-17-CAN i falownikiem LENZE 8200Vector

Link to comment
Share on other sites

  • MVP 2023

......Translated from Polish

Hello and welcome. I have a few questions about CanOpen. Reading the help and looking through the projects helped me understand some of them, but I still have the following:

1. What is the difference between PDO and SDO?

2. Do all send and receive setup steps need to be completed?

3. If I send an SDO that contains 4 bytes of control word and 4 set value, how to connect them?

4. Does the inverter remember the last command sent?

Should its input buffer be reset?

Learns the secrets of CanOpen on V130-33-B1 with the V100-17-CAN card and the LENZE 8200Vector inverter

Link to comment
Share on other sites

  • MVP 2023

Some tips about CAN open in pdf

CAN_open_schneider.pdf

p.13 - Basics.

I'm guessing you have an 8200 with a 2171 module installed

EMF2171IB_2172_BA_Fieldbus_module_type_2171_2172_Systembus(CAN)_EN.pdf

A few short answers that are in the documents above:

1.  PDOs (process data objects) for real-time transmission of process data.  SDOs (service data object) for read and write access to the object dictionary

2. Not if the manufacturer does not require it. For example, to start Schneider servo drives, you need to follow the correct procedure for reading the device status record.

3. If the SDO is prepared in a PLC, then you should use a Struct (from Visilogic Vector menu)  - in which you can connect different types of data into one sequential array of MI. And then you can send it with one SDO command in which you specify the length of this array.

4. I think the answer is yes. However, this is only true if the inverter does not have communication status monitoring enabled.

5. Maybe no.

 

Link to comment
Share on other sites

Coś nie idzie dobrze, gdzie popełniłem błąd? Zgodnie z instrukcją za odblokowanie dysku odpowiada bit 10 w pierwszych bajtach. Ustawiłem więc bity i wysłałem je przez SDO i działa. Dodam, że korzystałem z kanału synch. W tym telegramie ustawiając bajty 2 i 3 ustawiana jest ustawiona prędkość, więc dodaję blok struct i pierwsze bajty działają, ale nie ma ustawionej prędkości.
Kratmel, dziękuję za pomocne pliki, mam E82ZAFC kartę komunikacyjną.

image.thumb.png.61697180daae2e1e72a43e8ca1d5efd0.png

image.thumb.png.4f830732af7ec56902733f7d3c75e35e.png

Link to comment
Share on other sites

  • MVP 2023

Translated...

Something is not going well, where did I go wrong? According to the instructions, bit 10 in the first bytes is responsible for unlocking the disk. So I set the bits and sent them via SDO and it works. I will add that I used the synch channel. In this telegram, by setting bytes 2 and 3, the set speed is set, so I add a struct block and the first bytes work, but there is no set speed.

Kratmel, thank you for the helpful files, I have an E82ZAFC communication card.

 

You need to make sure that network is selected as the speed setting source.

Also, as far as I remember (several years ago I dealt with such a converter with a 2171 module), 50Hz must be written with the value 500000 in SDO with index 5FD1h (setpoint) and 10000 in SDO 5DF7h (start). That is, the speed setting address is before the start command. I couldn't find any manual quickly. Maybe your module offer a slightly different location of the setpoint.

Please post used manual or link for CANopen evaluation via E82ZAFC

Link to comment
Share on other sites

I put in variables. It didn't help. Some settings have disappeared and I cannot put the inverter into operational mode, as if the NMT plc was not sending. I've set the status of the bits that disappeared, but I'm still struggling with the set value. If anyone has any ideas, they're welcome. Thanks for the help.

Link to comment
Share on other sites

  • MVP 2023

Perhaps it would be useful at present to try and monitor the strings, change things and find the successful resolution by using a PC, like I often suggest for getting around modbus 485 issues. 

It is far easier to manipulate strings/sends etc on the PC, and then once the correct one is found for what is wanted, transfer it to the PLC. 

I am likely showing my ignorance as I don't use can-open, but I know you can get usb canbus converters that can then be monitored easily, and a quick goggggles showed many programs available.  Perhaps there are other easier methods as well....but I would think that you at least need an actual interface/device on the PC.   Can you use a native serial port somehow?  I don't know.

cheers, Aus

 

Link to comment
Share on other sites

  • MVP 2023

To solve your task, you need to clearly understand what you want to do.

Unfortunately, your manual is in German and it is difficult for me to immediately give any recommendations.

The first task of the CANopen network is to bring the necessary devices into a state of normal operation by NMT command.

However, you should understand that the frequency converter is controlled by signals from the network only when the control source - network is selected in the parameters.

The best solution is to have the frequency converter connected to the control program from the manufacturer and observe what happens in the process of sending signals from the PLC. With the help of this program, you can save the current state of the parameters and if something goes wrong - return parameters to the previous working state.

2 hours ago, Tomek said:

I put in variables. It didn't help. Some settings have disappeared and I cannot put the inverter into operational mode, as if the NMT plc was not sending. I've set the status of the bits that disappeared, but I'm still struggling with the set value. If anyone has any ideas, they're welcome.

Unfortunately, none of the forum members will be able to understand from your message what you sent to the converter and why nothing works.

 

Now regarding the theory of network control - in the standard view, we issue a command and get a response.

In the CANopen network, we have an object dictionary that is created virtually. Accordingly, the master records something in a certain place of the dictionary... and the controlled device takes the information that concerns it from this library.

In some Lenze electric drives (8400), the address must be calculated as the sum of the parameter number and some offset. Therefore, sometimes there is a problem - that in the process of experiments, we record something in a completely different area of the library (different parameters).

Put here on the forum the tables with the addresses of the SDO that you want to use and the tables in which  are specified standard  variables used in the PDO of your device.

 

Link to comment
Share on other sites

image.png.e1b81167820a5ecd7a8f9802e92eedba.png

As for PDO addressing, it is the same as in the Unitronics program. Data transfer doesn't trigger anything. I started sync. when sending SDO to the same address, I run the inverter with respect to the set bits, but I have a problem with the set value.
according to the instructions, the process channel is C0395 - input data,
C0396 - output data.

image.png.5a645dd1a58c8ae074219936d2145265.png

Where the first 2 bytes are the inverter status bits, e.g.
unlocking, JOG speed etc. And the next two are the set value. And that's what I have a problem with.

 

It is possible that I sent NMT stop to the inverter by mistake and that is why it does not want to switch to network start.

Link to comment
Share on other sites

I fixed the NMT

Kratmel, do you have a description of the C0520 code? Described in the manual as service code LENZE and no information. By setting its parameter (10000), he switched it to verbal ordering of signals from the module
INTERBUS or PROFIBUS function.

Link to comment
Share on other sites

Welcome back. Currently, the stage has stopped at the set value. It seems to be, but not stable. It appears at various intervals. I transfer data via SDO. PDO somehow doesn't want to transfer data. As I wrote, bit control is still there. I'm still fighting, although I'm slowly running out of ideas. If you have any ideas, I'd love to try them out. As for PDO, I don't know why it doesn't react at all. On no channel.

The assignment format is ok.

Link to comment
Share on other sites

  • MVP 2023

Unfortunately, I can't see your code in full - but I have some recommendations from experience with SDO and Lenze:

1) when transferring something through SDO, I had to use the data structure to place the required set of information in the form of an MI vector. (not the ML vector as you have in the pictures). An example of my structures and commands is below

TPDO_struct.png.2afbb2d4636205dd90b551ac8d99debd.png

TPDO_MI.png.eef2af4afb154cc1aaea02c96fc1434e.png

RPDO_MI.png.40267fabb3ed2eec9548274fded4affd.png

2) When transmitting SDO, it is important to fundamentally prohibit other SDO that may try to be transmitted during the PLC operation. That is, it is necessary to make a counter and transmit the necessary SDOs always in turn (ideally one at a time for 1 cycle of running the PLC program).

I made a condition that before each transmitted command there is a SDO counter comparison condition. Only then was I able to pass the long chain of SDO to Lenze. This is caused by a write delay in the drive itself. If the queue of commands is too high, it does not have time to process them and transmission becomes sporadic.

For example, out of 8 commands, with the usual method of transmitting everything in a row, 3-4 passed - the rest were ignored or transmitted sporadicaly. The use of the counter made it possible to transfer everything, and by modifying the algorithm to transfer only those that change, I was able to speed up the work even more.

SDO.thumb.png.a371ba9327ab8c1bc9071f49ce0d57a4.png

This is not the best algorithm (it transfers the SDO queue from the message selected by the number to the last one) - but it works with Lenze 8400 and after the required functions began to be performed stably, I left it as it is.

3) Conclusions - perhaps due to the peculiarities of the processing cycle of the HMI interface, your command is repeated many times in the transfer buffer. Lenze rejects the excess due to slow write (CAN command is fast transmitted but slow applied in Lenze itself) you can see that the transfer is not stable.

4) regarding PDO, you need to check how Lenze parameter C0001 is configured. It should be 3.

Link to comment
Share on other sites

Kratmel, thank you for your help. SDO and PDO are finally working, now I'm still struggling with receiving the status
NMT, to control the network, I did as in the example, but something does not work. Will the inverter itself respond to the status inquiry sent? Do I need to set any parameter again?

image.png.0890ac3840e81b3c91c82d6996d117e5.png

This is this part of the program.

Link to comment
Share on other sites

  • MVP 2023

It looks like all OK with your NMT status chek.

You must remember that in rung 23 Mb1112 reset itself...

It is not possible to check this via online visilogic mode - it is to fast  :)

You must add increment variable FB (for example DW or ML) to end of rung 23. (Only for testing purpose)

You can see is it MB1112 manipulate in process of NMT Node Guard.

If you disconnect Can wire - you can see 255 in MI1113 Status = communication lost.

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.

Guest
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...