AX58100

More
1 year 10 months ago - 1 year 10 months ago #316734 by Hakan
Replied by Hakan on topic Step scale
As a comment, and room for improvements, if one so wishes.

The stepspermm variable is set up as a pdos. Meaning that this value
will be updated every servo cycle (miilisecond). That is not very optimal,
the steps per mm scaling factor is a constant. Set it once and it stays there.
It is not like one will change the scaling value during operation.

The options I saw when I put it as a pdos was to either make it a sdos or a constant in the MCU program.
As a constant in the MCU program it becomes kind of inaccessible, but apart from that it will work fine.
Making it a sdos adds a bit of complexity when giving it a value. There is no interface for sdos to hal
that I know about. One can give a value to a sdos in the ethercat-conf.xml config file, but that brings
its own unnecessary complexity. One need to enter a line like the last line below
Code:
  <slave idx="4" type="generic" vid="00000a88" pid="0a880002" configPdos="true">       <dcConf assignActivate="300" sync0Cycle="*1" sync0Shift="0"/>       <sdoConfig idx="2000" subIdx="0"><sdoDataRaw data ="40 06"/></sdoConfig>  <!-- Steps per mm axis 1: 1600  -->

To end up with "40 06" one brings up a decimal to hex converter and converts 1600 which gives 640.
Shift place on the two bytes 06 40 => 40 06 which one then enters in ethercat-conf.xml.
The code in the MCU stays the same, still Obj.StepsPerMM1 (or what is is called). It is just not updated
every serocycle but once in the beginning.

Just a bit of background and rambling.
Last edit: 1 year 10 months ago by Hakan.
The following user(s) said Thank You: COFHAL

Please Log in or Create an account to join the conversation.

More
1 year 10 months ago #316759 by COFHAL
Replied by COFHAL on topic Step scale
I'm still lost. I'm used to using STEP SCALE in the ini to adjust the number of steps needed to move one mm. but now I don't know how to do it. For example if I need 320 steps/mm, how do I adjust the value lcec.0.D1.stepspermm?

Please Log in or Create an account to join the conversation.

More
1 year 10 months ago - 1 year 10 months ago #316800 by Hakan
Replied by Hakan on topic Step scale
Ok I see, the hal syntax is
Code:
setp lcec.0.D1.stepspermm 320
or for example
Code:
setp lcec.0.D1.stepspermm [JOINT_1]STEP_SCALE

and that goes into the main hal file.
Last edit: 1 year 10 months ago by Hakan.
The following user(s) said Thank You: tommylight, COFHAL

Please Log in or Create an account to join the conversation.

More
1 year 10 months ago #316816 by COFHAL
Replied by COFHAL on topic Step scale
Are these values ​​in the xml file okay?
<master idx="0" appTimePeriod="1000000" refClockSyncCycles="-1"> <!-- was "5" -->
<dcConf assignActivate="300" sync0Cycle="*1" sync0Shift="1000000"/> <!-- was "0" -->

Please Log in or Create an account to join the conversation.

More
1 year 10 months ago #316830 by Hakan
Replied by Hakan on topic Step scale
I think so.
Is there anything suspicuous?

Comments.
appTimePeriod must match the SERVO_CYCLE setting in the ini file. If you go for a SERVO_CYCLE of 2ms, change appTimePeriod to 2000000 as well.
The dcConf line says the Ethercat device is running its own loop at 1 ms, synchronized by ethercat"s own internal clock. Sync0Shift says when, inside that 1 ms, the sync event takes place. 1000000 means right at the end of that 1 ms.
The following user(s) said Thank You: COFHAL

Please Log in or Create an account to join the conversation.

More
1 year 9 months ago - 1 year 9 months ago #320194 by COFHAL
Replied by COFHAL on topic MAX VELOCITY STEP.
I have already tested the STEP generators and they work perfectly, the only problem I have found is that the maximum speed I have achieved is 12, any higher speed immediately gives a join X following error. I tried changing the FERROR and MIM ERROR values, it improves I can increase the speed but in the end the following error appears again.
Last edit: 1 year 9 months ago by COFHAL.

Please Log in or Create an account to join the conversation.

Time to create page: 0.065 seconds
Powered by Kunena Forum