C-Code to Serialport?

More
25 Feb 2022 23:35 #235829 by tsaG
C-Code to Serialport? was created by tsaG
Hi,

I plan to build a revolver for my tool changer. I plan to use a 7I95 for my machine which offers a RS-422 Serial Port. 
What would be the best way to send some commands over this Interface (if possible at all?). 

The receiver side is just a simple Arduino that needs to receive something like "set Tool 09", "load", "unload" etc..

I am a total newb, so any help/Links are appreciated. :)

 

Please Log in or Create an account to join the conversation.

More
26 Feb 2022 04:04 #235836 by Henk
Replied by Henk on topic C-Code to Serialport?
I would rather use the IO on the 7i95 and maybe one of the step/dir interfaces to control the toolchanger and ditch the Arduino. There is probably existing components in linuxcnc to control your toolchanger
you can expand the IO using a mesa daughter card if needed. A much more reliable solution. 

You can also write your own component in c for a custom toolchanger control.

Please Log in or Create an account to join the conversation.

More
30 Jun 2022 19:28 - 30 Jun 2022 20:13 #246297 by beefy
Replied by beefy on topic C-Code to Serialport?

Hi,

I plan to build a revolver for my tool changer. I plan to use a 7I95 for my machine which offers a RS-422 Serial Port. 
What would be the best way to send some commands over this Interface (if possible at all?). 

The receiver side is just a simple Arduino that needs to receive something like "set Tool 09", "load", "unload" etc..

I am a total newb, so any help/Links are appreciated. :)
 

I'm still relatively new to Linuxcnc so take what I say with a pinch of salt.

Here's a thread related to the 7i95. Don't know if it will help in any way.
forum.linuxcnc.org/27-driver-boards/4496...5-configuration-tool

I have some basic/intermediate C programming experience, but for Linuxcnc I'm starting to learn Python as it you can use it to access Hal pins, etc. In the above mentioned thread, if you have a 7i95 driver with a hal connection for the 7i95 serial port, maybe you can use Python to simply give the string to serial port.

I see the RS485 port is intended for I/O expansion, so if it's not simple/possible to use it for sending basic data to other device, maybe you could add a serial port card to your PC and use the Python "serial" library. 
Or perhaps use a USB to serial converter and use a python USB library.
Last edit: 30 Jun 2022 20:13 by beefy.

Please Log in or Create an account to join the conversation.

  • tommylight
  • tommylight's Avatar
  • Away
  • Moderator
  • Moderator
More
30 Jun 2022 20:38 - 30 Jun 2022 20:42 #246308 by tommylight
Replied by tommylight on topic C-Code to Serialport?
Spammer booted.
Correction:
Spammers booted, multiple.
Last edit: 30 Jun 2022 20:42 by tommylight.

Please Log in or Create an account to join the conversation.

Time to create page: 0.054 seconds
Powered by Kunena Forum