PDO variable 64 bit
- papagno-source
- Offline
- Premium Member
-
Less
More
- Posts: 107
- Thank you received: 6
24 Dec 2024 10:45 #317272
by papagno-source
PDO variable 64 bit was created by papagno-source
One questions about variable can use with PDO.
On drive with 26 bit encoder , the PDO coomand position and encoder feedback position , if use float , is saturated with screew 10mm in 328 cm about.
The solution are 2 :
1- change gear numerator and denominator in drive
2-can declare in xml file a variable 64 bit
The 64 bit not is supported ?
Thanks
On drive with 26 bit encoder , the PDO coomand position and encoder feedback position , if use float , is saturated with screew 10mm in 328 cm about.
The solution are 2 :
1- change gear numerator and denominator in drive
2-can declare in xml file a variable 64 bit
The 64 bit not is supported ?
Thanks
Please Log in or Create an account to join the conversation.
- Hakan
- Offline
- Platinum Member
-
Less
More
- Posts: 652
- Thank you received: 213
24 Dec 2024 14:14 - 24 Dec 2024 14:23 #317279
by Hakan
Replied by Hakan on topic PDO variable 64 bit
Ethercat 64 bit float is supported.
float-double-ieee
However, the ethercat drive delivers the encoder data in a certain datatype, and you can not change that.
For floating point there is the Ethercat REAL (32-bit) and LREAL(64-bit) data-types.
You convert them into a hal float (which is actually a 64-bit float, or double, since some versions back)
using the keyword "float-ieee" for REAL and "float-double-ieee" for LREAL.
On the other hand, for integers it is likely that linuxcnc is restricting by its 32-bit integers.
There are no 64-bit integers in hal (as far a I know is best to day).
float-double-ieee
However, the ethercat drive delivers the encoder data in a certain datatype, and you can not change that.
For floating point there is the Ethercat REAL (32-bit) and LREAL(64-bit) data-types.
You convert them into a hal float (which is actually a 64-bit float, or double, since some versions back)
using the keyword "float-ieee" for REAL and "float-double-ieee" for LREAL.
On the other hand, for integers it is likely that linuxcnc is restricting by its 32-bit integers.
There are no 64-bit integers in hal (as far a I know is best to day).
Last edit: 24 Dec 2024 14:23 by Hakan.
Please Log in or Create an account to join the conversation.
- papagno-source
- Offline
- Premium Member
-
Less
More
- Posts: 107
- Thank you received: 6
24 Dec 2024 18:14 #317290
by papagno-source
Replied by papagno-source on topic PDO variable 64 bit
For example , i now use :
<pdoEntry idx="607A" subIdx="00" bitLen="32" halPin="poscommand" halType="float" scale="838860.7"/>
for 64 bit float use :
<pdoEntry idx="607A" subIdx="00" bitLen="32" halPin="poscommand" halType="float-double-ieee" scale="838860.7"/>
is correct ?
<pdoEntry idx="607A" subIdx="00" bitLen="32" halPin="poscommand" halType="float" scale="838860.7"/>
for 64 bit float use :
<pdoEntry idx="607A" subIdx="00" bitLen="32" halPin="poscommand" halType="float-double-ieee" scale="838860.7"/>
is correct ?
Please Log in or Create an account to join the conversation.
- Hakan
- Offline
- Platinum Member
-
Less
More
- Posts: 652
- Thank you received: 213
24 Dec 2024 20:36 #317299
by Hakan
Replied by Hakan on topic PDO variable 64 bit
No, unfortunately there isn't anything you can do about this. The first line will give you max number of digits.
The limiting factor is Ethercat's use of 32-bit float. Hal already uses 64-bit float.
If you in some way could increase number of digits from the encoder over Ethercat. That is, to make Ethercat use 64-bit floats for the encoder position, then the second line is the one to use, that will give 64-bit float in to hal.
But it usually isn't possible to increase to 64-bit output, only if you have exceptional control over the device like it is something you make yourself.
The limiting factor is Ethercat's use of 32-bit float. Hal already uses 64-bit float.
If you in some way could increase number of digits from the encoder over Ethercat. That is, to make Ethercat use 64-bit floats for the encoder position, then the second line is the one to use, that will give 64-bit float in to hal.
But it usually isn't possible to increase to 64-bit output, only if you have exceptional control over the device like it is something you make yourself.
Please Log in or Create an account to join the conversation.
- Grotius
-
- Offline
- Platinum Member
-
Less
More
- Posts: 2399
- Thank you received: 2311
24 Dec 2024 21:52 #317301
by Grotius
Replied by Grotius on topic PDO variable 64 bit
Ethercat master supports floats and double values.
codeberg.org/skynet/realtime_app/src/bra.../DataTypeHandler.cpp
codeberg.org/skynet/realtime_app/src/bra.../DataTypeHandler.cpp
Please Log in or Create an account to join the conversation.
- Hakan
- Offline
- Platinum Member
-
Less
More
- Posts: 652
- Thank you received: 213
24 Dec 2024 22:04 #317302
by Hakan
Replied by Hakan on topic PDO variable 64 bit
Yes it does. It works for 64-bit floats. Also lcec does support it. The whole chain works.
Actually, Scott added support for Ethercat 64-bit floats in lcec on my request.
I have tested with my own ethercat device with 64-bit floats. Works fine.
So it is "just" to make the device use another datatype - 64-bit floats. Unfortunately that "just" is impossible I guess.
Then the question is when do you actually need that much precision for the encoder?
This has been a limitation since day one, and things still work.
Actually, Scott added support for Ethercat 64-bit floats in lcec on my request.
I have tested with my own ethercat device with 64-bit floats. Works fine.
So it is "just" to make the device use another datatype - 64-bit floats. Unfortunately that "just" is impossible I guess.
Then the question is when do you actually need that much precision for the encoder?
This has been a limitation since day one, and things still work.
The following user(s) said Thank You: Grotius
Please Log in or Create an account to join the conversation.
- papagno-source
- Offline
- Premium Member
-
Less
More
- Posts: 107
- Thank you received: 6
25 Dec 2024 09:41 #317333
by papagno-source
Replied by papagno-source on topic PDO variable 64 bit
I use Mitsubishi MRj5 and it have encoder absolute value multiturn , without battery memory wirh resolution 26 bit.
With 26 bit you have much count for revolution and 32 bit pos-command hal pin, is full in 326 cm travel axis , with screew 10 mm pitch.
In drive parameter gear normally 1/1 , if you make a long machine with travel 10 meter , not can use 1/1 gear in drive , because after 326 cm moving , the pos-command return on -326 cm and linuxcnc return following error. For resolve now have increase gear in drive at 1/100 and can travel now 32600 cm. But normally is good have gear at 1/1 and use a 64 bit variable for command position and feedbak position.
With 26 bit you have much count for revolution and 32 bit pos-command hal pin, is full in 326 cm travel axis , with screew 10 mm pitch.
In drive parameter gear normally 1/1 , if you make a long machine with travel 10 meter , not can use 1/1 gear in drive , because after 326 cm moving , the pos-command return on -326 cm and linuxcnc return following error. For resolve now have increase gear in drive at 1/100 and can travel now 32600 cm. But normally is good have gear at 1/1 and use a 64 bit variable for command position and feedbak position.
Please Log in or Create an account to join the conversation.
- papagno-source
- Offline
- Premium Member
-
Less
More
- Posts: 107
- Thank you received: 6
25 Dec 2024 09:50 #317335
by papagno-source
Replied by papagno-source on topic PDO variable 64 bit
i use debian 10 , with ethercat.
How can search path for this datatypehandler.ccp , for ceck if have support for 64 bit ?
If not have support , i can patch manually and recompile.
The sintax for use is :
<pdoEntry idx="607A" subIdx="00" bitLen="32" halPin="poscommand" halType="float-double-ieee" scale="838860.7"/>
or
<pdoEntry idx="607A" subIdx="00" bitLen="32" halPin="poscommand" halType="double" scale="838860.7"/>
How can search path for this datatypehandler.ccp , for ceck if have support for 64 bit ?
If not have support , i can patch manually and recompile.
The sintax for use is :
<pdoEntry idx="607A" subIdx="00" bitLen="32" halPin="poscommand" halType="float-double-ieee" scale="838860.7"/>
or
<pdoEntry idx="607A" subIdx="00" bitLen="32" halPin="poscommand" halType="double" scale="838860.7"/>
Please Log in or Create an account to join the conversation.
- Hakan
- Offline
- Platinum Member
-
Less
More
- Posts: 652
- Thank you received: 213
25 Dec 2024 09:58 #317336
by Hakan
Replied by Hakan on topic PDO variable 64 bit
You look at the drive's capabilities
ethercat pdos
Please Log in or Create an account to join the conversation.
- papagno-source
- Offline
- Premium Member
-
Less
More
- Posts: 107
- Thank you received: 6
25 Dec 2024 11:07 #317338
by papagno-source
Replied by papagno-source on topic PDO variable 64 bit
i use debian 10 with linuxcnc 2.9.pre0 and ethercat 1.5.
for use Pdo at 64 bit write in xml :
<pdoEntry idx="607A" subIdx="00" bitLen="32" halPin="poscommand" halType="double" scale="838860.7"/>
?
for use Pdo at 64 bit write in xml :
<pdoEntry idx="607A" subIdx="00" bitLen="32" halPin="poscommand" halType="double" scale="838860.7"/>
?
Please Log in or Create an account to join the conversation.
Time to create page: 0.190 seconds