Description
Reads the PMC data of the specified PMC address/range.
This function is used to exchange the data between the application on
MMC function and LADDER software on PMC.
Universal Fanuc Driver
Fanuc Focas Library CD
Declaration
Arguments
Specify the library handle. See "Library handle" for details.
Specify the identification code corresponding to the kind of the PMC address.
- The referenceable range of PMC data of Series 15
- The referenceable range of PMC data of Series 15i
- The referenceable range of PMC data of Series 16/18 Model B/C
- The referenceable range of PMC data of Series 21 Model B, Series 0i-A
- The referenceable range of PMC data of Series 16i/18i,0i-B(SB7)
- The referenceable range of PMC data of Series 21i, 0i-B(SA1)
- The referenceable range of Series 0i-D
- The referenceable range of Series 30i/31i/32i-A
- The referenceable range of Series 0i-F, 30i/31i/32i/35i-B, PMi-A
- The referenceable range of PMC data of Power Mate i
ID code | Kind of PMC address | Referenceable range | (Kind of PMC) |
---|---|---|---|
0 | G (Signal to PMC->CNC) | 0000-0511 | NA/NB/NB2 |
1 | F (Signal to CNC->PMC) | 0000-0319 | NA |
0000-0511 | NB/NB2 | ||
2 | Y (Signal to PMC->machine) | 0000-0127 | NA/NB/NB2 |
3 | X (Signal to machine->PMC) | 0000-0127 | NA/NB/NB2 |
4 | A (Message demand) | 0000-0024 | NA/NB |
0000-0124 | NB2 | ||
5 | R (Internal relay) | 0000-0999, 2000-2999 |
NA |
0000-1499, 9000-9117 |
NB | 0000-2999, 9000-9199 |
NB2 |
6 | T Changeable time | 0000-0079 | NA/NB |
0000-0299 | NB2 | ||
7 | K (Keep relay) | 0000-0018 | NA |
0000-0019 | NB | ||
0000-0039, |
NB2 | ||
8 | C (Counter) | 0000-0079 | NA/NB |
0000-0199 | NB2 | ||
9 | D (Data table) | 0000-2999 | NA/NB |
0000-7999 | NB2 |
It is not possible to write to all areas of address 'F' and 'X', and "R9000",... Moreover, "K0017"..."K0019" and "K0900"..."K0909" must not be written.
ID code | Kind of PMC address | Referenceable range | (Kind of PMC) |
---|---|---|---|
0 | G (Signal to PMC->CNC) | 0000-0511, 1000-1511 |
NB6 |
1 | F (Signal to CNC->PMC) | 0000-0511, 1000-1511 |
NB6 |
2 | Y (Signal to PMC->machine) | 0000-0127, 0200-0327 |
NB6 |
3 | X (Signal to machine->PMC) | 0000-0127, 0200-0327 |
NB6 |
4 | A (Message demand) | 0000-0124 | NB6 |
5 | R (Internal relay) | 0000-2999, 9000-9199 |
NB6 |
6 | T (Changeable timer) | 0000-0299 | NB6 |
7 | K (Keep relay) | 0000-0039, 0900-0909 |
NB6 |
8 | C (Counter) | 0000-0199 | NB6 |
9 | D (Data table) | 0000-7999 | NB6 |
It is not possible to write to all areas of address 'F' and 'X', and "R9000",... Moreover, "K0900"..."K0909" must not be written.
ID code | Kind of PMC address | Referenceable range | (Kind of PMC) |
---|---|---|---|
0 | G (Signal to PMC->CNC) | 0000-0255, 1000-1255 |
SA1/SB3/SB5/SC3 |
0000-0511, 1000-1511, 2000-2511 |
SB4/SB6/SC4 | ||
1 | F (Signal to CNC->PMC) | 0000-0255, 1000-1255 |
SA1/SB3/SB5/SC3 |
0000-0511, 1000-1511, 2000-2511 |
SSB4/SB6/SC4 | ||
2 | Y (Signal to PMC->machine) | 0000-0127, 1000-1014, 1020-1034 |
SA1/SB3/SB4/SB5/SB6/SC3/SC4 |
3 | X (Signal to machine->PMC) | 0000-0127, 1000-1019, 1020-1039 |
SA1/SB3/SB4/SB5/SB6/SC3/SC4 |
4 | A (Message demand) | 0000-0024 | SA1/SB3/SB5/SC3 |
0000-0124 | SB4/SB6/SC4 | ||
5 | R (Internal relay) | 0000-0999, 9000-9099 |
SA1 |
0000-1499, 9000-9117 |
SB3/SB5/SC3 | ||
0000-2999, 9000-9199 |
SB4/SB6/SC4 | ||
6 | T (Changeable timer) | 0000-0079 | SA1/SB3/SB5/SC3 |
0000-0299 | SB4/SB6/SC4 | ||
7 | K (Keep relay) | 0000-0019 | SA1/SB3/SB5/SC3 |
0000-0039, 0900-0909 |
SB4/SB6/SC4 | ||
8 | C (Counter) | 0000-0079 | SA1/SB3/SB5/SC3 |
0000-0199 | SB4/SB6/SC4 | ||
9 | D (Data table) | 0000-1859 | SA1 |
0000-2999 | SB3/SB5/SC3 | ||
0000-7999 | SB4/SB6/SC4 |
It is not possible to write to all areas of address 'F' and 'X', and "R9000",... Moreover, "K0017"..."K0019" and "K0900"... must not be written.
ID code | Kind of PMC address | Referenceable range | (Kind of PMC) |
---|---|---|---|
0 | G (Signal to PMC->CNC) | 0000-0255, 1000-1255 |
SA1/SA3 |
1 | F (Signal to CNC->PMC) | 0000-0255, 1000-1255 |
SA1/SA3 |
2 | Y (Signal to PMC->machine) | 0000-0127, 1000-1008 |
SA1/SA3 |
3 | X (Signal to machine->PMC) | 0000-0127, 1000-1011 |
SA1/SA3 |
4 | A (Message demand) | 0000-0024 | SA1/SA3 |
5 | R (Internal relay) | 0000-0999, 9000-9099 |
SA1 |
0000-0999, 9000-9117 |
SA3 | ||
6 | T (Changeable timer) | 0000-0079 | SA1/SA3 |
7 | K (Keep relay) | 0000-0019 | SA1/SA3 |
8 | C (Counter) | 0000-0079 | SA1/SA3 |
9 | D (Data table) | 0000-1859 | SA3 |
It is not possible to write to all areas of address 'F' and 'X', and "R9000",... Moreover, "K0017"..."K0019" must not be written.
ID code | Kind of PMC address | Referenceable range | (Kind of PMC) |
---|---|---|---|
0 | G (Signal to PMC->CNC) | 0000-0255, 1000-1255 |
SB5 |
0000-0511, 1000-1511, 2000-2511 |
SB6 | ||
0000-0767, 1000-1767, 2000-2767 |
SB7 | ||
1 | F (Signal to CNC->PMC) | 0000-0255, 1000-1255 |
SB5 |
0000-0511, 1000-1511, 2000-2511 |
SB6 | ||
0000-0767, 1000-1767, 2000-2767 |
SB7 | ||
2 | Y (Signal to PMC->machine) | 0000-0127 | SB5/SB6/SB7 |
0200-0327 | SB6/SB7 | ||
3 | X (Signal to machine->PMC) | 0000-0127 | SB5/SB6/SB7 |
0200-0327 | SB6/SB7 | ||
4 | A (Message demand) | 0000-0024 | SB5 |
0000-0124 | SB6 | ||
0000-0249, 9000-9249 |
SB7 | ||
5 | R (Internal relay) | 0000-1499, 9000-9117 |
SB5 |
0000-2999, 9000-9199 |
SB6 | ||
0000-7999, 9000-9499 |
SB7 | ||
6 | T (Changeable timer) | 0000-0079 | SB5 |
0000-0299 | SB6 | ||
0000-0499, 9000-9499 |
SB7 | ||
7 | K (Keep relay) | 0000-0019 | SB5 |
0000-0039, 0900-0909 |
SB6 | ||
0000-0099, 0900-0919 |
SB7 | ||
8 | C (Counter) | 0000-0079 | SB5 |
0000-0199 | SB6 | ||
0000-0399, 5000-5199 |
SB7 | ||
9 | D (Data table) | 0000-2999 | SB5 |
0000-7999 | SB6 | ||
0000-9999 | SB7 | ||
12 | E (Extended relay) | 0000-7999 | SB7 |
* | It is not possible to write to all areas of address 'F' and 'X', and "R9000",... Moreover, "K0017"..."K0019" and "K0900"... must not be written. |
ID code | Kind of PMC address | Referenceable range | (Kind of PMC) |
---|---|---|---|
0 | G (Signal to PMC->CNC) | 0000-0255, 1000-1255 |
SA1/SA5 |
1 | F (Signal to CNC->PMC) | 0000-0255, 1000-1255 |
SA1/SA5 |
2 | Y (Signal to PMC->machine) | 0000-0127 | SA1/SA5 |
3 | X (Signal to machine->PMC) | 0000-0127 | SA1/SA5 |
4 | A (Message demand) | 0000-0024 | SA1/SA5 |
5 | R (Internal relay) | 0000-0999, 9000-9099 |
SA1 |
0000-0999, 9000-9117 |
SA5 | ||
6 | T (Changeable timer) | 0000-0079 | SA1/SA5 |
7 | K (Keep relay) | 0000-0019 | SA1/SA5 |
8 | C (Counter) | 0000-0079 | SA1/SA5 |
9 | D (Data table) | 0000-1859 | SA1/SA5 |
It is not possible to write to all areas of address 'F' and 'X', and "R9000",... Moreover, "K0017"..."K0019" must not be written.
ID code | Kind of PMC address | 0i-D PMC | 0i-D/0i Mate-D PMC/L |
0i-D DCS PMC |
---|---|---|---|---|
0 | G (Output signal from PMC to CNC) | 0-767 1000-1767 2000-2767(Note1) 3000-3767(Note1) 4000-4767(Note1) 5000-5767(Note1) 6000-6767(Note1) 7000-7767(Note1) 8000-8767(Note1) 9000-9767(Note1) |
0-767 1000-1767(Note1) |
0-767 |
1 | F (Input signal to PMC from CNC) |
0-767 1000-1767 2000-2767(Note1) 3000-3767(Note1) 4000-4767(Note1) 5000-5767(Note1) 6000-6767(Note1) 7000-7767(Note1) 8000-8767(Note1) 9000-9767(Note1) |
0-767 1000-1767(Note1) |
0-767 |
2 | Y (Output signal from PMC to machine) |
0-127 200-327 400-527(Note2) 600-727(Note2) 1000-1127(Note2) |
0-127 | 0-127 |
3 | X (Input signal to PMC from machine) |
0-127 200-327 400-527(Note2) 600-727(Note2) 1000-1127(Note2) |
0-127 | 0-127 |
4 | A (Message display) *Display request |
0-249 | 0-249 | - |
A (Message display) *Display status |
9000-9249 | 9000-9249 | - | |
5 | R (Internal relay) | 0-7999 | 0-1499 | 0-1499 |
R (System relay) | 9000-9499 | 9000-9499 | 9000-9499 | |
6 | T (Timer) *Variable timer |
0-449 | 0-79 | 0-79 |
T (Timer) *Variable timer precision(Note3) |
9000-9499 | 9000-9079 | 9000-9079 | |
7 | K (Keep relay) *User area |
0-99 | 0-19 | 0-19 |
K (Keep relay) *Syatem area |
900-999 | 900-999 | 900-999 | |
8 | C (Counter) *Variable counter |
0-399 | 0-79 | 0-79 |
C (Counter) *Fixed counter |
5000-5199 | 5000-5039 | 5000-5039 | |
9 | D (Data table) | 0-9999 | 0-2999 | 0-2999 |
12 | E (Extra relay) | 0-9999 | 0-9999 | - |
Note | |
1 | This area is reserved for PMC management software. Do not use it in user programs. |
2 | This area is reserved for PMC management software. No I/O can be allocated in this area. Do not use it in user programs. |
3 | This area is used to specify the precision of a variable timer. |
4 | It is not possible to write to all areas of address 'F' and 'X', and "R9000",... Moreover, "K0017"..."K0019" must not be written. |
ID code | Kind of PMC address | 30i/31i/32i-A PMC | 32i-A PMC/L | |||
---|---|---|---|---|---|---|
1st, 2nd and 3rd PMC | DSC PMC | |||||
PMC Memory-A | PMC Memory-B | PMC Memory-C | ||||
0 | G (Output signal from PMC to CNC) | 0-767 1000-1767 2000-2767 3000-3767 4000-4767 5000-5767 6000-6767 7000-7767 8000-8767 9000-9767 |
0-767 1000-1767 2000-2767 3000-3767 4000-4767 5000-5767 6000-6767 7000-7767 8000-8767 9000-9767 |
0-767 1000-1767 2000-2767 3000-3767 4000-4767 5000-5767 6000-6767 7000-7767 8000-8767 9000-9767 |
0-767 | 0-767 1000-1767 |
1 | F (Input signal to PMC from CNC) | 0-767 1000-1767 2000-2767 3000-3767 4000-4767 5000-5767 6000-6767 7000-7767 8000-8767 9000-9767 |
0-767 1000-1767 2000-2767 3000-3767 4000-4767 5000-5767 6000-6767 7000-7767 8000-8767 9000-9767 |
0-767 1000-1767 2000-2767 3000-3767 4000-4767 5000-5767 6000-6767 7000-7767 8000-8767 9000-9767 |
0-767 | 0-767 1000-1767 |
2 | Y (Output signal to PMC from machine) | 0-127 200-327 400-527 600-727 1000-1127(Note1) |
0-127 200-327 400-527 600-727 1000-1127(Note1) |
0-127 200-327 400-527 600-727 1000-1127(Note1) |
0-127 | 0-127 |
3 | X (Input signal from PMC to machine) | 0-127 200-327 400-527 600-727 1000-1127(Note1) |
0-127 200-327 400-527 600-727 1000-1127(Note1) |
0-127 200-327 400-527 600-727 1000-1127(Note1) |
0-127 | 0-127 |
4 | A (Message display) *Display request |
0-249 | 0-249 | 0-499 | 0-249 | 0-249 |
A (Message display) *Display status |
9000-9249 | 9000-9249 | 9000-9499 | 9000-9249 | 9000-9249 | |
5 | R (Internal relay) | 0-1499 | 0-7999 | 0-15999 | 0-1499 | 0-1499 |
R (System relay) | 9000-9499 | 9000-9499 | - | 9000-9499 | 9000-9499 | |
6 | T (Timer) *Variable timer |
0-79 | 0-499 | 0-999 | 0-79 | 0-79 |
T (Timer) *Variable timer precision(Note2) |
9000-9079 | 9000-9499 | 9000-9999 | 9000-9079 | 9000-9079 | |
7 | K (Keep relay) *User range |
0-19 | 0-99 | 0-199 | 0-19 | 0-19 |
K (Keep relay) *System range |
900-999 | 900-999 | 900-999 | 900-999 | 900-999 | |
8 | C (Counter) *Variable counter |
0-79 | 0-399 | 0-799 | 0-79 | 0-79 |
C (Counter) *Fixed counter |
5000-5039 | 5000-5199 | 5000-5399 | 5000-5039 | 5000-5039 | |
9 | D (Data table) | 0-2999 | 0-9999 | 0-19999 | 0-2999 | 0-2999 |
10 | M (Input signal from other PMC path) | 0-767 | 0-767 | 0-767 | - | - |
11 | N (Output signal to other PMC path) | 0-767 | 0-767 | 0-767 | - | - |
12 | E (Extra relay) | 0-9999(Note3) | 0-9999(Note3) | 0-9999(Note3) | (Note4) | 0-9999 |
13 | Z (System relay) | - | - | 0-499 | - | - |
Note | |
1 | This area is reserved for PMC management software. Do not use it in user programs. |
2 | This area is used to specify the precision of a variable timer. |
3 | This area is common memory for the multi-PMC function. It is possible for each program to read the same value from, and write to, the area. |
4 | No extra relay is available for the dual-check safety PMC. |
5 | It is not possible to write to all areas of address 'F' and 'X', and "R9000",... Moreover, "K0017"..."K0019" must not be written. |
ID code | Kind of PMC address | 1st to 5th path PMC | DSC PMC | |||
---|---|---|---|---|---|---|
PMC Memory-A | PMC Memory-B | PMC Memory-C | PMC Memory-D | |||
0 | G (Output signal from PMC to CNC) | 0-767 1000-1767 2000-2767 3000-3767 4000-4767 5000-5767 6000-6767 7000-7767 8000-8767 9000-9767 |
0-767 1000-1767 2000-2767 3000-3767 4000-4767 5000-5767 6000-6767 7000-7767 8000-8767 9000-9767 |
0-767 1000-1767 2000-2767 3000-3767 4000-4767 5000-5767 6000-6767 7000-7767 8000-8767 9000-9767 |
0-767 1000-1767 2000-2767 3000-3767 4000-4767 5000-5767 6000-6767 7000-7767 8000-8767 9000-9767 |
0-767 |
1 | F (Input signal to PMC from CNC) | 0-767 1000-1767 2000-2767 3000-3767 4000-4767 5000-5767 6000-6767 7000-7767 8000-8767 9000-9767 |
0-767 1000-1767 2000-2767 3000-3767 4000-4767 5000-5767 6000-6767 7000-7767 8000-8767 9000-9767 |
0-767 1000-1767 2000-2767 3000-3767 4000-4767 5000-5767 6000-6767 7000-7767 8000-8767 9000-9767 |
0-767 1000-1767 2000-2767 3000-3767 4000-4767 5000-5767 6000-6767 7000-7767 8000-8767 9000-9767 |
0-767 |
2 | Y (Output signal from PMC to machine) | 0-127 200-327 400-527 600-727 1000-1127(Note1) |
0-127 200-327 400-527 600-727 1000-1127(Note1) |
0-127 200-327 400-527 600-727 1000-1127(Note1) |
0-127 200-327 400-527 600-727 1000-1127(Note1) |
0-127 |
3 | X (Input signal to PMC from machine) | 0-127 200-327 400-527 600-727 1000-1127(Note1) |
0-127 200-327 400-527 600-727 1000-1127(Note1) |
0-127 200-327 400-527 600-727 1000-1127(Note1) |
0-127 200-327 400-527 600-727 1000-1127(Note1) |
0-127 |
4 | A (Message display) *Display request |
0-249 | 0-249 | 0-499 | 0-749 | 0-249 |
A (Message displsy) Display status |
9000-9249 | 9000-9249 | 9000-9499 | 9000-9749 | 9000-9249 | |
5 | R (Internal relay) | 0-1499 | 0-7999 | 0-15999 | 0-59999 | 0-1499 |
R (System relay) | 9000-9499 | 9000-9499 | - | - | 9000-9499 | |
6 | T (Timer) *Variable timer |
0-79 | 0-499 | 0-999 | 0-999 | 0-79 |
T (Timer) *Variable timer precision(Note2) |
9000-9079 | 9000-9499 | 9000-9999 | 9000-9999 | 9000-9079 | |
7 | K (Keep relay) *User range |
0-19 | 0-99 | 0-199 | 0-299 | 0-19 |
K (Keep relay) *System range |
900-999 | 900-999 | 900-999 | 900-999 | 900-999 | |
8 | C (Counter) *Changeable counter |
0-79 | 0-399 | 0-799 | 0-1199 | 0-79 |
C (Counter) *Fixed counter |
5000-5039 | 5000-5199 | 5000-5399 | 5000-5599 | 5000-5039 | |
9 | D (Data table) | 0-2999 | 0-9999 | 0-19999(Note5) | 0-59999(Note5) | 0-2999 |
10 | M (Input signal from other PMC path) | 0-767 | 0-767 | 0-767 | 0-767 | - |
11 | N (Output signal to other PMC path) | 0-767 | 0-767 | 0-767 | 0-767 | - |
12 | E (Extra relay) | 0-9999(Note3) | 0-9999(Note3) | 0-9999(Note3) | 0-9999(Note3) | (Note4) |
13 | Z (System relay) | - | - | 0-499 | 0-499 | - |
Note | |
1 | This area is reserved for PMC management software. Do not use it in user programs. |
2 | This area is used to specify the precision of a variable timer. |
3 | This area is common memory for the multi-PMC function. It is possible for each program to read the same value from, and write to, the area. |
4 | No extra relay is available for the dual-check safety PMC. |
5 | To save all area of the data table, the "Nonvolatile PMC data table area expansion (40KB)" option may be necessary. |
6 | It is not possible to write to all areas of address 'F' and 'X', and "R9000",... Moreover, "K0017"..."K0019" must not be written. |
ID code | Kind of PMC address | Referenceable range | (Kind of PMC) |
---|---|---|---|
0 | G (Signal to PMC->CNC) | 0000-0255, 1000-1255 |
SB5 |
0000-0511, 1000-1511, 2000-2511 |
SB6 | ||
1 | F (Signal to CNC->PMC) | 0000-0255, 1000-1255 |
SB5 |
0000-0511, 1000-1511, 2000-2511 |
SB6 | ||
2 | Y (Signal to PMC->machine) | 0000-0127, 1000-1002, 1020-1051 |
SB5/SB6 |
3 | X (Signal to machine->PMC) | 0000-0127, 1000-1003, 1020-1051 |
SB5/SB6 |
4 | A (Message demand) | 0000-0024 | SB5 |
0000-0124 | SB6 | ||
5 | R (Internal relay) | 0000-1499, 9000-9117 |
SB5 |
0000-2999, 9000-9199 |
SB6 | ||
6 | T (Changeable timer) | 0000-0079 | SB5 |
0000-0299 | SB6 | ||
7 | K (Keep relay) | 0000-0019 | SB5 |
0000-0039, 0900-0909 |
SB6 | ||
8 | C (Counter) | 0000-0079 | SB5 |
0000-0199 | SB6 | ||
9 | D (Data table) | 0000-2999 | SB5 |
0000-7999 | SB6 |
* | It is not possible to write to all areas of address 'F' and 'X', and "R9000",... Moreover, "K0017",..,"K0019" and "K0900"..."K0909" must not be written. |
* | See the "PROGRAMMING MANUAL" of PMC about the CNC at which the PMC can be supported. |
It must be the same one as the type of data of the PMC side.
0 | : | Byte type |
1 | : | Word type |
2 | : | Long type |
4 | : | 32-bit floating-point type(30i-B Series/0i-F/PMi-A only) |
5 | : | 64-bit floating-point type(30i-B Series/0i-F/PMi-A only) |
data_type is 0(byte type) | : | length = 8 + N |
data_type is 1(word type) | : | length = 8 + N × 2 |
data_type is 2(long type) | : | length = 8 + N × 4 |
data_type is 4(32-bit floating-point type) | : | length = 8 + N × 4 |
data_type is 5(64-bit floating-point type) | : | length = 8 + N × 8 |
Pointer to the IODBPMC structure.
The IODBPMC structure is as follows.
In case of using PMC memory D in Series 0i-F, 30i/31i/32i/35i-B, PMi-A, define character constant "PMCMEMD" at compiling by the '-D' option.
#if defined (PMCMEMD)
typedef struct iodbpmc {
short type_a ; /* Kind of PMC address */
short type_d ; /* Type of the PMC data */
unsigned short datano_s ; /* Start PMC address number */
unsigned short datano_e ; /* End PMC address number */
union {
char cdata[N] ;/* The PMC data(byte type) */
short idata[N] ;/* (word type) */
long ldata[N] ;/* (long type) */
float fdata[N] ; /* (32-bit floating-point type)*/
double dfdata[N]; /* (64-bit floating-point type)*/
} u ; /* N is the number of read data */
} IODBPMC ;
#else
typedef struct iodbpmc {
short type_a ; /* Kind of PMC address */
short type_d ; /* Type of the PMC data */
short datano_s ; /* Start PMC address number */
short datano_e ; /* End PMC address number */
union {
char cdata[N] ;/* The PMC data(byte type) */
short idata[N] ;/* (word type) */
long ldata[N] ;/* (long type) */
float fdata[N] ; /* (32-bit floating-point type)*/
double dfdata[N]; /* (64-bit floating-point type)*/
} u ; /* N is the number of read data */
} IODBPMC ;
#endif
Example of specifying argument
- D0100(It is assumed the word type) is read.
- R0200,..,R0209(It is assumed the byte type) is read.
- D0100(It is assumed the 32-bit floating-point type) is read.
- R0104, R0112(It is assumed the 64-bit floating-point type) is read.
adr_type | 9 |
data_type | 1 |
s_number | 100 |
e_number | 101 |
length | 8+2×1 (=10) |
buf.u.idata[0] | The content of D0100 is stored. |
adr_type | 5 |
data_type | 0 |
s_number | 200 |
e_number | 209 |
length | 8+1×10 (=18) |
buf.u.cdata[0] ,..,buf.u.cdata[9] |
The contents of R0200,..,R0209 are stored. |
adr_type | 9 |
data_type | 4 |
s_number | 100 |
e_number | 103 |
length | 8+4×1 (=12) |
buf.u.cdata[0] | The contents of D0100 is stored. |
adr_type | 5 |
data_type | 5 |
s_number | 104 |
e_number | 119 |
length | 8+8×2 (=24) |
buf.u.cdata[0] ,..,buf.u.cdata[1] |
The contents of R0104, R0112 are stored. |
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 |
---|---|
(1) |
|
(2) |
Size of IODBPMC structure(length) is wrong. |
(3) |
PMC address number(s_number,e_number) is wrong. |
(4) |
Kind of PMC address(adr_type) or type of PMC data (data_type) is wrong. |
(17) |
(Series 16i/18i/21i, 0i-A/B/C) |
As for the other return codes or the details, see "Return status of Data window function"
CNC option
For HSSB connection,
For Ethernet connection,
The Ethernet function and the extended driver/library function are necessary. However, in case of Series 16i/18i/21i-B, 0i-B/C/D/F, Series 30i and PMi-A, the required CNC option is as follows. When Embedded Ethernet is used,above two optional functions are not required.
When Ethernet board is used,
- only Ethernet function is required.
CNC parameter
This function is not related to CNC parameter.
CNC mode
This function can be used in any CNC 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) | |||||||||||||||||
T (Turning) | - | ||||||||||||||||
LC (Loader) | - | - | - | - | - | - | - | - |
0i-D | 0i-F | 16i | 18i | 30i-A | 30i-B | |
---|---|---|---|---|---|---|
P (Punch press) | - | |||||
L (Laser) | - | - | - | - | ||
W (Wire) | - | - |
Power Mate i-D | |
Power Mate i-H | |
Power Motion i-A | O |
"O" | : | Both Ethernet and HSSB | |
"E" | : | Ethernet | |
"H" | : | HSSB | |
"X" | : | Cannot be used | |
"-" | : | None |
Note) 0i-C does not support the HSSB function.
See Also
Example(C Language)
The following program reads the PMC data within the specified
PMC address range and displays them.
#include "fwlib32.h"
/* start/end are start/end PMC address to be read. */
short example( unsigned short start, unsigned short end )
{
IODBPMC *pmcrng;
short ret, idx;
short adr_type, data_type;
unsigned short length;
adr_type = 0; // In case that kind of PMC address is G
data_type = 0; // In case that type of PMC data is Byte
length = 8 + (end - start + 1);
pmcrng = (IODBPMC *)malloc( length );
ret = pmc_rdpmcrng( h, adr_type, data_type, start, end, length, pmcrng );
if ( !ret )
{
for ( idx = 0 ; idx <= end-start ; idx++ )
{
printf( "#%04d 0x%02X\n", start+idx, (unsigned char)pmcrng->u.cdata[idx] );
}
}
else
{
printf( "ERROR!(%d)\n", ret );
}
free( pmcrng );
return ( ret );
}
Example(C#)
The following program reads the PMC data within the specified
PMC address range and displays them.
class example
{
/* start/end are start/end PMC address to be read. */
public short sample(ushort start, ushort end)
{
short ret, idx;
short adr_type, data_type;
ushort length;
adr_type = 0; // In case that kind of PMC address is G
data_type = 0; // In case that type of PMC data is Byte
length = (ushort)(8 + (end - start + 1));
byte[] bytes = new byte[length];
ret = Focas1.pmc_rdpmcrng(h, adr_type, data_type, start, end, length, bytes);
if (ret == Focas1.EW_OK)
{
for (idx = 0; idx <= end - start; idx++)
{
Console.WriteLine("#{0:d4} 0x{1:X2}", idx, bytes[8 + idx]);
}
}
else
{
Console.WriteLine("ERROR!({0})", ret);
}
return (ret);
}
}