- Configuring LinuxCNC
- Advanced Configuration
- EtherCAT
- Exercise: Turn on output led on EL2809 when machine is turned on
Exercise: Turn on output led on EL2809 when machine is turned on
- Martin.L
- Offline
- New Member
Less
More
- Posts: 10
- Thank you received: 0
06 Jan 2025 21:12 #318262
by Martin.L
Exercise: Turn on output led on EL2809 when machine is turned on was created by Martin.L
I have spent a lot of time reading the manual but unfortunately I could not put togheter all the pieces to come up with a solution, I'm pretty new to LCNC and I would like to learn by doing, had the idea to turn on an output led on EL2809 when machine is turned on. (have succesfully installed following Rodw guide)
In HalShow I can turn on and off the led my hand with SET CLR buttons, so it works manually.
I found this info : motion.motion-enabled - (bit, out) TRUE when in machine on state.
Also from the manual: 5.2.1.4 net
The command net creates a connection between a signal and one or more pins. If the signal does not
exist net creates the new signal. This replaces the need to use the command newsig. The optional
direction arrows <=, => and <=> make it easier to follow the logic when reading a net command line
and are not used by the net command. The direction arrows must be separated by a space from the
pin names.
Syntax and Examples of net
net signal-name pin-name <optional arrow> <optional second pin-name>
net home-x joint.0.home-sw-in <= parport.0.pin-11-in
So I guess I have to combine these two, but I have no Idea how to do it.
Please Help!
In HalShow I can turn on and off the led my hand with SET CLR buttons, so it works manually.
I found this info : motion.motion-enabled - (bit, out) TRUE when in machine on state.
Also from the manual: 5.2.1.4 net
The command net creates a connection between a signal and one or more pins. If the signal does not
exist net creates the new signal. This replaces the need to use the command newsig. The optional
direction arrows <=, => and <=> make it easier to follow the logic when reading a net command line
and are not used by the net command. The direction arrows must be separated by a space from the
pin names.
Syntax and Examples of net
net signal-name pin-name <optional arrow> <optional second pin-name>
net home-x joint.0.home-sw-in <= parport.0.pin-11-in
So I guess I have to combine these two, but I have no Idea how to do it.
Please Help!
Please Log in or Create an account to join the conversation.
- Hakan
- Offline
- Platinum Member
Less
More
- Posts: 504
- Thank you received: 157
06 Jan 2025 23:43 - 06 Jan 2025 23:46 #318271
by Hakan
Replied by Hakan on topic Exercise: Turn on output led on EL2809 when machine is turned on
This is not so much about ethercat but about how to connect pins in hal.
Since you are in halshow, go and find the pins of the EL2809 there. It may be under lcec.0. What number or name depends on your ethercat-conf.xml
Then, when you have the pin name of the output where the led is, you enter in your machine.hal (using the actual pin name)
Since you are in halshow, go and find the pins of the EL2809 there. It may be under lcec.0. What number or name depends on your ethercat-conf.xml
Then, when you have the pin name of the output where the led is, you enter in your machine.hal (using the actual pin name)
net switch-on-led motion.motion-enabled lcec.0.1.output-pin
Last edit: 06 Jan 2025 23:46 by Hakan. Reason: Hope,ess keyboard
The following user(s) said Thank You: Martin.L
Please Log in or Create an account to join the conversation.
- onceloved
- Offline
- Premium Member
Less
More
- Posts: 110
- Thank you received: 49
07 Jan 2025 06:41 #318281
by onceloved
Replied by onceloved on topic Exercise: Turn on output led on EL2809 when machine is turned on
You can set it directly via setp, for example, setp lcec.0.1.output-pin 1. For detailed instructions, see this link linuxcnc.org/docs/stable/html/hal/basic-hal.html#sub:hal-setp
The following user(s) said Thank You: Martin.L
Please Log in or Create an account to join the conversation.
- rodw
- Offline
- Platinum Member
Less
More
- Posts: 10820
- Thank you received: 3566
07 Jan 2025 11:35 #318291
by rodw
Replied by rodw on topic Exercise: Turn on output led on EL2809 when machine is turned on
for testing, you could also use flood and mist coolant pins so you can turn on and off within linuxcnc. That's what I do.
The following user(s) said Thank You: Martin.L
Please Log in or Create an account to join the conversation.
- Martin.L
- Offline
- New Member
Less
More
- Posts: 10
- Thank you received: 0
07 Jan 2025 18:43 #318324
by Martin.L
Replied by Martin.L on topic Exercise: Turn on output led on EL2809 when machine is turned on
Thank you all, I have missed the HAL basic document somehow, the manual is really tough to start with. I have some questions related,
1 - Whats the difference between "lcec.0.OUT.dout-0" and "lcec.0.OUT.dout-0-invert" they have the same behaviour
2- I also have a EL 1809 that is rated as input current "typically 3 mA (EN 61131-2, type 3)" Is it usually considered a min or max data? can I feed it with more current or should I limit it?
1 - Whats the difference between "lcec.0.OUT.dout-0" and "lcec.0.OUT.dout-0-invert" they have the same behaviour
2- I also have a EL 1809 that is rated as input current "typically 3 mA (EN 61131-2, type 3)" Is it usually considered a min or max data? can I feed it with more current or should I limit it?
Please Log in or Create an account to join the conversation.
- Hakan
- Offline
- Platinum Member
Less
More
- Posts: 504
- Thank you received: 157
08 Jan 2025 09:07 #318385
by Hakan
Replied by Hakan on topic Exercise: Turn on output led on EL2809 when machine is turned on
The invert pin works the opposite way. Set it to 1 and the output goes off.
Maybe this document can shed some light on the 3 mA
download.beckhoff.com/download/document/...DK9222-0909-0008.pdf
Maybe this document can shed some light on the 3 mA
download.beckhoff.com/download/document/...DK9222-0909-0008.pdf
Please Log in or Create an account to join the conversation.
- Configuring LinuxCNC
- Advanced Configuration
- EtherCAT
- Exercise: Turn on output led on EL2809 when machine is turned on
Time to create page: 0.068 seconds