Hi
I am breaking my head here, i'm trying yo make main-menu with sub-menu's and entering with a 4x4 keypad, i have done this before (about 15years ago)
But i cant remember a thing from it.. And the laptop i used then, is way gone, so are the relevant files i had.
The project is to drive 1 steppermotor for a certain length, send a ready signal for a press, then wait for new startsignal etc.
I need the possibility to chance the length,speed and accel settings, plus put in a number a counter.
Here is my "script" for the menu (written for my selfe, to ease the coding, but...)
I use an 4x4 keypad an a 1602 i2c lcd, that is configured and it works, but not integraded to my steppermotor code yet.
I imagine that *=Return and #=Enter, ABCD not active (Unless A & B should be used for JOG?)
Main menu; "Length: xxx,x mm" // X= selected length
"Count (yyyy) zzzz" // Y=selected count, Z= actual count
By pressing "#" jump to sub menu 1
Sub menu 1: "JOG Press 4=Fwd" // JOG only possible in this menu.
"Press 6=Reverse" // jogfwd,jogrev
By pressing "#"we jump to sub menu 2, Or "*"=Main menu without saving
Sub menu 2: "Curr. Length xxx,x mm" // Enter a length between 0-999,9 mm
"Set Length = ???,? mm"
By pressing "#"we save the new input and jump to sub menu 3, Or "*"=Main menu without saving
Sub menu 3: "Counter: yyyy" // Enter a number between 0-999
"Set counter ????"
By pressing "#"we save the new input and jump to sub menu 4, Or "*"=Main menu without saving
Sub menu 4: "Speed ???" // Enter a number between 0-999
"Acceleration ???" // Enter a number between 0-999
By pressing "#"we save the new input and jump to Main menu 4, Or "*"=Main menu without saving
The system will only "RUN" when Main menu is active (ready=high when?)
I have a code that drives a single steppermotor, that works, but i dont have any hmi, so i have to connect my PC
everytime i need to change length, etc.
I have been reading about a thousand pages about menus, but i dont seem to find anything that matches my project?
i really hope someone can point me in the right direction.
Thank you
// Palle