Description
When the CNC is MDI and MEM mode(In case of CNC is running), the program number and block number of the executed program is acquired.
When the CNC is EDIT, TJOG and THND mode(In case of CNC is editing), the program number and block number of the preread data is acquired.
The limitation of this function is as follows.
1) CNC is in DNC/M198 operation.
2) CNC is in RISC operation.
3) The program number which is acquired by cnc_rdprgnum and this function is not same number.
4) In case of FS30i-A, when STL signal is ON, the return code is EW_REJECT.
5) In case of FS0i-D/F, FS30i-B and PMi-A, even if STL signal is ON, the return code is EW_OK. (when Parameter No.13104#1=1, the return code is EW_REJECT)
6) In case of FS0i-D/F, FS30i-B and PMi-A, even if M198 is executed, the return code is EW_OK.
7) In case of FS30i, FS0i-D/F and PMi-A, the contents of "pact" and "pnext" is same. (the preread block cannot be acquired.)
8) The pointer information acquired with FS16i/18i/21i and FS30i, FS0i-D/F, PMi-A might be different depending on the running mode(or status).
The limitation of this function is as follows.
1) CNC is in DNC/M198 operation.
2) CNC is in RISC operation.
3) The program number which is acquired by cnc_rdprgnum and this function is not same number.
4) In case of FS30i-A, when STL signal is ON, the return code is EW_REJECT.
5) In case of FS30i-B, even if STL signal is ON, the return code is EW_OK. (when Parameter No.13104#1=1, the return code is EW_REJECT)
6) In case of FS30i-B, even if M198 is executed, the return code is EW_OK.
7) The contents of "pact" and "pnext" is same. (the preread block cannot be acquired.)
8) The pointer information acquired might be different depending on the running mode(or status).
MTConnect Fanuc AdapterUniversal Fanuc DriverFanuc Focas Library CDDeclaration
#include "fwlib32.h" or "fwlib64.h"
FWLIBAPI short WINAPI cnc_rdexecpt(unsigned short FlibHndl, PRGPNT *pact, PRGPNT *pnext);Arguments : HSSB
FlibHndl
[ in ]
pact
[ out ]
Specify the pointer to the PRGPNT structure to store the execution pointer.
The PRGPNT structure is as follows.
typedef struct _prgpnt {
long prog_no;
long blk_no;
} PRGPNT;
prog_no
Program number
When the MDI program is executed, -1 is set.
blk_no
Block number
The block number by which the head of program is 0 is set.
pnext
[ out ]
Specify the pointer to PRGPNT structure to store the preread block pointer. The PRGPNT structure is as shown in the above.
Return
EW_OK is returned on successful completion, otherwise any value except EW_OK is returned.
The major error codes are as follows.
Return code |
Meaning/Error handling |
EW_NOOPT (6) |
No option The extended driver/library function is necessary. |
EW_MODE (12) |
CNC mode error CNC mode is except MDI, MEM, EDIT, TJOG and THND one. |
EW_REJECT (13) |
CNC execution denied
No program is executed.
STL signal is ON.(30i, 0i-D/F, PMi-A)
Emergency(30i, 0i-D/F, PMi-A)
CNC is in DNC/M198 operation.
CNC is in RISC operation.
|
As for the other return codes or the details, see
"Return status of Data window function"
CNC option
For HSSB connection,
CNC parameter
This function is related to the following CNC parameter.
See the manual of CNC parameter for details.
- Series 0i-D/F?30i-B, PMi-A
13104#1
CNC mode
It is possible to use in MDI, MEM, EDIT, TJOG, THND mode.
Available CNC
|
0i-A |
0i-B/C(Note) |
0i-D |
0i-F |
15 |
15i |
16 |
18 |
21 |
16i-A |
18i-A |
21i-A |
16i-B |
18i-B |
21i-B |
30i-A |
30i-B |
M (Machining) | X |
H |
H |
H |
X |
X |
X |
X |
X |
H |
H |
H |
H |
H |
H |
H |
H |
T (Turning) | X |
H |
H |
H |
X |
-
|
X |
X |
X |
H |
H |
H |
H |
H |
H |
H |
H |
LC (Loader) |
-
|
-
|
-
|
-
|
-
|
-
|
X |
X |
X |
X |
X |
X |
X |
X |
X |
-
|
-
|
| 0i-D | 0i-F | 16i | 18i | 30i-A | 30i-B |
P (Punch press) | H |
H |
H |
H |
-
|
H |
L (Laser) |
-
|
-
|
H |
-
|
-
|
H |
W (Wire) |
-
|
-
|
X |
X |
X |
X |
Power Mate i-D | X |
Power Mate i-H | X |
Power Motion i-A | H |
|
"O" |
: |
Both Ethernet and HSSB |
|
"E" |
: |
Ethernet |
|
"H" |
: |
HSSB |
|
"X" |
: |
Cannot be used |
|
"-" |
: |
None |
Note) 0i-C does not support the HSSB function.