Ethercat HAL driver

More
20 Dec 2020 20:00 - 20 Dec 2020 20:03 #192569 by chimeno
Hello @jc2ktr,

how good it works with linuxcnc !! I attach the modified file with a correction.

You have different settings and you have to enable one, for example number 1 why are you using the TXPDO1 and RXPDO1 registers
setp lcec.0.7.X-cmd-OPmodeRel1 1


Hello @RobinTheunis
I've never used the device, but studying a bit, there are some configurable HAL parameters, I don't know if this can help.
setp lcec......stp-freq
setp lcec......stp-maxvel
setp lcec......stp-maxaccel-fall
setp lcec......stp-maxaccel-rise
setp lcec......stp-pos-scale

Greeting
Chimeno
Attachments:
Last edit: 20 Dec 2020 20:03 by chimeno. Reason: more explanation
The following user(s) said Thank You: jc2ktr

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

More
21 Dec 2020 17:00 #192671 by jc2ktr
@Chimeno,

THANKS for your really great help :)

You have different settings and you have to enable one, for example number 1 why are you using the TXPDO1 and RXPDO1 registers


What do you mean with TXPDO1 & RXPDO1?

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

More
21 Dec 2020 19:48 #192689 by chimeno
Hello @jc2ktr

I mean that you are using the registration
TXPDO1 = 1A00
RXPDO1 = 1600

It is also available if you want to change the preconfigured configuration in the driver, that is, you can have in configuration 1 position mode and in configuration 2 the speed mode, then with a simple pin you can change the way the driver works
TXPDO2 = 1A01
RXDO2 = 1601

TXPDO3 = 1A02
RXPDO = 1602

I hope I have explained myself clearly.

Greeting
Chimeno
The following user(s) said Thank You: jc2ktr

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

More
21 Dec 2020 20:40 - 21 Dec 2020 20:41 #192698 by jc2ktr

Hello @jc2ktr

I mean that you are using the registration
TXPDO1 = 1A00
RXPDO1 = 1600

It is also available if you want to change the preconfigured configuration in the driver, that is, you can have in configuration 1 position mode and in configuration 2 the speed mode, then with a simple pin you can change the way the driver works
TXPDO2 = 1A01
RXDO2 = 1601

TXPDO3 = 1A02
RXPDO = 1602

I hope I have explained myself clearly.

Greeting
Chimeno


Hi @ Chimeno,

yes your explanation is more than clear now :)

i use RX/TXPDO1 because i want to use the 0x6060 Bit 8 "Cyclic Dynamic Position Mode (CSP)" though i don´t really know if its the right config for it. Because i don´t get the Motor to move in LinuxCNC by now.

The Manual says following:

2.4.4 CSP Sync Location Mode

Synchronized location mode description
In this mode, the primary controller generates a position trace and sends the target
location (0x607A) to the drive during each PDO update cycle. The drive feeds back the
actual motor position and optional actual motor speed and torque.

Enable CSP mode
To enable the circular synchronization location mode, the value 0008h must be written to 6060 h at the dictionary address. This is what i do in my custom_postgui.hal with my: setp lcec.0.7.opmode 8

Enable Drive
When powered on, the drive is in a non-enabled state. The control word 6040h is written
to 0006h, which will put the drive into the "ready to switch on" state. Once again, write
the value of 0x000F to 6040h, the drive will be in the enabling state, the motor can
respond to the CSP instructions.

This is where i am stuck a little. when i Enable my machine i set the Pins/Signals:
net x-enable lcec.0.7.X-cmd-EnableVoltage
lcec.0.7.X-cmd-EnableOperation
lcec.0.7.X-cmd-SwitchOn
lcec.0.7.X-cmd-/QuickStop <= joint.0.amp-enable-out
The Drive is then enabled and the motor shaft locked, but when i try to jog it won´t move, even if a changing setvalue on lcec.0.7.poscmd is there.
Last edit: 21 Dec 2020 20:41 by jc2ktr. Reason: edit

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

More
21 Dec 2020 20:52 #192700 by chimeno
Hello @jc2ktr
have if we get it, try this.
net x-enable joint.0.amp-enable-out  lcec.0.7.X-cmd-SwitchOn
net x-enable lcec.0.7.X-cmd-EnableOperation
net estop-out lcec.0.7.X-cmd-QuickStop
net estop-out lcec.0.7.X-cmd-QuickStop 


net estop-out <= iocontrol.0.user-enable-out
net estop-out => iocontrol.0.emc-enable-in

Greeting
Chimeno

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

More
21 Dec 2020 20:56 - 22 Dec 2020 14:33 #192702 by jc2ktr

Hello @jc2ktr
have if we get it, try this.
net x-enable joint.0.amp-enable-out  lcec.0.7.X-cmd-SwitchOn
net x-enable lcec.0.7.X-cmd-EnableOperation
net estop-out lcec.0.7.X-cmd-QuickStop
net estop-out lcec.0.7.X-cmd-QuickStop 


net estop-out <= iocontrol.0.user-enable-out
net estop-out => iocontrol.0.emc-enable-in

Greeting
Chimeno


Thanks a lot @Chimeno,

i will try it tomorrow, because my LinuxCNC EtherCAT testbench is in my Office/Workshop

12/22/2020 another day, i changed the signals as above but, problem is still the same, the drive is enabled, and in OP mode but my drive moves not. even if a target position and velocity signal is send to the Drive, i changed my XML further like the one from @MRBaird, when i jog the Axis the commands are sent but no movement occurs. i added a Image where the halshow is online.
Attachments:
Last edit: 22 Dec 2020 14:33 by jc2ktr. Reason: Image added

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

More
22 Dec 2020 19:46 #192853 by chimeno
Hello @jc2ktr

I'm sure it's silly, I can't think of anything myself, you can publish your .hal files and I'll take a look at it

Greeting
Chimeno

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

More
23 Dec 2020 12:48 #192956 by jc2ktr

Hello @jc2ktr

I'm sure it's silly, I can't think of anything myself, you can publish your .hal files and I'll take a look at it

Greeting
Chimeno


@Chimeno

i think it's can't be that big mistake, but i don't see it / get it what the problem is. My complete config is attached.
The Gui starts and the mapped IO's are shown in HAL-Show, and the drive can be enabled but will not move.

Greetings Sven

File Attachment:

File Name: my-mill_12...0.tar.gz
File Size:6 KB
Attachments:

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

More
23 Dec 2020 20:01 #193012 by chimeno
Hello @jc2ktr,

I can't find the configuration signals?
setp lcec.0.7.opmode 8
setp lcec.0.7.X-cmd-OPmodeRel1 1

Greeting
Chimeno

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

More
23 Dec 2020 20:11 - 23 Dec 2020 20:36 #193014 by jc2ktr

Hello @jc2ktr,

I can't find the configuration signals?
setp lcec.0.7.opmode 8
setp lcec.0.7.X-cmd-OPmodeRel1 1

Greeting
Chimeno


The lcec.0.7.opmode 8 is set in the custom_postgui.hal under only under another name setp lcec.0.7.opmode-3 true

its defined in the ethercat.xml <pdoEntry idx="6060" subIdx="00" bitLen="8" halPin="opmode" halType="bit"/>



the other one i must have missed in my config, though i dont really know what it does at the moment.

addition

the setp lcec.0.7.X-cmd-OPmodeRel1 1 < i have renamed it as i added some changes from MRBaird

addition 2

is it possible that the drive does not move because the joint.0.acc-cmd does not change its state it remains allways 0 when i jog the axis
Attachments:
Last edit: 23 Dec 2020 20:36 by jc2ktr. Reason: picture added

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

Time to create page: 0.384 seconds
Powered by Kunena Forum