- Posts: 8
- Thank you received: 1
Ethercat HAL driver
- billiehuijbregts
- Offline
- New Member
-
Less
More
10 years 7 months ago #72507
by billiehuijbregts
Replied by billiehuijbregts on topic Ethercat HAL driver
Got my setup almost working now, but still have problems getting my drive to OP.
When I use the ethercat states op command, I get a red led and a communications error because I need to write some values.
I know this and added those values to my xml file with SdoConfig.
But when I start my ethercat HAL driver using the command terminal, load my xml with lcec_conf and load the lcec module, nothing happens.
Seems like my ethercat master doesn't send a request for the state change to OP, because I get no feedback from the drive (leds, display).
Loading the lcec module should request the OP state right?
When I use the ethercat states op command, I get a red led and a communications error because I need to write some values.
I know this and added those values to my xml file with SdoConfig.
But when I start my ethercat HAL driver using the command terminal, load my xml with lcec_conf and load the lcec module, nothing happens.
Seems like my ethercat master doesn't send a request for the state change to OP, because I get no feedback from the drive (leds, display).
Loading the lcec module should request the OP state right?
Please Log in or Create an account to join the conversation.
- roschi
- Offline
- Senior Member
-
Less
More
- Posts: 40
- Thank you received: 29
10 years 6 months ago - 10 years 6 months ago #72647
by roschi
Replied by roschi on topic Ethercat HAL driver
Hi,
due to further development of the ethercat hal driver especially the "lcec_conf", the content / use of the XML changed slightly.
1. XML file should start/end with <masters> ... </masters> (as mentioned in this thread before #71267 )
2. In diffrence to my initial introduction of the "scale" option the haltype "special32" won't work (as mentioned in this thread before #71871 )
3. To use eg. pos / poscommand with type float use the haltype "complex" in XML see examples here:
S. Ittner config examples close to line 99.
Regards Andreas
due to further development of the ethercat hal driver especially the "lcec_conf", the content / use of the XML changed slightly.
1. XML file should start/end with <masters> ... </masters> (as mentioned in this thread before #71267 )
2. In diffrence to my initial introduction of the "scale" option the haltype "special32" won't work (as mentioned in this thread before #71871 )
3. To use eg. pos / poscommand with type float use the haltype "complex" in XML see examples here:
S. Ittner config examples close to line 99.
Regards Andreas
Last edit: 10 years 6 months ago by roschi.
The following user(s) said Thank You: wazza77, Nico2017
Please Log in or Create an account to join the conversation.
- xk2010
- Offline
- New Member
-
Less
More
- Posts: 1
- Thank you received: 0
10 years 6 months ago #72892
by xk2010
Replied by xk2010 on topic Ethercat HAL driver
Hi,
I had the same questions as shown this.
forum.linuxcnc.org/forum/24-hal-componen...iver?start=168#58343
How to solve this.
Would you help me?
xiekai
I had the same questions as shown this.
forum.linuxcnc.org/forum/24-hal-componen...iver?start=168#58343
How to solve this.
Would you help me?
xiekai
Please Log in or Create an account to join the conversation.
- billiehuijbregts
- Offline
- New Member
-
Less
More
- Posts: 8
- Thank you received: 1
10 years 6 months ago #72898
by billiehuijbregts
Replied by billiehuijbregts on topic Ethercat HAL driver
Dear Xiekai,
I think you can solve that by adding the <masters> </masters> in your XML file, as described one post above yours by Andreas.
Billie
I think you can solve that by adding the <masters> </masters> in your XML file, as described one post above yours by Andreas.
Billie
The following user(s) said Thank You: xk2010
Please Log in or Create an account to join the conversation.
- Cpk_Rbt
- Offline
- Senior Member
-
Less
More
- Posts: 53
- Thank you received: 4
10 years 6 months ago #73871
by Cpk_Rbt
Replied by Cpk_Rbt on topic Ethercat HAL driver
Just getting started using the HAL driver and the Etherlab EtherCAT Master with a Kollmorgen AKD drive. I've got communications between the EtherCAT Master and drive, then moved on to a basic .hal configuration to test comms. I think I must have something wrong, because the computer freezes up when I try to run the .hal file with
Attached is the ethercat config .xml for my drive.
My test.hal file consists of:
If anyone has any insight into what I'm doing wrong with this setup, I'd really appreciate it.
Thanks!
Code:
halrun -I test.hal
Attached is the ethercat config .xml for my drive.
My test.hal file consists of:
Code:
loadusr -W lcec_conf ethercat_config_n.xml
loadrt lcec
loadrt trivkins
loadrt motmod base_period_nsec=0 servo_period_nsec=1000000 num_joints=1
addf lcec.read-all servo-thread
addf lcec.write-all servo-thread
start
If anyone has any insight into what I'm doing wrong with this setup, I'd really appreciate it.
Thanks!
Please Log in or Create an account to join the conversation.
- andypugh
- Offline
- Moderator
-
Less
More
- Posts: 19899
- Thank you received: 4655
10 years 6 months ago #73872
by andypugh
Replied by andypugh on topic Ethercat HAL driver
It might be instructive to type the HAL commands one at a time. (just type halrun then start typing commands)
To watch what the computer is doing open another terminal window and type
To watch what the computer is doing open another terminal window and type
Code:
sudo tail -f /var/log/kernel.log
The following user(s) said Thank You: Cpk_Rbt
Please Log in or Create an account to join the conversation.
Time to create page: 0.741 seconds