Monitoring SDO value
- TheRoslyak
- Topic Author
- Offline
- Elite Member
Less
More
- Posts: 238
- Thank you received: 37
02 Aug 2024 14:08 - 02 Aug 2024 14:12 #306738
by TheRoslyak
Monitoring SDO value was created by TheRoslyak
The situation is as follows: There is an option to set SDO values at the start of the EtherCAT module. Is it possible to monitor SDO registers for reading? For example, there is a C2000 drive and an EtherCAT manual. Let's say you need to monitor register 3026:01, which is the input status, or DC voltage 3021:06. Ideally, these registers should be in the PDO by the manufacturer, but for some reason, they are not. Therefore, simply writing them into the XML in the PDO section doesn't work (it just doesn't work). In TwinCAT, it is possible to track these states (and accordingly, they are not PDOs) (this happens not as fast as with PDO variables, but this possibility exists). It would also be nice to change these as well, for example, changing the value of register 3026:41, which is for output. For now, I can simply set it in the EtherCAT terminal with the commandbut this is still a workaround. Perhaps it is necessary to work more with the pure EtherCAT library and refine this function.
Does anyone know how to solve this?
filecenter.deltaww.com/Products/download...1_OM_EN_20230221.pdf
ethercat upload -p 0 -t uint16 0x3026 1
Does anyone know how to solve this?
filecenter.deltaww.com/Products/download...1_OM_EN_20230221.pdf
Last edit: 02 Aug 2024 14:12 by TheRoslyak.
Please Log in or Create an account to join the conversation.
02 Aug 2024 14:53 #306746
by Aciera
Replied by Aciera on topic Monitoring SDO value
Admin, maybe this could be moved to the EtherCAT section.
The following user(s) said Thank You: tommylight
Please Log in or Create an account to join the conversation.
- tommylight
- Online
- Moderator
Less
More
- Posts: 19188
- Thank you received: 6430
02 Aug 2024 15:58 #306757
by tommylight
Replied by tommylight on topic Monitoring SDO value
Done, thank you.
Please Log in or Create an account to join the conversation.
- TheRoslyak
- Topic Author
- Offline
- Elite Member
Less
More
- Posts: 238
- Thank you received: 37
06 Aug 2024 15:21 - 06 Aug 2024 15:22 #307100
by TheRoslyak
Replied by TheRoslyak on topic Monitoring SDO value
Since no advice was forthcoming, I decided to develop my own component that can monitor and change SDO parameters.
Essentially, this will be a similar component to the one currently working with EtherCAT LinuxCNC but specifically for manipulating SDO data. Unlike the existing driver, it will work with YAML, which is much more convenient than XML.
An approximate example of such a file will be attached. If there are any suggestions, I would be happy to hear them.
I think I will start this week and finish in about a week. Later on, it will be possible to integrate the old functionality for working with PDO.
Although the current one works well, it has its drawbacks.
PS Admins, please add yaml and yml formats to the editor.
Essentially, this will be a similar component to the one currently working with EtherCAT LinuxCNC but specifically for manipulating SDO data. Unlike the existing driver, it will work with YAML, which is much more convenient than XML.
An approximate example of such a file will be attached. If there are any suggestions, I would be happy to hear them.
I think I will start this week and finish in about a week. Later on, it will be possible to integrate the old functionality for working with PDO.
Although the current one works well, it has its drawbacks.
PS Admins, please add yaml and yml formats to the editor.
Last edit: 06 Aug 2024 15:22 by TheRoslyak.
Please Log in or Create an account to join the conversation.
- TheRoslyak
- Topic Author
- Offline
- Elite Member
Less
More
- Posts: 238
- Thank you received: 37
19 Aug 2024 09:00 #308124
by TheRoslyak
Replied by TheRoslyak on topic Monitoring SDO value
So, I uploaded a working version for interacting with SDO. With this utility, you can read the status of SDO registers. I haven't yet implemented the online value writing—this will be the next step. It's not as straightforward because you can't attach it to an address like with PDO. You have to use upload and download commands. I would like someone to test it, provide feedback on its functionality, and offer advice on code optimization, etc., because after a while, you start writing clumsy code.
github.com/TheRoslyak/LcecSdo
github.com/TheRoslyak/LcecSdo
The following user(s) said Thank You: rodw
Please Log in or Create an account to join the conversation.
- TheRoslyak
- Topic Author
- Offline
- Elite Member
Less
More
- Posts: 238
- Thank you received: 37
21 Aug 2024 10:34 - 21 Aug 2024 10:35 #308277
by TheRoslyak
Replied by TheRoslyak on topic Monitoring SDO value
So, I updated the branch. Now you can overwrite SDO data.
A so-called forwardScale has been added to the float. It was necessary to calculate and recalculate data when a variable had to be used as a denominator. The complex can be decomposed into bits separately.
Of course, there are still errors and optimization opportunities in the code. For now, this utility can be used for monitoring SDO data. It's an alternative to sdoConfig, allowing you to change parameters on the fly and save them in a proper format instead of raw data (which often causes confusion).
github.com/TheRoslyak/LcecSdo
A so-called forwardScale has been added to the float. It was necessary to calculate and recalculate data when a variable had to be used as a denominator. The complex can be decomposed into bits separately.
Of course, there are still errors and optimization opportunities in the code. For now, this utility can be used for monitoring SDO data. It's an alternative to sdoConfig, allowing you to change parameters on the fly and save them in a proper format instead of raw data (which often causes confusion).
github.com/TheRoslyak/LcecSdo
Last edit: 21 Aug 2024 10:35 by TheRoslyak.
Please Log in or Create an account to join the conversation.
Time to create page: 0.172 seconds