- Posts: 10
- Thank you received: 1
Ethercat HAL driver
- marcin2458
- Offline
- New Member
-
Less
More
7 years 1 month ago #145424
by marcin2458
Replied by marcin2458 on topic Ethercat HAL driver
Hello again,
Thank you all for your help.
I solved the problem with bad configuration of inputs. It turned out that I have entered bad values in my xml file and I don't have all required parameters in my inverter. The drive goes into op state and there are no errors.
But the shaft is still not moving. Linuxcnc reads the position of the shaft, the moment on the shaft, and even the speed when I spin the shaft with my hand. I checked the operation of the program while connecting the drive to positool and when opening linuxcnc the value of pin D230 (n-reference value) changes to 0% and it remains so despite trying to control - in case of a motion task via linuxcnc it should change according to the speed of the axis but this does not happen, it means that LinuxCNC as the value of D230 still sends the value of 0%.Does anyone have any idea how to solve this problem?
I am asking for your help.
Sincerely,
Marcin
Thank you all for your help.
I solved the problem with bad configuration of inputs. It turned out that I have entered bad values in my xml file and I don't have all required parameters in my inverter. The drive goes into op state and there are no errors.
But the shaft is still not moving. Linuxcnc reads the position of the shaft, the moment on the shaft, and even the speed when I spin the shaft with my hand. I checked the operation of the program while connecting the drive to positool and when opening linuxcnc the value of pin D230 (n-reference value) changes to 0% and it remains so despite trying to control - in case of a motion task via linuxcnc it should change according to the speed of the axis but this does not happen, it means that LinuxCNC as the value of D230 still sends the value of 0%.Does anyone have any idea how to solve this problem?
I am asking for your help.
Sincerely,
Marcin
Please Log in or Create an account to join the conversation.
- chimeno
- Offline
- Elite Member
-
Less
More
- Posts: 295
- Thank you received: 125
7 years 1 month ago #145487
by chimeno
Replied by chimeno on topic Ethercat HAL driver
Hi Marcin,
I see that in the new.xml file this configuration:
<dcConf assignActivate = "0" sync0Cycle = "* 1" sync0Shift = "- 2500" />
I think it should be
<dcConf assignActivate = "300" sync0Cycle = "* 1" sync0Shift = "- 2500" />
I also think it's better
<master idx = "0" appTimePeriod = "999895" refClockSyncCycles = "1000">
SERVO_PERIOD = 999955
I think it should be
<master idx = "0" appTimePeriod = "1000000" refClockSyncCycles = "1000">
SERVO_PERIOD = 1000000
in the new.hal file
setp lcec.0.0.srv-enable 1
I think it's better for security
net x-enable => lcec.0.0.srv-enable
regards
Chimeno
I see that in the new.xml file this configuration:
<dcConf assignActivate = "0" sync0Cycle = "* 1" sync0Shift = "- 2500" />
I think it should be
<dcConf assignActivate = "300" sync0Cycle = "* 1" sync0Shift = "- 2500" />
I also think it's better
<master idx = "0" appTimePeriod = "999895" refClockSyncCycles = "1000">
SERVO_PERIOD = 999955
I think it should be
<master idx = "0" appTimePeriod = "1000000" refClockSyncCycles = "1000">
SERVO_PERIOD = 1000000
in the new.hal file
setp lcec.0.0.srv-enable 1
I think it's better for security
net x-enable => lcec.0.0.srv-enable
regards
Chimeno
Please Log in or Create an account to join the conversation.
- marcin2458
- Offline
- New Member
-
Less
More
- Posts: 10
- Thank you received: 1
7 years 1 month ago #145491
by marcin2458
Replied by marcin2458 on topic Ethercat HAL driver
@chimeno
I did what you wrote, but the problem remains the same. The motor shaft still does not move. Linuxcnc tracks position, torque and speed but I can't get speed directly from the program. I contacted Stober's technical support and they told me that the program I uploaded to the inverter is properly configured, so the only solution is a badly written hal file but I don't know where I made a mistake.
Regards,
Marcin
I did what you wrote, but the problem remains the same. The motor shaft still does not move. Linuxcnc tracks position, torque and speed but I can't get speed directly from the program. I contacted Stober's technical support and they told me that the program I uploaded to the inverter is properly configured, so the only solution is a badly written hal file but I don't know where I made a mistake.
Regards,
Marcin
Please Log in or Create an account to join the conversation.
- chimeno
- Offline
- Elite Member
-
Less
More
- Posts: 295
- Thank you received: 125
7 years 1 month ago #145494
by chimeno
Replied by chimeno on topic Ethercat HAL driver
Hi Marcin,
You might have the PID set up wrong, try giving it more,
setp x-pid.Pgain 50.0
setp x-pid.maxoutput 1000.0
another thing, when motor is running ?? but does not move ??
Regards
Chimeno
You might have the PID set up wrong, try giving it more,
setp x-pid.Pgain 50.0
setp x-pid.maxoutput 1000.0
another thing, when motor is running ?? but does not move ??
Regards
Chimeno
The following user(s) said Thank You: marcin2458
Please Log in or Create an account to join the conversation.
- marcin2458
- Offline
- New Member
-
Less
More
- Posts: 10
- Thank you received: 1
7 years 1 month ago - 7 years 1 month ago #145496
by marcin2458
Replied by marcin2458 on topic Ethercat HAL driver
Hello Chimeno,
Thank you for responding so quickly.
I have improved the pid configuration.
The shaft started to spin, one pin was missing 'net v-vel-cmd=> axis.0.0.join-vel-cmd'. But to the same signal is assigned x-pid.output pin. When it assigns both pins to the same signal, the information pops up when the program is opened that the second pin cannot be assigned to the same signal. When for x-pid.output I change the name of the PID signal just doesn't work so the motor shaft is quite "soft" enough that I can shake it with my hand. When I assign it to x-vel-cmd signal, PID works as it should but the shaft does not rotate. Someone may have some idea how to solve this problem, maybe some examples of writing in the hall?
Regards,
Marcin
Thank you for responding so quickly.
I have improved the pid configuration.
The shaft started to spin, one pin was missing 'net v-vel-cmd=> axis.0.0.join-vel-cmd'. But to the same signal is assigned x-pid.output pin. When it assigns both pins to the same signal, the information pops up when the program is opened that the second pin cannot be assigned to the same signal. When for x-pid.output I change the name of the PID signal just doesn't work so the motor shaft is quite "soft" enough that I can shake it with my hand. When I assign it to x-vel-cmd signal, PID works as it should but the shaft does not rotate. Someone may have some idea how to solve this problem, maybe some examples of writing in the hall?
Regards,
Marcin
Last edit: 7 years 1 month ago by marcin2458.
The following user(s) said Thank You: chimeno
Please Log in or Create an account to join the conversation.
- Nico2017
- Offline
- Premium Member
-
Less
More
- Posts: 153
- Thank you received: 26
7 years 1 month ago - 7 years 1 month ago #145896
by Nico2017
Replied by Nico2017 on topic Ethercat HAL driver
Hi all,
I am trying to summarize the general philosophy to get a device with EtherCAT capability to work with the EtherCAT driver then linuxcnc-ethercat.
As far as I understand it, the device manufacturer can provide an ESI file (EtherCAT slave information, using xml formatting). Not sure at this stage if this file can contain some default communication feature.
Then with the firmware of the manufacturer you can set up the EtherCAT communication of the device: which information is exchanged, what frequency and so on. For instance that would be Indraworks for Bosch Rexroth. Once done we should be able to generate an ENI file (EtherCAT network information) which describes the bus topology and all the information exchanged.
This configuration can be amended/tested with the EtherCAT configurator or TwinCAT.
Another file is then created, based on the ENI file, WITH a xml format. It should be created manually to fit the format for the .xml file used in linuxcnc etherCAT module based on the ENI file. This step is described in the nice .pdf tutorial by @roschi: docs.google.com/document/d/1GiB065ZIAaoM...GQl2X9DM9-THNM/edit#
I understand all the parameters transformation but not parameter 2:
I do not really get the A00F transformation to 0x0FA0. I get that 0FA0 in hex gives 4000 in decimal.
At this stage I might need to implement a Eurotherm temperature controller (mini
and an ABB drive with EtherCAT for a specific project. So as I have not seen any of those devices being used like that on this forum topic, I wanted to be sure I got it right in theory before digging in the more technical aspects.
Thank you,
Nicolas
I am trying to summarize the general philosophy to get a device with EtherCAT capability to work with the EtherCAT driver then linuxcnc-ethercat.
As far as I understand it, the device manufacturer can provide an ESI file (EtherCAT slave information, using xml formatting). Not sure at this stage if this file can contain some default communication feature.
Then with the firmware of the manufacturer you can set up the EtherCAT communication of the device: which information is exchanged, what frequency and so on. For instance that would be Indraworks for Bosch Rexroth. Once done we should be able to generate an ENI file (EtherCAT network information) which describes the bus topology and all the information exchanged.
This configuration can be amended/tested with the EtherCAT configurator or TwinCAT.
Another file is then created, based on the ENI file, WITH a xml format. It should be created manually to fit the format for the .xml file used in linuxcnc etherCAT module based on the ENI file. This step is described in the nice .pdf tutorial by @roschi: docs.google.com/document/d/1GiB065ZIAaoM...GQl2X9DM9-THNM/edit#
I understand all the parameters transformation but not parameter 2:
Then grab the Information of the NC-cycle time
here it is A00F → 0x0FA0 = 4000 and multiply by 1000; Or choose another number which fix to the needs (Parameter 2)
I do not really get the A00F transformation to 0x0FA0. I get that 0FA0 in hex gives 4000 in decimal.
At this stage I might need to implement a Eurotherm temperature controller (mini
Thank you,
Nicolas
Last edit: 7 years 1 month ago by Nico2017.
Please Log in or Create an account to join the conversation.
Time to create page: 0.555 seconds