Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: GRAYHIL on July 31, 2013, 11:15:12 AM

Title: MDI INPUT
Post by: GRAYHIL on July 31, 2013, 11:15:12 AM
Hi ALL
I have twenty programs all similar but want to run them in a random one off manner for punching music.
If I type "run" into the MDI input box it will run the current program currently loaded in the program screen.
Is it possible to make Mach load a program and run it from the MDI screen.
Graham
Title: Re: MDI INPUT
Post by: Hood on July 31, 2013, 02:10:16 PM
Best option would be to make a load of macros up which either contain your code (if short) or point to and load the code in Mach.
All you would then do is call your macro from MDI, it should load it then you can run it.
Or even make a custom screen page up with VB buttons that load and run your code depending on which button you choose.

Hood
Title: Re: MDI INPUT
Post by: BR549 on July 31, 2013, 08:08:10 PM
Hood has the idea. Use a macro than loads/runs the defined program then you can use the P parameter to define what program to run

Example

M100 P1         Calls the Macro that does the work orf load and run and uses the P to define what program you want to use. If using a music scale just define 1-9 as notes and call as needed. I do something similar with engraving text.

OR as Hood notes uses seperate buttons to do the scale

OR use a Wizard to define and write it all out in Gcode.

If you need help it sounds interesting to do a wizard(;-) I can help.

(;-) TP




Title: Re: MDI INPUT
Post by: GRAYHIL on August 01, 2013, 05:21:28 AM
Hood & TP
Thanks for your offers/ideas, I am still at the experimental stage and have yet to make a note paper roll punching machine.
When everything comes together and I need further help on the program I will post a new request.
Thanks again
Graham
Title: Re: MDI INPUT
Post by: BR549 on August 01, 2013, 04:53:44 PM
Just curious but how many notes are possible on 1 line on the paper or roll ?

I had an idea and just need to write it all down before I forget it.

(;-) TP
Title: Re: MDI INPUT
Post by: GRAYHIL on August 03, 2013, 05:00:10 PM
TP
On the organ I am making (a BUSKER ORGAN by John S Smith) there are 20 notes playable but not all at once.

http://www.melright.com/busker/jsart01.htm

This is a complete departure from my normal model making which have all been steel etc. I just thought I would try something different.

Graham
 
Title: Re: MDI INPUT
Post by: BR549 on August 03, 2013, 06:26:55 PM
So then I can assume that notes that are sustaned are actually a slot not just a hole ? Do you have a picture of a section of the paper roll as an example? I think I have a wizard design that will work well. I'll whip up a sample design for an example.

(;-) TP
Title: Re: MDI INPUT
Post by: GRAYHIL on August 05, 2013, 03:43:35 AM
TP
Heres a couple of pictures of manually punching the holes in 140 mm wide paper
Graham
Title: Re: MDI INPUT
Post by: GRAYHIL on August 05, 2013, 03:44:20 AM
and another
Title: Re: MDI INPUT
Post by: BR549 on August 05, 2013, 09:14:41 PM
Graham woul dyou haqppen to know the order of the notes from left to right ?

EFGABCD ETC ???

(;-) tp
Title: Re: MDI INPUT
Post by: BR549 on August 05, 2013, 10:39:22 PM
Just a sample of a Music Roll Master.  It will create the Gcode file and Preamble header(safety) then you can create a punch code for each line to be punched.

0-1  Zero no hole , 1 hole

The program creates each line to be punched as a group driven by the G81 cycle with the locations following. Each line has a number (N1,etc)

You can see the Gcode created for each line and see a tool path for the positions.

Each punch position is also denoted by the Note it represents  (A2   A of the second octave).

It is just a start, Let me know if it is something you may want to try.

(;-) TP




Title: Re: MDI INPUT
Post by: GRAYHIL on August 06, 2013, 04:19:00 AM
TP
Thanks very much
I would love a sample to try ;D
Graham
Title: Re: MDI INPUT
Post by: BR549 on August 06, 2013, 01:43:14 PM
HERE is the latest screen shot AND a beta copy of the Wizard(;-)

Title: Re: MDI INPUT
Post by: GRAYHIL on August 07, 2013, 08:59:25 AM
TP
Thanks.
Will play around and see what I can achieve.
Graham
Title: Re: MDI INPUT
Post by: BR549 on August 07, 2013, 01:13:23 PM
IF that does not work for you we can try something else .

(;-) TP
Title: Re: MDI INPUT
Post by: BR549 on August 07, 2013, 06:13:47 PM
I found the music SCALE for the rolls and updated the screen.  I also updated the Gcode output to match the scale.

There are other ways to do this as well if this does not work out for you.

(;-) TP
Title: Re: MDI INPUT
Post by: GRAYHIL on August 08, 2013, 04:53:48 AM
TP
Have downloaded latest version and am testing it.
How do you vary the distance between notes from the edge of the roll as it seems to be incremental at one inch?
On my music organ it goes 10mm,9mm,9mm,9,and then 6 for the rest of the 20 notes.
Returning to mach 3 button is problematical.
There will be more!!!!
Graham
Title: Re: MDI INPUT
Post by: BR549 on August 08, 2013, 12:50:21 PM
The step over distance for each note on the scale is set by code it can be changed to anything you want.

The return to mach is a standard CB call. What is it doing there?

(;-) TP
Title: Re: MDI INPUT
Post by: GRAYHIL on August 08, 2013, 03:15:40 PM
TP
It hangs up on generating toolpath before it returns to Mach 3.
Graham
Title: Re: MDI INPUT
Post by: BR549 on August 08, 2013, 03:46:29 PM
Are yoou by chance getting a watchdog error . Here it takes about 10sec to reload from the wizard. But it have never failed to reload. I have watchdog turned off in genconfig.

(;-) TP
Title: Re: MDI INPUT
Post by: GRAYHIL on August 08, 2013, 05:23:58 PM
TP
I realise now that the easiest way to return to mach 3 mill is to do it through the "VIEW" menu and not use the button on the rollmaster screen labled "return to mach 3"

Still trying to find out how to change the distances "code" to suit my paper width.
Quote  "The step over distance for each note on the scale is set by code it can be changed to anything you want"
Any hints?

Graham
Title: Re: MDI INPUT
Post by: BR549 on August 08, 2013, 06:04:05 PM
AH no it is not best to use the reload screen to return to mach3 you are leaving files open .

Can you describe exactly what happens so perhaps I can fix it. Do you get ANY error messages.

To modify the Code you have to edit it .  Go to Operator at the top of the screen, then selct edit button code , then select the Write Line button and it will open the Button code. You should be able to see in the code where the X moves. Change each location to where it needs to be.

OR if you already gave me all the offsets I will change it for you.

(;-) TP
Title: Re: MDI INPUT
Post by: GRAYHIL on August 09, 2013, 05:22:00 AM
TP
Goodmorning
When I have finished writing an experimental program using musicmaster and its still on the screen if I press the "return to mach 3"  it immediatley hangs up with
a box  saying "generating toolpath". There are no error messages. Being impatient after approx 30 secs I stop the whole program through the Task Manager.

I will endeavour to change the music notes scale myself now you have pointed me in the right direction.

Thanks Graham
Title: Re: MDI INPUT
Post by: BR549 on August 09, 2013, 11:05:06 AM
By chance are you in single block mode?

(;-) TP
Title: Re: MDI INPUT
Post by: GRAYHIL on August 09, 2013, 01:01:17 PM
TP
How do you get into/out of single block mode in musicmaster?
Have changed the distances as with your hint, but how do I change the note headings above the line of zeros. I have screen 4 to play with as well so I am learning a lot.
Graham
Title: Re: MDI INPUT
Post by: BR549 on August 09, 2013, 01:35:36 PM
To get into or out of single block mode you do it from the main screen Click on the button and it will toggle on and off.

You are a brave soul to run Screem4. I would use MAchScreen.

The scale notes are simply labels that you select then change the text of the label.

(;-) TP
Title: Re: MDI INPUT
Post by: GRAYHIL on August 10, 2013, 03:48:26 AM
TP
When you say click on the button, I presume you mean in Mach 3 mill, which I use a lot. I cannot find a button in musicmaster so I use the slider control next to the musicmaster program.
Will try MAchScreen in the next few days.
Realised last night at at a Phil Collins look a like concert that all my testing was being done on a 64bit WIN7 laptop not connected to my CNC machine in my"Den"
not on my XP computor in the garage. Would this make any difference to my testing?
Graham
 
Title: Re: MDI INPUT
Post by: GRAYHIL on September 10, 2013, 01:54:08 PM
TP
Use two progs to generate code.
Midiwin to convert midi file to printfile.
And midiBkcode to convert printfile to G code.(plus a bit if fiddling)
Here is a video of my first go at punching a music file on a strip of newspaper.


http://s285.photobucket.com/user/GRAYHIL/media/PUNCH.mp4.html?sort=3&o=0


Graham
Title: Re: MDI INPUT
Post by: BR549 on September 10, 2013, 03:40:02 PM
Hiya Graham, Excellent job on your music puncher.   How fast can it go??

Is there a way to convert directly from Midi to Gcode ??

(;-) TP
Title: Re: MDI INPUT
Post by: GRAYHIL on September 11, 2013, 04:26:12 AM
TP
On my machine, which as you can see is very old, a 3ft length of punched music takes about 90mins.
I do not know of any program that will convert a midi file direct to g code.
The "fiddling" I mentioned takes about 1 min and is mainly replacing X with A to use the rotary table as a winder.
Graham