Hi All,
I'm working on a registration mark sensing macro that will allow for print cut registration (setting the origin), coordinate system rotation to account for imprecise placement of the graphic and stretch adjustment (scaling). I have already discussed this topic a bit in some posts in this thread
http://www.machsupport.com/forum/index.php/topic,26268.msg188768.html#new.
I have already completed an arduino based mark sensor setup that will output +5V upon detecting the edge of a mark. This can be easily wired to an input for mach3.
I'm not a VB guy, but I do have some programming and scripting experience in C++, Java and Actionscript. I'm looking for some help. I'm going to outline what the program needs to do below and perhaps you gurus of Mach3 can help!
Graphics will be printed with registration marks (L shaped blocks) of a known size printed at the corners outside the bounding box.
A cut file will be created in advance which will be offset from the origin according to the size of the registration marks.
The operator will place the graphic on the machine and position the photocell in the interior angle of the registration mark.
The operator will start the macro.
The macro will move the machine X+ slowly until the edge is sensed.
Once the edge is sensed, the machine backs up on the axis 50% the length of the (known) reg mark size and advances more slowly, recording the X position when the photocell senses the edge again. The slow down is to ensure precise detection.
The machine again backs up 50% of the reg mark size and moves in the Y+ direction.
When the sensor detects the edge, once again the machine backs up and moves more slowly in Y+ recording the Y value of the registration mark.
Now the X and Y coordinates of our origin corner are recorded.
The machine will center itself between the x and y leg of the aforementioned mark and proceed to travel rapidly in X+.
Upon detecting the edge the machine will stop, and backup (a greater distance due to speed, this will have to be experimented with) and advance forward slowly.
Upon detecting the mark while moving slowly, it will record the X coordinate.
The machine will move forward slowly past the registration mark edge by 50% the registration mark size on the X axis and then proceed to move Y+
Upon detecting the edge, the machine will back up and then proceed slowly on Y+ again until the edge is detected. Upon detection the Y coordinate is recorded.
Now with 2 points recorded, the rotation can be calculated with an arc tangent (used later)
The machine will return to the first corner defined (the corner nearest the origin) and run a similar routine to detect a 3rd mark at either remaining corner.
These 3 points should be sufficient to calculate rotation and linear stretch on both axis. Can someone help me get started with the VB? I'll be sharing the simple arduino reg mark detector design once it is mounted to the machine and working reliably. If we all work a little on this I think we can quickly add some incredibly valuable functionality to Mach3 that many of us could really benefit from!
Thanks!