- Configuring LinuxCNC
- Advanced Configuration
- EtherCAT
- Reading seperate bits from sensors implemented in servo controller
Reading seperate bits from sensors implemented in servo controller
- Felthaus
- Offline
- New Member
Less
More
- Posts: 2
- Thank you received: 1
18 Dec 2024 14:50 - 18 Dec 2024 15:07 #316916
by Felthaus
Reading seperate bits from sensors implemented in servo controller was created by Felthaus
Hi
I've recently recieved my Ethercat servo controller, and have gotten this up and running with linuxcnc.
I'm trying to extract bit 0-4 in 60FD in my HAL file I'm reading the values via HAL using:
net io-status-signal lcec.0.0.io-status
The last 5 bits are I/O high/low sensor values from endstop and homing, however I cant seem to get access to these bits individually.
Am I missing something fundamental?
I've attached my entire (simple) setup as I'm still tinkering with the control via Ethercat
I've recently recieved my Ethercat servo controller, and have gotten this up and running with linuxcnc.
I'm trying to extract bit 0-4 in 60FD in my HAL file I'm reading the values via HAL using:
net io-status-signal lcec.0.0.io-status
The last 5 bits are I/O high/low sensor values from endstop and homing, however I cant seem to get access to these bits individually.
Am I missing something fundamental?
I've attached my entire (simple) setup as I'm still tinkering with the control via Ethercat
Attachments:
Last edit: 18 Dec 2024 15:07 by Felthaus. Reason: readability
Please Log in or Create an account to join the conversation.
- rodw
- Offline
- Platinum Member
Less
More
- Posts: 10737
- Thank you received: 3540
18 Dec 2024 20:18 #316934
by rodw
Replied by rodw on topic Reading seperate bits from sensors implemented in servo controller
In your xml file, you need a complex entry to parse out the bits. SOmething like this example of mine. Don't just assume this is exactly what you want!
github.com/rodw-au/linuxcnc-cia402/blob/...t-conf-diewu.xml#L31
github.com/rodw-au/linuxcnc-cia402/blob/...t-conf-diewu.xml#L31
The following user(s) said Thank You: Felthaus
Please Log in or Create an account to join the conversation.
- Felthaus
- Offline
- New Member
Less
More
- Posts: 2
- Thank you received: 1
18 Dec 2024 21:02 #316941
by Felthaus
Replied by Felthaus on topic Reading seperate bits from sensors implemented in servo controller
Thank you rodw, thats exactly what I was looking for!
The following user(s) said Thank You: rodw
Please Log in or Create an account to join the conversation.
- Configuring LinuxCNC
- Advanced Configuration
- EtherCAT
- Reading seperate bits from sensors implemented in servo controller
Time to create page: 0.063 seconds