I have been looking at how to create a machine where the medium is inserted in to one side, a type of encoder (actually a micro switch) counts the distance on the feed roller and once in position the G code for the X/Z is run. I set up exactly what I needed in Mach3 and seems to work a treat however its not exactly a portable option and with most laptops not having a parallel port this makes things a little awkward.
In short i set up an M code that had a P var and this represented the switch triggers to wait for before executing the next line. in the test 1 click = 1mm.
So
G1 Z100 X0.1
M667 P30
G1 Z0 X0.1
the first line would run, then the M code would wait for 30 triggers on the switch then the next line would be run
Initially I looked at GRBL however kind of got really lost in the code as my programming skills are not overly advanced, Now i am looking at teacup as there seems to be a lot more people using it and its a little more active.
I would really appreciate some assistance with this one.