What I'm trying to do:
Read several PRs from the robot to my CompactLogix PLC on demand so that I can display them on an HMI (budget is $0, so can't use SNPX HMI unfortunately). The robot is running HandlingTool 7.70, so it doesn't support PRs via explicit messaging.
My thought was to break each PR into 3 registers (only care about position, not rotation) and read those via explicit messaging into a REAL array in the PLC that the HMI can access. I'm using a DI over Ethernet/IP to trigger a macro that copies the PR positions into the registers.
/PROG RD_PR_POS Macro
/ATTR
OWNER = MNEDITOR;
COMMENT = "PRs to PLC";
PROG_SIZE = 657;
CREATE = DATE 23-09-21 TIME 15:52:52;
MODIFIED = DATE 23-09-21 TIME 15:52:52;
FILE_NAME = ;
VERSION = 0;
LINE_COUNT = 25;
MEMORY_SIZE = 929;
PROTECT = READ_WRITE;
TCD: STACK_SIZE = 0,
TASK_PRIORITY = 50,
TIME_SLICE = 0,
BUSY_LAMP_OFF = 0,
ABORT_REQUEST = 0,
PAUSE_REQUEST = 0;
DEFAULT_GROUP = *,*,*,*,*;
CONTROL_CODE = 00000000 00000000;
/APPL
AUTO_SINGULARITY_HEADER;
ENABLE_SINGULARITY_AVOIDANCE : TRUE;
/MN
1: R[59:rd_B1 Approach X]=PR[11,1:Bowl 1 Approach] ;
2: R[60:rd_B1 Approach Y]=PR[11,2:Bowl 1 Approach] ;
3: R[61:rd_B1 Approach Z]=PR[11,3:Bowl 1 Approach] ;
4: R[62:rd_B1 Pick X]=PR[12,1:Bowl 1 Pick] ;
5: R[63:rd_B1 Pick Y]=PR[12,2:Bowl 1 Pick] ;
6: R[64:rd_B1 Pick Z]=PR[12,3:Bowl 1 Pick] ;
7: R[65:rd_B2 Approach X]=PR[13,1:Bowl 2 Approach] ;
8: R[66:rd_B2 Approach Y]=PR[13,2:Bowl 2 Approach] ;
9: R[67:rd_B2 Approach Z]=PR[13,3:Bowl 2 Approach] ;
10: R[68:rd_B2 Pick X]=PR[14,1:Bowl 2 Pick] ;
11: R[69:rd_B2 Pick Y]=PR[14,2:Bowl 2 Pick] ;
12: R[70:rd_B2 Pick Z]=PR[14,3:Bowl 2 Pick] ;
13: R[71:rd_B3 Approach X]=PR[15,1:Bowl 3 Approach] ;
14: R[72:rd_B3 Approach Y]=PR[15,2:Bowl 3 Approach] ;
15: R[73:rd_B3 Approach Z]=PR[15,3:Bowl 3 Approach] ;
16: R[74:rd_B3 Pick X]=PR[16,1:Bowl 3 Pick] ;
17: R[75:rd_B3 Pick Y]=PR[16,2:Bowl 3 Pick] ;
18: R[76:rd_B3 Pick Z]=PR[16,3:Bowl 3 Pick] ;
19: R[77:rd_B4 Approach X]=PR[17,1:Bowl 4 Approach] ;
20: R[78:rd_B4 Approach Y]=PR[17,2:Bowl 4 Approach] ;
21: R[79:rd_B4 Approach Z]=PR[17,3:Bowl 4 Approach] ;
22: R[80:rd_B4 Pick X]=PR[18,1:Bowl 4 Pick] ;
23: R[81:rd_B4 Pick Y]=PR[18,2:Bowl 4 Pick] ;
24: R[82:rd_B4 Pick Z]=PR[18,3:Bowl 4 Pick] ;
25: DO[22:PR write done]=PULSE,1.0sec ;
/POS
/END
Display More
My problem is that if I give this macro a motion group *, I get an INTP-214 "Specified group not locked" error. If I give it a motion group of 1, I get INTP-105 "Run request failed" and PROG-040 "Already locked by other task" messages. I understand why this is happening, but am scratching my head trying to figure out how to get around it. It seems like there should be a much better solution than what I'm trying.
Any suggestions?