ArduinoIO HAL component

More
3 years 11 months ago #255913 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 

Please Log in to join the conversation.

More
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?

Please Log in to join the conversation.

More
3 years 11 months ago #255962 by dinodf
Replied by dinodf on topic ArduinoIO HAL component
Yes you can use it for input and output, digital and analogical (Input: 0<=analog-in-xx<= 1023 output: 0<=analog-out-xx<=255)
I think I will add the encoder reads for use it as pendant, but before I have to check the velocity of response...

 

Attachment not found

Please Log in to join the conversation.

More
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...

Please Log in to join the conversation.

More
3 years 11 months ago #255972 by chris@cnc
Replied by chris@cnc on topic ArduinoIO HAL component
Yes, it works. I can write all out pins.
 

Attachment not found

 

Attachment not found

Please Log in to join the conversation.

More
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
Code:
raise SystemExit
in except Exception as e: do not kill LinuxCNC...

What is the correct way to force LinuxCNC to stop?

Thanks
Regards
Dino

Please Log in to join the conversation.

More
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 to join the conversation.

More
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?

Please Log in to join the conversation.

More
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

Please Log in to join the conversation.

More
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 to join the conversation.

Time to create page: 0.264 seconds
Powered by Kunena Forum