Advanced Search

Search Results (Searched for: )

  • sin-do-re
  • sin-do-re
11 Apr 2025 22:43

EtherCAT + 7i96s for encoder input and analog output

Category: EtherCAT

Hello 
I have managed to get a few motors running with etherCAT, but I still need a simple I/O system with analog out and encoder input, to use a mesa THCAD.

How is it feasible? Do I need a dual Ethernet card? 
The PCs I’m using have a single Ethernet port, so to run both mesa and ethercat I will need another Ethernet system, to have different NICs, right?

thank you.
  • Grotius
  • Grotius's Avatar
11 Apr 2025 22:25 - 11 Apr 2025 22:26
Replied by Grotius on topic ETHERCAT WAIT SYNC

ETHERCAT WAIT SYNC

Category: EtherCAT

Hi,

The corbett install uses systemctl to start & stop the ethercat bus.
In debian 12 & 13 i use /etc/init.d/ethercat start.

At what time is your ethercat bus started, at pc boot time?
  • Grotius
  • Grotius's Avatar
11 Apr 2025 22:12
Replied by Grotius on topic Running an external program from a HAL pin

Running an external program from a HAL pin

Category: HAL

@Pcw,

Yes, that should work.
Script below works.

$ halcmd -s show pin halui.estop.is-activated
prints:
halui bit   OUT FALSE halui.estop.is-activated

Then get the FALSE or TRUE in a script:

Warning: Spoiler!
  • PCW
  • PCW's Avatar
11 Apr 2025 21:51 - 11 Apr 2025 21:58

Running an external program from a HAL pin

Category: HAL

Another possibility would be a script with halcmd  in a loop,
watching the desired pin/signal  (halcmd -s show pin spindle.0.on | grep TRUE)
(this could also turn off the spindle if LinuxCNC was not running)
  • Grotius
  • Grotius's Avatar
11 Apr 2025 21:50

Connecting TURCK B20 Gateway through EtherLab EtherCat

Category: EtherCAT

Hi,

Here is a example project how to read & write to ethercat-master from any device.
I called the project twincat, because it is able to get and send info to the bus system.

The  ethercat-master source is slightly updated, It can print out more info as normal.
And the source had a nasty bug related to c code configuration wich i found.

This bug is still not resolved in etherlab master. I did tell them the bug, but i did not do a push request.

I think with this project you will be able to figur out how to use the TURCK device.
The project can print all details of the TURCK device. And you can send any data you want to the TURCK device.
1 bit send . Or 8bit, 16bit, and you can add more types if you need.
  • pgf
  • pgf
11 Apr 2025 21:39 - 11 Apr 2025 21:46

Running an external program from a HAL pin

Category: HAL

I run Home Assistant (open source, no cloud involved) which does a good job of managing the devices. It's not the interface to zigbee that's the issue -- it's the interface to HAL. :-)

Is the NML channel documented somewhere?   [ Edit:  Never mind, I found it.   No, I won't be going there...  ]
  • andypugh
  • andypugh's Avatar
11 Apr 2025 21:34
Replied by andypugh on topic Strange behaviour of custom component

Strange behaviour of custom component

Category: Advanced Configuration

Okay I got it... But how to customize them to not hard code them
 

In this case the answer is simple, just move the two variables above the ;; separator and create them as parameters. Then you will end up with independent static variables for each instance of the component. 

So: 
;;
...
enum MODESWAP{WRITEMODE, WAITVELOMODE, INITIAL, WORKING, WAITINGFORENABLE, HOMING};
enum MODESWAP modeSwap;
enum HOMESTATE{HOMETRIGGER, HOMECONFIRM, HOMESEEKING};
enum HOMESTATE homeState;

becomes
param out unsigned modeSwap;
param out unsigned homeState;
...
;;

You _may_ still be able to use the enum, that would be something I would experiment with to find out. If not you could create the state names as macros to preserve readability. (but you can always use something like:
switch(modeSwap){
   case 1: // Waiting
...
   case 10: // Exploding
)
  • Grotius
  • Grotius's Avatar
11 Apr 2025 21:27 - 11 Apr 2025 21:29
Replied by Grotius on topic Running an external program from a HAL pin

Running an external program from a HAL pin

Category: HAL

Hi,

Maybe we can use the zigbee-api

Then we make a tiny connection to the nml channel, as a client.
Then the zigbee can follow the emergency status. on - off.
 
  • pgf
  • pgf
11 Apr 2025 21:16

Running an external program from a HAL pin

Category: HAL

Right. that's exactly what I'm trying to accomplish -- disable the spindle with EStop. The spindle is a Makita router, with an on-off switch. I'd like to simply plug it into one of my zigbee-controlled smart switches, which are trivial to control from just about anywhere. Obviously a hard-wired relay would be better, but it's only a hobby mill, and that's not going to happen anytime soon.
Displaying 17296 - 17305 out of 17305 results.
Time to create page: 1.128 seconds
Powered by Kunena Forum