omron — Programming Example: Pendant Menu

Programming Example: Pendant Menu .PROGRAM operatorcontrol() ; ABSTRACT: This program creates and monitors a menu structure on the T20. ; ; INPUT PARAMS: None ; ; OUTPUT PARAMS: None ; ; GLOBAL VARS:

None AUTO $p.title, $p.msg[15], $p.f[15], key, app.sel AUTO pendant.lun pendant.lun = 1 ; Attach to the Pendant ATTACH (pendant.lun) ; Verify ATTACH was successful IF IOSTAT(pendant.lun) 1 THEN TYPE "Pendant is either busy or not connected" GOTO 100 ;ERROR END ; Menu elements $prog.list[0] = "Cookie1" $prog.list[1] = "Cookie2" $prog.list[2] = "Cookie3" $prog.list[3] = "Cookie4" $prog.list[4] = "Cookie5" prog.len = 5 ; Initialize variables key = -1 app.sel = 0 $p.title = "" FOR i = 0 TO 10 $p.msg[i] = "" END FOR i = 0 TO 4 $p.f[i] = "" END ; Screen 1 - Operator Control $p.title = "Operator Control" $p.msg[0] = "Select Option from buttons below" $p.f[1] = "Apps" $p.f[2] = "Status" $p.f[3] = "" $p.f[4] = "" eV+Language User's Guide, v2.x, 18318-000 Rev A Page 184