Hybrid View
-
10-06-2020 #1
Interrupt on change of state? Your time-sensitive processing is in the discrete control and not the I2C if you're using the TWI registers.
-
10-06-2020 #2
Yes it is possible you can register for toggle interrupts on any of the IO pins, trouble is my code is written in arduino/cpp at the moment, this means there is a stack to park so there is some overhead from servicing the interrupt. If the current polling approach takes too long will have a look.
-
10-06-2020 #3
So here is a baseline, the basic axis mirroring with auto squaring, but without I2C. Lag is 600ns after a lot of messing about I just stuck the logic in a lookup table and deleted all my code ;-) Yellow trace is step output from DDCS running at 10000mm/min, blue trace is the arduino step output, lag is shown in 'dt' bottom right.
-
11-06-2020 #4
You're not going to get better than that!
-
11-06-2020 #5
-
13-06-2020 #6
My dual motor homing / squaring board is now working with the DDCS. Video clip below. DDCS was told to 'home' the X axis:
1. Each motor stops when its respective home switch is activated,
2. Once both home switches are activated the board signals home to the DDCS,
3. DDCS now backs X away from home searching for switch release,
4. If one motor's home releases before the other this motor is stopped until both home switches are released,
5. Once both home switches are released the board clears home back the the DDCS and DDCS zero's X co-ordinate,
6. DDC now moves X a pre-configured distance away from home.
This logic only activates when a home switch is hit and the machine is travelling towards home. If travelling away from home either switch hit signals the DDCS (i.e. it behaves as a limit switch).
The only downside of this is that in normal operation driving the machine past home in the X- direction requires both switches to activate before limit- is signalled. This is not a problem unless one of the switches has fallen off.
Last edited by devmonkey; 13-06-2020 at 01:47 PM.
Thread Information
Users Browsing this Thread
There are currently 4 users browsing this thread. (0 members and 4 guests)
Similar Threads
-
BUILD LOG: 8x4 router build. Steel base & Aluminium gantry gantry
By D-man in forum DIY Router Build LogsReplies: 57Last Post: 13-12-2019, 10:43 AM -
BUILD LOG: Design stage - All steel - 1200x750x110 - aluminium capable (hopefully)
By oliv49 in forum DIY Router Build LogsReplies: 3Last Post: 08-06-2018, 01:18 PM -
welding steel base or just getting aluminium extrusion
By reefy86 in forum Gantry/Router Machines & BuildingReplies: 200Last Post: 15-01-2018, 08:55 AM -
BUILD LOG: Steel Frame, Aluminium Hybrid Design Thread
By f1sy in forum DIY Router Build LogsReplies: 0Last Post: 23-02-2016, 10:04 AM -
Steel vs Aluminium
By gavztheouch in forum Metalwork DiscussionReplies: 4Last Post: 26-05-2014, 10:11 PM
Bookmarks