The rate that G code is processed by the machine ?
- grey1beard
- Offline
- Elite Member
Less
More
- Posts: 167
- Thank you received: 0
14 Nov 2013 02:27 - 14 Nov 2013 06:25 #40800
by grey1beard
Replied by grey1beard on topic The rate that G code is processed by the machine ?
So six days thinking about the task I've set myself.
Not sure if I should start a new thread, but I'll continue here untill someone suggests otherwise.
I've looked at the layout of the h.dulcimer and the 'map' of where the hammer actually hits the strings, and it now looks like a simpler approach would be to use three linear axis, each with a hammer solenoid doing the striking.
There would be only 12 striking positions for each axis , each roughly 1.5 inches apart over a 16" track.
Each note woud have a unique X, Y, or Z value, and using an inverse feed rate, I can control the rthymn. I'd use the various other available controls to fire the hammers.
At the moment, I'm going with Axis and G-code because they are familiar to me, and configuring a new m/c shouldn't be too onerous.
However, further down the line I can see a possible difficulty. I currently use 8.04 on a desktop in the workshop(best latency), and I feel reasonably confident that the junk boxes in the workshop will provide me with a working prototype.
But if I want to get out onto the street with this thing, a laptop plus car battery power supply looks like a necessity.
Will this be doable, or should I, at this early stage, go in a different direction to find an equivalent solution ?
Arduino ? Raspberry Pi ? BeagleBoard Black ? or ?
John
Not sure if I should start a new thread, but I'll continue here untill someone suggests otherwise.
I've looked at the layout of the h.dulcimer and the 'map' of where the hammer actually hits the strings, and it now looks like a simpler approach would be to use three linear axis, each with a hammer solenoid doing the striking.
There would be only 12 striking positions for each axis , each roughly 1.5 inches apart over a 16" track.
Each note woud have a unique X, Y, or Z value, and using an inverse feed rate, I can control the rthymn. I'd use the various other available controls to fire the hammers.
At the moment, I'm going with Axis and G-code because they are familiar to me, and configuring a new m/c shouldn't be too onerous.
However, further down the line I can see a possible difficulty. I currently use 8.04 on a desktop in the workshop(best latency), and I feel reasonably confident that the junk boxes in the workshop will provide me with a working prototype.
But if I want to get out onto the street with this thing, a laptop plus car battery power supply looks like a necessity.
Will this be doable, or should I, at this early stage, go in a different direction to find an equivalent solution ?
Arduino ? Raspberry Pi ? BeagleBoard Black ? or ?
John
Last edit: 14 Nov 2013 06:25 by grey1beard. Reason: later thoughts
Please Log in or Create an account to join the conversation.
17 Jan 2014 05:34 #42893
by clunc
Replied by clunc on topic The rate that G code is processed by the machine ?
If you have a finite number of moves, I'm thinking you could take an old "machine-language approach" and "tune your code" by timing each of the finite moves and storing the results in a table (of #<_named_parameters>) which can then be used to calculate another table of "Perfect" feed rates for each move.
Please Log in or Create an account to join the conversation.
17 Jan 2014 06:43 #42895
by DaBit
Replied by DaBit on topic The rate that G code is processed by the machine ?
I am not really into Arduinos, but the GRBL G-code interpreter/motion controller seems to be pretty decent.
You might want to check that route.
You might want to check that route.
Please Log in or Create an account to join the conversation.
17 Jan 2014 21:48 #42918
by andypugh
That sounds like a lot less fun though.
Replied by andypugh on topic The rate that G code is processed by the machine ?
it now looks like a simpler approach would be to use three linear axis, each with a hammer solenoid doing the striking.
That sounds like a lot less fun though.
Please Log in or Create an account to join the conversation.
17 Jan 2014 22:06 #42920
by andypugh
Replied by andypugh on topic The rate that G code is processed by the machine ?
Going back to the start of the question:
Perhaps the way to time the strikes (if you don't mind the music sounding a bit "mechanical" is to fire the strking solenoids from a fixed-frequency pulse generator (set to the tempo of the music) and to pause at the end of each move until the strike comes in?
;turn on both strikers
M62P0
M62P1
;move to xyz for C, uvw for E
G0 X#<CX>Y#<CY>Z#<CZ>U#<EU>V#<EV>W#<EW>
; Wait for strike pulse
M66 P0 L2
; No notes on this beat
M65P0
M65P1
M66 P0 L2
... and so on
Then in HAL
net pulse stepgen.7.step => and2.0.in0 and2.0.in1 motion.digital-in-00
net strike-left-cmd and2.0.in1 motion.digital-out-00
net strike-right=cmd and2.1.in1 motion.digital-out-01
net strike-left and2.0.out parport.0.pin-01-out
net strike-right and2.2.out parport.0.pin-02-out
(Stepgen.7 is a velocity-mode stepgen set to the meter of the music to be played, with a step length just long enough for the strikes)
Perhaps the way to time the strikes (if you don't mind the music sounding a bit "mechanical" is to fire the strking solenoids from a fixed-frequency pulse generator (set to the tempo of the music) and to pause at the end of each move until the strike comes in?
;turn on both strikers
M62P0
M62P1
;move to xyz for C, uvw for E
G0 X#<CX>Y#<CY>Z#<CZ>U#<EU>V#<EV>W#<EW>
; Wait for strike pulse
M66 P0 L2
; No notes on this beat
M65P0
M65P1
M66 P0 L2
... and so on
Then in HAL
net pulse stepgen.7.step => and2.0.in0 and2.0.in1 motion.digital-in-00
net strike-left-cmd and2.0.in1 motion.digital-out-00
net strike-right=cmd and2.1.in1 motion.digital-out-01
net strike-left and2.0.out parport.0.pin-01-out
net strike-right and2.2.out parport.0.pin-02-out
(Stepgen.7 is a velocity-mode stepgen set to the meter of the music to be played, with a step length just long enough for the strikes)
Please Log in or Create an account to join the conversation.
Time to create page: 0.095 seconds