- Posts: 40
- Thank you received: 9
ArduinoIO HAL component
- dinodf
- Topic Author
- Offline
- Senior Member
-
Less
More
3 years 11 months ago #255913
by dinodf
ArduinoIO HAL component was created by dinodf
Hello,
in this days I have hacked the Jeff Epler's Arduino HAL ( emergent.unpythonic.net/01198594294 ) and rewrited all the Python and firmware code to have a new HAL that can read (for now) max 32 digital bits in, 32 analog values in, 32 digital bits out and 32 analog values out.
If someone wanna test it i'll be happy to know his opinion
All the code can be found on my github github.com/DinoMesina/arduinoIO
Thanks
Dino
in this days I have hacked the Jeff Epler's Arduino HAL ( emergent.unpythonic.net/01198594294 ) and rewrited all the Python and firmware code to have a new HAL that can read (for now) max 32 digital bits in, 32 analog values in, 32 digital bits out and 32 analog values out.
If someone wanna test it i'll be happy to know his opinion
All the code can be found on my github github.com/DinoMesina/arduinoIO
Thanks
Dino
The following user(s) said Thank You: tommylight, piflixe, smc.collins, panming
Please Log in or Create an account to join the conversation.
- itsme
- Offline
- Senior Member
-
Less
More
- Posts: 78
- Thank you received: 21
3 years 11 months ago #255926
by itsme
Replied by itsme on topic ArduinoIO HAL component
Nice, i will test it later, but may take some time...
Can the output pins also be set by hal pins?
Can the output pins also be set by hal pins?
The following user(s) said Thank You: dinodf
Please Log in or Create an account to join the conversation.
- dinodf
- Topic Author
- Offline
- Senior Member
-
Less
More
- Posts: 40
- Thank you received: 9
3 years 11 months ago #255962
by dinodf
Replied by dinodf on topic ArduinoIO HAL component
The following user(s) said Thank You: billykid, tommylight, chris@cnc
Please Log in or Create an account to join the conversation.
- HansU
- Offline
- Platinum Member
-
Less
More
- Posts: 731
- Thank you received: 217
3 years 11 months ago - 3 years 11 months ago #255971
by HansU
Replied by HansU on topic ArduinoIO HAL component
I achieved this by hacking a little ModBus server on a PIC microcontroller and read the signals with the MB2HAL component.
I am currently thinking of using a STM32 board for that to also connect an encoder...
I am currently thinking of using a STM32 board for that to also connect an encoder...
Last edit: 3 years 11 months ago by HansU.
Please Log in or Create an account to join the conversation.
- chris@cnc
- Offline
- Platinum Member
-
Less
More
- Posts: 529
- Thank you received: 140
3 years 11 months ago #255972
by chris@cnc
Replied by chris@cnc on topic ArduinoIO HAL component
The following user(s) said Thank You: dinodf, tommylight
Please Log in or Create an account to join the conversation.
- dinodf
- Topic Author
- Offline
- Senior Member
-
Less
More
- Posts: 40
- Thank you received: 9
3 years 9 months ago #261758
by dinodf
Replied by dinodf on topic ArduinoIO HAL component
Hi, in this months I have develop a bit the code and created a little PCB to use it, it work good, read and write all pins correctly but if i run LinuxCNC with arduino unconnected I receive an error about the /dev/ttyXXX but
in except Exception as e: do not kill LinuxCNC...
What is the correct way to force LinuxCNC to stop?
Thanks
Regards
Dino
Code:
raise SystemExit
What is the correct way to force LinuxCNC to stop?
Thanks
Regards
Dino
Please Log in or Create an account to join the conversation.
- HansU
- Offline
- Platinum Member
-
Less
More
- Posts: 731
- Thank you received: 217
3 years 9 months ago #261917
by HansU
Replied by HansU on topic ArduinoIO HAL component
Do you want LinuxCNC exit by a component?
Please Log in or Create an account to join the conversation.
- dinodf
- Topic Author
- Offline
- Senior Member
-
Less
More
- Posts: 40
- Thank you received: 9
3 years 9 months ago #261949
by dinodf
Replied by dinodf on topic ArduinoIO HAL component
I would like that if the component fails LinuxCNC stop, inform the user and exit because I wanna connect ArduinoIO for drive the changing tool hardware .
How can i do it?
How can i do it?
Please Log in or Create an account to join the conversation.
- HansU
- Offline
- Platinum Member
-
Less
More
- Posts: 731
- Thank you received: 217
3 years 9 months ago #261986
by HansU
Replied by HansU on topic ArduinoIO HAL component
I wouldn't recommend to terminate LinuxCNC in that case. Because that will also kill your notification and it's worst if the program just terminates and you don't know why.
I would connect a pin of your component with some logic to iocontrol.0.emc-enable-in to stop LinuxCNC.
Before that you can create a message with linuxcnc.org/docs/html/man/man9/message.9.html
I would connect a pin of your component with some logic to iocontrol.0.emc-enable-in to stop LinuxCNC.
Before that you can create a message with linuxcnc.org/docs/html/man/man9/message.9.html
The following user(s) said Thank You: tommylight
Please Log in or Create an account to join the conversation.
- dinodf
- Topic Author
- Offline
- Senior Member
-
Less
More
- Posts: 40
- Thank you received: 9
3 years 9 months ago #262000
by dinodf
Replied by dinodf on topic ArduinoIO HAL component
Yes I can use a workaround but in the log files I can read the reason of LinuxCNC exit so this is not a problem, I think that for security reason if a module fails the control have to stop.
Please Log in or Create an account to join the conversation.
Time to create page: 0.107 seconds