How can I use the programmable buttons to interact with UIListView fields
zanic07
✭
in RobotStudio
I have an application where I have a UIListView that acts as a job selection menu. I would like to use the programmable buttons to interact with this menu instead of using the touch screen. Ideally i would highlight the job to run and press the #1 button to run the program instead of the OK button on the touch screen. Alternatively if I press the #2 button I should return to the previous menu.
The way my lists are set up currently when I run a job the default selection increments by 1 meaning I should be able to simply press the #1 button repeatedly until the task is complete or press #2 to abort the process and start again.
The way my lists are set up currently when I run a job the default selection increments by 1 meaning I should be able to simply press the #1 button repeatedly until the task is complete or press #2 to abort the process and start again.
0
Answers
-
Hello,You can make a cross connection with your two DO set by buttons doBreak=(doBtn1 OR doBtn2).Then use it as \DOBreak in UIListView with \BreakFlag. After, check your errnum and test with your doBtnX values to do what you want.
☑️2024 - RobotStudio® User Group0 -
so something like this.
nMenuOption:=UIListView(\Result:=btnresMainMenu\Header:="Please select an option and press OK",ListOptions\Buttons:=btnOKCancel\Icon:=iconInfo\DOBreak:=(so_STN1_OP010_Active OR so_STN1_OP020_Active)\BreakFlag:=ERR_TP_DOBREAK);
When I try it in simulation it just refreshed the list and does not run the test to compare the nMenuOption result with the case selected. Do I need to add an if statement before the test or am I missing something.
It also appears to no longer run when the OK button is pressed.0 -
How did you set up your programmable keys? I.E., Toggle, pulse, etc.?Lee Justice0
-
They are currently set up to toggle. That way the condition can be passed through to the cases. I figured a SObutton1(or whatever the official button output will be called)=0 command to turn off the input would be simple enough to implement.0
-
Have you written an error handler into that routine?Lee Justice0
-
No I do not have an error handler in this routine and have not written anything other than basic error handlers.0
-
Hello,Did you test with cross connection?Not writing \DOBreak:=(so_STN1_OP010_Active OR so_STN1_OP020_Active)
☑️2024 - RobotStudio® User Group0 -
I though cross connections were used to join IO to IO. How would I go about creating a cross connection between the touchscreen buttons of UI list view and the programmable buttons on the controller0
-
Try writing the error handler. In it, TEST for that error number and do what you need to do in that CASE. Then, determine which is appropriate to continue your program. I.e., RETRY, TRYNEXT and so on.Lee Justice0
-
I will give that a shot.
0
Categories
- All Categories
- 5.5K RobotStudio
- 396 UpFeed
- 18 Tutorials
- 13 RobotApps
- 297 PowerPacs
- 405 RobotStudio S4
- 1.8K Developer Tools
- 250 ScreenMaker
- 2.8K Robot Controller
- 316 IRC5
- 61 OmniCore
- 7 RCS (Realistic Controller Simulation)
- 800 RAPID Programming
- AppStudio
- 3 RobotStudio AR Viewer
- 18 Wizard Easy Programming
- 105 Collaborative Robots
- 5 Job listings