This animation shows the use of basic "MOD" or C mod "%" with the stepper plotter example

x = the position of xytable
x mod 8 = a value between 0 and 7
the result can be used to lookup a outputvalue for the stepper motor
Lookuptable for unipolar 4 phase stepper control
halfstep output sequence = 1,3,2,6,4,12,8,9

0 = 1
1 = 3
2 = 2
3 = 6
4 = 4
5 = 12
6 = 8
7 = 9

OUT(Parallel_Port_Adres),
For Parallel_Port_Adres = &H278 or &h378 or &H3BC

 My Homebuild basic plotter page

Easy to use industrial text engraving / product marking