Last active
December 12, 2015 12:49
-
-
Save trygvis/4774515 to your computer and use it in GitHub Desktop.
Eagle ULP for generating a Roland Modella MXP-15/20 program.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void drill(int x, int y) { | |
// printf("M % 5.0f,% 5.0f; \r\n", u2mil(x), u2mil(y)); | |
printf("PU % 5.0f,% 5.0f; \r\n", u2mil(x), u2mil(y)); | |
printf("PD % 5.0f,% 5.0f; \r\n", u2mil(x), u2mil(y)); | |
printf("PU % 5.0f,% 5.0f; \r\n", u2mil(x), u2mil(y)); | |
} | |
board(B) { | |
string fn = filesetext(B.name, ".drill.txt"); | |
output(fn) { | |
// printf("IN;\r\n"); | |
// printf("DF;\r\n"); | |
printf("PA;\r\n"); | |
// printf("!DW 100;\r\n"); // dwell, pause mellom hver bevegelse i x- eller y-planet | |
printf("VS5;\r\n"); | |
printf("!VZ10;\r\n"); | |
// printf("V1;\r\n"); | |
printf("!PZ-100,50;\r\n"); | |
// printf("!MC1;\r\n"); | |
printf("PU;\r\n"); | |
/* | |
*/ | |
B.holes(h) { | |
drill(h.x, h.y); | |
} | |
printf("\r\n"); | |
printf("\r\n"); | |
B.elements(E) { | |
printf("Element: %s, (%d %d), Package=%s\n", E.name, E.x, E.y, E.package.name); | |
E.package.holes(H) { | |
printf("package.hole: "); | |
drill(H.x, H.y); | |
} | |
E.package.contacts(H) { | |
printf("package.contacts: "); | |
drill(H.x, H.y); | |
} | |
} | |
printf("H\r\n"); | |
/* | |
for (int i = 0; i < 10; i++) { | |
printf("!MC0;"); | |
printf("\r\n"); | |
} | |
printf("\r\n"); | |
*/ | |
} | |
} | |
/* | |
B.signals(S) { | |
printf("signal\r\n"); | |
S.vias(v) { | |
printf("via\r\n"); | |
drill(v.x, v.y); | |
} | |
} | |
B.elements(E) { | |
printf("Element: %s, (%d %d), Package=%s\n", E.name, E.x, E.y, E.package.name); | |
} | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment