Is it possible to have external buttons from an hmi act like the percent up down keys. If so where is this located inside the robot. I know i can send the robot a percent value but i would like to do it with just a button and digital signal.
% Up Down Buttons
-
outlaw10801 -
September 26, 2014 at 9:53 PM -
Thread is marked as Resolved.
-
-
It's a variable.
$MCR.$GENOVERRIDE.
I've used an HMI and digital inputs to control the speed. -
Ok maybe i am just not looking at this right. How do you designate plus and minus on this variable. Do you have background logic running saying if this is true minus 5 or visa versa?
-
I didn't set up the HMI's. The robot calls a program called plc_speed and in the program a value is send from the HMI to the robot via a group input, The group input is then placed in a register and then that value is used to set the variable $MCR.$GENOVERRIDE. On the HMI you could input the speed you wanted. Some had plus or minus arrows and the HMI resolved the speed value.
Here is the code;
1: UALM[19] ;
2: !-------------------------------- ;
3: !Communication program to get ;
4: !Speed Data from PLC. ;
5: !-------------------------------- ;
6: !Ready to receive Speed. Unit 100 ;
7: !Min. = 0, Max. = 1. ;
8: GO[1:Comm. Group]=13 ;
9: DO[16:Data request]=ON ;
10: !Wait for PLC ready to send data. ;
11: WAIT DI[15:Data Ready]=ON ;
12: !Set New Speed to R[107] ;
13: R[107:PLC SPEED]=GI[1:Comm. Group]*100 ;
14: !Signal PLC that data received. ;
15: DO[16:Data request]=OFF ;
16: !Wait for PLC acknowledgement. ;
17: WAIT DI[15:Data Ready]=OFF ;
18: !-------------------------------- ;
19: !Ready to receive Speed. Unit 10 ;
20: !Min. = 0, Max. = 9. ;
21: GO[1:Comm. Group]=14 ;
22: DO[16:Data request]=ON ;
23: !Wait for PLC ready to send data. ;
24: WAIT DI[15:Data Ready]=ON ;
25: !Set New Speed to R[107] ;
26: R[107:PLC SPEED]=(R[107:PLC SPEED]+GI[1:Comm. Group]*10) ;
27: !Signal PLC that data received. ;
28: DO[16:Data request]=OFF ;
29: !Wait for PLC acknowledgement. ;
30: WAIT DI[15:Data Ready]=OFF ;
31: !-------------------------------- ;
32: !Ready to receive Speed.Unit 1 ;
33: !Min. = 1, Max. = 9. ;
34: GO[1:Comm. Group]=15 ;
35: DO[16:Data request]=ON ;
36: !Wait for PLC ready to send data. ;
37: WAIT DI[15:Data Ready]=ON ;
38: !Set New Speed to R[107] ;
39: R[107:PLC SPEED]=(R[107:PLC SPEED]+GI[1:Comm. Group]) ;
40: !Signal PLC that data received. ;
41: DO[16:Data request]=OFF ;
42: !Wait for PLC acknowledgement. ;
43: WAIT DI[15:Data Ready]=OFF ;
44: $MCR.$GENOVERRIDE=R[107:PLC SPEED] ;
45: MONITOR WCELLMON ;
/POS
/END -
Yea this is pretty much how i have it set up where i send a value. I was kind of looking for a way to have hmi buttons act as the up down buttons on the pendant so that they can adjust the speed at any time and it dont have to wait for a certian part of the program to set the speed. Thanks you for your help.
-
Run it as BG logic. It would be instantaneous.
-
You can directly modify the system variable if you have the HMI (SNPX_ASG communication) option.
I've done this many times using a RedLion HMI.