Hi All,
Need a little guidance with a project (first real crack at this since turning on a LED a few times and getting a display to say "Hello World")
In short what I want to achieve is to build an electronic lead screw.
Hardware that I am using:
Mega 2560
TTL to RS485 board(MAX485 RS485 module)
Delta Dop B07s515 HMI
Hontko 1024PPR Push Pull Encoder on spindle
Delta B series Servo Drive and Motor (10000ppr)
Why am I using an arduino when everything else is industrial hardware?
In lock down for the the next couple of weeks and so unable to get the brand of control I am familiar with using (Delta SA2 plc with 100kHz output would have been used for the project)
What I want to be able to achieve with the ELS:
Threading in both metric and imperial standards
Setting a start/stop/return/repeat for the threading
What I need the Arduino to do.
Receive the encoder signal
Output the Servo Enable/Step/Direction signals
Comm with the screen so I can change the ratio between input pulse and output pulse.
What I am struggling with:
RS485 comms with HMI
A good way to deal with the step out put pulse.
RS485 comms
I am not sure whether I should set the Arduino as master or slave. I have looked at Libraries for RS485 Modbus RTU coms by Cadish12 (Modbus XT) and 4-20MA (Modbus Master). I can set the screen as either the Master or Slave, I want to use the best setting on the Arduino to keep the cycle time on the program low. Will also need to assign Hex addresses to the relevant registers and bits that will be needed.
Step output pulse
I am using the original lead screw till I get a ball screw installed. It is a six TPI which equates to 0.00021167...mm per step on the servo drive after 2:1 reduction between motor and screw. This means when threading at finest setting I plan on adding (0.2mm pitch) I need to pulse the servo driver one step for every 4.3349...pulses from the spindle. Any thoughts on how to tackle this? On short sections of threads the small error should not be an issue as it will be a micron or less. Secondary to this, will I need to set the signal inputs from the Encoder as interrupts?
I have considered sending the A and B pulse from the encoder straight to the Servo Drive and then using the Z Pulse (only pulsed once per rotation) as signal to the arduino which will then enable the servo at the same point in the spindle rotation for every pass. Count the number of Z pulses and then disable the servo again. How ever I will not the be able to put in a rapid return to start position.
These are my two major head scratchers for now. I would appreciate being pointed in the right direction of similar projects that have been shared or any other relevant reading.