Вы находитесь на странице: 1из 20

Sign in Questions?

PMC_RDPMCRNG
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.

MTConnect Fanuc Adapter

Universal Fanuc Driver

Fanuc Focas Library CD

Declaration

#include "fwlib32.h" or "fwlib64.h"

FWLIBAPI short WINAPI pmc_rdpmcrng(unsigned short FlibHndl, short


adr_type, short data_type, unsigned short s_number, unsigned short
e_number, unsigned short length, IODBPMC *buf);

Arguments

FlibHndl [ in ]
Specify the library handle. See "Library handle" for details.

adr_type [ in ]
Specify the identification code corresponding to the kind of the PMC address.

The referenceable range of PMC data of Series 15


ID codeKind of PMC address Referenceable range (Kind of PMC)
0 G (Signal to PMC->CNC) 0000-0511 NA/NB/NB2
0000-0319 NA
1 F (Signal to CNC->PMC)
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
0000-0024 NA/NB
4 A (Message demand)
0000-0124 NB2
5 R (Internal relay) NA
ID codeKind of PMC address Referenceable range (Kind of PMC)
0000-0999,
2000-2999
0000-1499,
NB
9000-9117
0000-2999,
NB2
9000-9199
0000-0079 NA/NB
6 T Changeable time
0000-0299 NB2
0000-0018 NA
7 K (Keep relay) 0000-0019 NB
0000-0039, 0900-0909NB2
0000-0079 NA/NB
8 C (Counter)
0000-0199 NB2
0000-2999 NA/NB
9 D (Data table)
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.

The referenceable range of PMC data of Series 15i


ID codeKind of PMC address Referenceable range(Kind of PMC)
0000-0511,
0 G (Signal to PMC->CNC) NB6
1000-1511
0000-0511,
1 F (Signal to CNC->PMC) NB6
1000-1511
0000-0127,
2 Y (Signal to PMC->machine) NB6
0200-0327
0000-0127,
3 X (Signal to machine->PMC) NB6
0200-0327
4 A (Message demand) 0000-0124 NB6
0000-2999,
5 R (Internal relay) NB6
9000-9199
6 T (Changeable timer) 0000-0299 NB6
0000-0039,
7 K (Keep relay) NB6
0900-0909
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.

The referenceable range of PMC data of Series 16/18 Model B/C


ID Referenceable
Kind of PMC address (Kind of PMC)
code range
0000-0255,
SA1/SB3/SB5/SC3
1000-1255
0 G (Signal to PMC->CNC) 0000-0511,
1000-1511, SB4/SB6/SC4
2000-2511
0000-0255,
SA1/SB3/SB5/SC3
1000-1255
1 F (Signal to CNC->PMC) 0000-0511,
1000-1511, SSB4/SB6/SC4
2000-2511
0000-0127,
Y (Signal to
2 1000-1014, SA1/SB3/SB4/SB5/SB6/SC3/SC4
PMC->machine)
1020-1034
0000-0127,
X (Signal to
3 1000-1019, SA1/SB3/SB4/SB5/SB6/SC3/SC4
machine->PMC)
1020-1039
0000-0024 SA1/SB3/SB5/SC3
4 A (Message demand)
0000-0124 SB4/SB6/SC4
0000-0999,
SA1
9000-9099
0000-1499,
5 R (Internal relay) SB3/SB5/SC3
9000-9117
0000-2999,
SB4/SB6/SC4
9000-9199
0000-0079 SA1/SB3/SB5/SC3
6 T (Changeable timer)
0000-0299 SB4/SB6/SC4
0000-0019 SA1/SB3/SB5/SC3
7 K (Keep relay) 0000-0039,
SB4/SB6/SC4
0900-0909
0000-0079 SA1/SB3/SB5/SC3
8 C (Counter)
0000-0199 SB4/SB6/SC4
0000-1859 SA1
9 D (Data table) 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.

The referenceable range of PMC data of Series 21 Model B, Series 0i-A


ID codeKind of PMC address Referenceable range(Kind of PMC)
0000-0255,
0 G (Signal to PMC->CNC) SA1/SA3
1000-1255
1 F (Signal to CNC->PMC) SA1/SA3
ID codeKind of PMC address Referenceable range(Kind of PMC)
0000-0255,
1000-1255
0000-0127,
2 Y (Signal to PMC->machine) SA1/SA3
1000-1008
0000-0127,
3 X (Signal to machine->PMC) SA1/SA3
1000-1011
4 A (Message demand) 0000-0024 SA1/SA3
0000-0999,
SA1
9000-9099
5 R (Internal relay)
0000-0999,
SA3
9000-9117
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.

The referenceable range of PMC data of Series 16i/18i,0i-B(SB7)


ID codeKind of PMC address Referenceable range(Kind of PMC)
0000-0255,
SB5
1000-1255
0000-0511,
1000-1511, SB6
0 G (Signal to PMC->CNC)
2000-2511
0000-0767,
1000-1767, SB7
2000-2767
0000-0255,
SB5
1000-1255
0000-0511,
1000-1511, SB6
1 F (Signal to CNC->PMC)
2000-2511
0000-0767,
1000-1767, SB7
2000-2767
0000-0127 SB5/SB6/SB7
2 Y (Signal to PMC->machine)
0200-0327 SB6/SB7
0000-0127 SB5/SB6/SB7
3 X (Signal to machine->PMC)
0200-0327 SB6/SB7
4 A (Message demand) 0000-0024 SB5
0000-0124 SB6
SB7
ID codeKind of PMC address Referenceable range(Kind of PMC)
0000-0249,
9000-9249
0000-1499,
SB5
9000-9117
0000-2999,
5 R (Internal relay) SB6
9000-9199
0000-7999,
SB7
9000-9499
0000-0079 SB5
0000-0299 SB6
6 T (Changeable timer)
0000-0499,
SB7
9000-9499
0000-0019 SB5
0000-0039,
SB6
7 K (Keep relay) 0900-0909
0000-0099,
SB7
0900-0919
0000-0079 SB5
0000-0199 SB6
8 C (Counter)
0000-0399,
SB7
5000-5199
0000-2999 SB5
9 D (Data table) 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.

The referenceable range of PMC data of Series 21i, 0i-B(SA1)


ID codeKind of PMC address Referenceable range(Kind of PMC)
0000-0255,
0 G (Signal to PMC->CNC) SA1/SA5
1000-1255
0000-0255,
1 F (Signal to CNC->PMC) SA1/SA5
1000-1255
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
0000-0999,
SA1
9000-9099
5 R (Internal relay)
0000-0999,
SA5
9000-9117
6 T (Changeable timer) 0000-0079 SA1/SA5
ID codeKind of PMC address Referenceable range(Kind of PMC)
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.

The referenceable range of Series 0i-D


0i-D
ID 0i-D/0i Mate-D
Kind of PMC address 0i-D PMC DCS
code PMC/L
PMC
0-767
1000-1767
2000-2767
(Note1)
3000-3767
(Note1)
4000-4767
(Note1)
0-767
5000-5767
0 G (Output signal from PMC to CNC) 1000-1767 0-767
(Note1)
(Note1)
6000-6767
(Note1)
7000-7767
(Note1)
8000-8767
(Note1)
9000-9767
(Note1)
1 F (Input signal to PMC from CNC) 0-767 0-767 0-767
1000-1767 1000-1767
2000-2767 (Note1)
(Note1)
3000-3767
(Note1)
4000-4767
(Note1)
5000-5767
(Note1)
6000-6767
(Note1)
7000-7767
(Note1)
8000-8767
(Note1)
0i-D
ID 0i-D/0i Mate-D
Kind of PMC address 0i-D PMC DCS
code PMC/L
PMC
9000-9767
(Note1)
0-127
200-327
Y (Output signal from PMC to 400-527(Note2)
2 0-127 0-127
machine) 600-727(Note2)
1000-1127
(Note2)
0-127
200-327
X (Input signal to PMC from 400-527(Note2)
3 0-127 0-127
machine) 600-727(Note2)
1000-1127
(Note2)
A (Message display)
0-249 0-249 -
*Display request
4
A (Message display)
9000-9249 9000-9249 -
*Display status
R (Internal relay) 0-7999 0-1499 0-1499
5 9000-
R (System relay) 9000-9499 9000-9499
9499
T (Timer)
0-449 0-79 0-79
*Variable timer
6
T (Timer) 9000-
9000-9499 9000-9079
*Variable timer precision(Note3) 9079
K (Keep relay)
0-99 0-19 0-19
*User area
7
K (Keep relay)
900-999 900-999 900-999
*Syatem area
C (Counter)
0-399 0-79 0-79
*Variable counter
8
C (Counter) 5000-
5000-5199 5000-5039
*Fixed counter 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.

The referenceable range of Series 30i/31i/32i-A


30i/31i/32i-A PMC
ID Kind of PMC 1st, 2nd and 3rd PMC 32i-A
DSC
code address PMC PMC PMC PMC/L
PMC
Memory-A Memory-B Memory-C
0-767 0-767 0-767
1000-1767 1000-1767 1000-1767
2000-2767 2000-2767 2000-2767
3000-3767 3000-3767 3000-3767
0-767
G (Output signal from 4000-4767 4000-4767 4000-4767
0 0-767 1000-
PMC to CNC) 5000-5767 5000-5767 5000-5767
1767
6000-6767 6000-6767 6000-6767
7000-7767 7000-7767 7000-7767
8000-8767 8000-8767 8000-8767
9000-9767 9000-9767 9000-9767
0-767 0-767 0-767
1000-1767 1000-1767 1000-1767
2000-2767 2000-2767 2000-2767
3000-3767 3000-3767 3000-3767
0-767
F (Input signal to 4000-4767 4000-4767 4000-4767
1 0-767 1000-
PMC from CNC) 5000-5767 5000-5767 5000-5767
1767
6000-6767 6000-6767 6000-6767
7000-7767 7000-7767 7000-7767
8000-8767 8000-8767 8000-8767
9000-9767 9000-9767 9000-9767
0-127 0-127 0-127
200-327 200-327 200-327
Y (Output signal to 400-527 400-527 400-527
2 0-127 0-127
PMC from machine) 600-727 600-727 600-727
1000-1127 1000-1127 1000-1127
(Note1) (Note1) (Note1)
0-127 0-127 0-127
200-327 200-327 200-327
X (Input signal from 400-527 400-527 400-527
3 0-127 0-127
PMC to machine) 600-727 600-727 600-727
1000-1127 1000-1127 1000-1127
(Note1) (Note1) (Note1)
A (Message display)
0-249 0-249 0-499 0-249 0-249
*Display request
4
A (Message display) 9000- 9000-
9000-9249 9000-9249 9000-9499
*Display status 9249 9249
5 R (Internal relay) 0-1499 0-7999 0-15999 0-1499 0-1499
R (System relay) 9000-9499 9000-9499 -
30i/31i/32i-A PMC
ID Kind of PMC 1st, 2nd and 3rd PMC 32i-A
DSC
code address PMC PMC PMC PMC/L
PMC
Memory-A Memory-B Memory-C
9000- 9000-
9499 9499
T (Timer)
0-79 0-499 0-999 0-79 0-79
*Variable timer
6 T (Timer)
9000- 9000-
*Variable timer 9000-9079 9000-9499 9000-9999
9079 9079
precision(Note2)
K (Keep relay)
0-19 0-99 0-199 0-19 0-19
*User range
7
K (Keep relay)
900-999 900-999 900-999 900-999 900-999
*System range
C (Counter)
0-79 0-399 0-799 0-79 0-79
*Variable counter
8
C (Counter) 5000- 5000-
5000-5039 5000-5199 5000-5399
*Fixed counter 5039 5039
9 D (Data table) 0-2999 0-9999 0-19999 0-2999 0-2999
M (Input signal from
10 0-767 0-767 0-767 - -
other PMC path)
N (Output signal to
11 0-767 0-767 0-767 - -
other PMC path)
0-9999 0-9999 0-9999
12 E (Extra relay) (Note4) 0-9999
(Note3) (Note3) (Note3)
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.

The referenceable range of Series 0i-F, 30i/31i/32i/35i-B, PMi-A


1st to 5th path PMC
ID Kind of PMC DSC
PMC PMC PMC PMC
code address PMC
Memory-A Memory-B Memory-C Memory-D
0 G (Output signal from 0-767 0-767 0-767 0-767 0-767
PMC to CNC) 1000-1767 1000-1767 1000-1767 1000-1767
2000-2767 2000-2767 2000-2767 2000-2767
1st to 5th path PMC
ID Kind of PMC DSC
PMC PMC PMC PMC
code address PMC
Memory-A Memory-B Memory-C Memory-D
3000-3767 3000-3767 3000-3767 3000-3767
4000-4767 4000-4767 4000-4767 4000-4767
5000-5767 5000-5767 5000-5767 5000-5767
6000-6767 6000-6767 6000-6767 6000-6767
7000-7767 7000-7767 7000-7767 7000-7767
8000-8767 8000-8767 8000-8767 8000-8767
9000-9767 9000-9767 9000-9767 9000-9767
0-767 0-767 0-767 0-767
1000-1767 1000-1767 1000-1767 1000-1767
2000-2767 2000-2767 2000-2767 2000-2767
3000-3767 3000-3767 3000-3767 3000-3767
F (Input signal to 4000-4767 4000-4767 4000-4767 4000-4767
1 0-767
PMC from CNC) 5000-5767 5000-5767 5000-5767 5000-5767
6000-6767 6000-6767 6000-6767 6000-6767
7000-7767 7000-7767 7000-7767 7000-7767
8000-8767 8000-8767 8000-8767 8000-8767
9000-9767 9000-9767 9000-9767 9000-9767
0-127 0-127 0-127 0-127
200-327 200-327 200-327 200-327
Y (Output signal from 400-527 400-527 400-527 400-527
2 0-127
PMC to machine) 600-727 600-727 600-727 600-727
1000-1127 1000-1127 1000-1127 1000-1127
(Note1) (Note1) (Note1) (Note1)
0-127 0-127 0-127 0-127
200-327 200-327 200-327 200-327
X (Input signal to 400-527 400-527 400-527 400-527
3 0-127
PMC from machine) 600-727 600-727 600-727 600-727
1000-1127 1000-1127 1000-1127 1000-1127
(Note1) (Note1) (Note1) (Note1)
A (Message display)
0-249 0-249 0-499 0-749 0-249
*Display request
4
A (Message displsy) 9000-
9000-9249 9000-9249 9000-9499 9000-9749
Display status 9249
R (Internal relay) 0-1499 0-7999 0-15999 0-59999 0-1499
5 9000-
R (System relay) 9000-9499 9000-9499 - -
9499
T (Timer)
0-79 0-499 0-999 0-999 0-79
*Variable timer
6 T (Timer)
9000-
*Variable timer 9000-9079 9000-9499 9000-9999 9000-9999
9079
precision(Note2)
7 K (Keep relay)
0-19 0-99 0-199 0-299 0-19
*User range
1st to 5th path PMC
ID Kind of PMC DSC
PMC PMC PMC PMC
code address PMC
Memory-A Memory-B Memory-C Memory-D
K (Keep relay) 900-999 900-999 900-999 900-999 900-999
*System range
C (Counter)
*Changeable 0-79 0-399 0-799 0-1199 0-79
8 counter
C (Counter) 5000-
5000-5039 5000-5199 5000-5399 5000-5599
*Fixed counter 5039
0-19999 0-59999
9 D (Data table) 0-2999 0-9999 0-2999
(Note5) (Note5)
M (Input signal from
10 0-767 0-767 0-767 0-767 -
other PMC path)
N (Output signal to
11 0-767 0-767 0-767 0-767 -
other PMC path)
0-9999 0-9999 0-9999 0-9999
12 E (Extra relay) (Note4)
(Note3) (Note3) (Note3) (Note3)
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.

The referenceable range of PMC data of Power Mate i


ID codeKind of PMC address Referenceable range(Kind of PMC)
0000-0255,
SB5
1000-1255
0 G (Signal to PMC->CNC) 0000-0511,
1000-1511, SB6
2000-2511
0000-0255,
SB5
1000-1255
1 F (Signal to CNC->PMC) 0000-0511,
1000-1511, SB6
2000-2511
2 Y (Signal to PMC->machine) SB5/SB6
ID codeKind of PMC address Referenceable range(Kind of PMC)
0000-0127,
1000-1002,
1020-1051
0000-0127,
3 X (Signal to machine->PMC) 1000-1003, SB5/SB6
1020-1051
0000-0024 SB5
4 A (Message demand)
0000-0124 SB6
0000-1499,
SB5
9000-9117
5 R (Internal relay)
0000-2999,
SB6
9000-9199
0000-0079 SB5
6 T (Changeable timer)
0000-0299 SB6
0000-0019 SB5
7 K (Keep relay) 0000-0039,
SB6
0900-0909
0000-0079 SB5
8 C (Counter)
0000-0199 SB6
0000-2999 SB5
9 D (Data table)
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.

data_type [ in ]
Specify the type of the PMC data.
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)
s_number [ in ]
Specify the start PMC address number.
e_number [ in ]
Specify the end PMC address number.
length [ in ]
Specify the data block length.
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 length = 8 + N ×
:
type) 4
data_type is 5(64-bit floating-point length = 8 + N ×
:
type) 8
* N is the number of read data.
buf [ out ]
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

1. D0100(It is assumed the word 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.
2. R0200,..,R0209(It is assumed the byte type) is read.
adr_type 5
data_type 0
s_number 200
e_number 209
length 8+1×10 (=18)
buf.u.cdata[0]
The contents of R0200,..,R0209 are stored.
,..,buf.u.cdata[9]
3. D0100(It is assumed the 32-bit floating-point type) is read.
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.
4. R0104, R0112(It is assumed the 64-bit floating-point type) is read.
adr_type 5
data_type 5
s_number 104
e_number 119
length 8+8×2 (=24)
buf.u.cdata[0]
The contents of R0104, R0112 are stored.
,..,buf.u.cdata[1]

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_NOPMC There is no PMC.
(1)
EW_LENGTH Data block length error
(2) Size of IODBPMC structure(length) is wrong.
EW_RANGE Address range error
(3) PMC address number(s_number,e_number) is wrong.
EW_ATTRIB Data attribute error
(4) Kind of PMC address(adr_type) or type of PMC data (data_type) is wrong.
EW_PASSWD The data of specified range cannot be read because the data is protected.
(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,

The extended driver/library function is necessary.

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-B/C
0i-A 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
(Note)
M
H O O O H O H H H O O O O O O O O
(Machining)
T (Turning) H O O O H - H H H O O O O O O O O
LC (Loader) - - - - - - H H X H H H H H H - -

0i-D 0i-F 16i 18i 30i-A 30i-B


P (Punch O O O O - O
press)
L (Laser) - - O - - O
W (Wire) - - O O O O

Power Mate i-D O


Power Mate i-H O
Power Motion
O
i-A

"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

pmc_wrpmcrng pmc_rdpmcinfo

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);
}
}

Fanuc Focas Library | Pmc | flist_Pmc


PMC: Function related to PMC... [read more]

Fanuc Focas Library | Pmc | pmc_crdmsg


Description Reads the data of 32 bytes transmitted from the PMC. It is necessary
to transmit the data on the PMC side to read the... [read more]

Fanuc Focas Library | Pmc | pmc_cwrmsg


Description Writes the data of 32 bytes transmitted to the PMC. It is necessary to
receive the data on the PMC side to write the... [read more]

Fanuc Focas Library | Pmc | pmc_getdtailerr


Description Gets the detailed error information after the function has been
executed. The detailed error information is stored in "err_no", "err_dtno"
of... [read more]
Fanuc Focas Library | Pmc | pmc_get_current_pmc_unit
Description Get the current PMC unit type.... [read more]

Fanuc Focas Library | Pmc | pmc_get_number_of_pmc


Description Reads the number of existing PMC paths (i.e. number of
unit).... [read more]

Fanuc Focas Library | Pmc | pmc_get_pmc_unit_types


Description Reads the PMC system information that shows what kind of PMC units
compose the multi-path PMC system.... [read more]

Fanuc Focas Library | Pmc | pmc_get_timer_type


Description Reads the PMC timer type of the specified timer number.... [read more]

Fanuc Focas Library | Pmc | pmc_kpmsiz


Description Reads the maximum size of the extended backup
memory.... [read more]

Fanuc Focas Library | Pmc | pmc_rdalmmsg


Description Reads the alarm messages from PMC.... [read more]
Fanuc Focas Library | Pmc | pmc_rdcntldata
Description Reads the control data to manage PMC data table (address D). This
function is not available at PMC-NA. Refer to the programming... [read more]
Fanuc Focas Library | Pmc | pmc_rdcntlgrp
Description Reads the total number of groups of the control data to manage PMC
data table(address D). This function is not available at PMC-NA.... [read more]

Fanuc Focas Library | Pmc | pmc_rdkpm


Description Reads the contents of the extended backup memory of PMC specified
by "offset", "length". The data are stored in "data"... [read more]

Fanuc Focas Library | Pmc | pmc_rdkpm2


Description Reads the contents of the extended backup memory of PMC specified
by "offset", "length". The data are stored in "data"... [read more]

Fanuc Focas Library | Pmc | pmc_rdmsg


Description Reads the data of 32 bytes transmitted from the PMC. It is necessary
to transmit the data on the PMC side to read the... [read more]

Fanuc Focas Library | Pmc | pmc_rdpmcinfo


Description Reads the data information about the attribute of each kind of PMC,
the effective range of PMC address, etc.... [read more]

Fanuc Focas Library | Pmc | pmc_rdpmcparam


Description The PMC parameter(timer, counter, keep relay, and data) is uploaded
by the tape format. When you execute this function, change to... [read more]

Fanuc Focas Library | Pmc | pmc_rdpmctitle


Description Reads the PMC title data from PMC. When this function is executed
while editing the title data with PMC, the return value... [read more]

Fanuc Focas Library | Pmc | pmc_rdprmend


Description End of upload of the PMC parameter(timer, counter, keep relay, and
data) by the tape format. This function is executable other... [read more]

Fanuc Focas Library | Pmc | pmc_rdprmstart


Description Starts uploading the PMC parameter(timer, counter, keep relay, and
data) of the tape format. To uploading of PMC parameter, this... [read more]

Fanuc Focas Library | Pmc | pmc_select_pmc_unit


Description Selects PMC that will be the target of other PMC FOCAS2 function by
the unit type.... [read more]

Fanuc Focas Library | Pmc | pmc_set_timer_type


Description Writes the PMC timer type of the specified timer number.... [read more]
Fanuc Focas Library | Pmc | pmc_wrcntldata
Description Writes the control data to manage PMC data table (address D). This
function is not available at PMC-NA. Refer to the programming... [read more]
Fanuc Focas Library | Pmc | pmc_wrcntlgrp
Description Writes the total number of groups of the control data to manage PMC
data table(address D). This function is not available at PMC-NA.... [read more]

Fanuc Focas Library | Pmc | pmc_wrkpm


Description Writes the data to the extended backup memory of PMC specified by
"offset", "length". The data must be stored in "data" as... [read more]

Fanuc Focas Library | Pmc | pmc_wrkpm2


Description Writes the data to the extended backup memory of PMC specified by
"offset", "length". The data must be stored in "data" as... [read more]

Fanuc Focas Library | Pmc | pmc_wrmsg


Description Writes the data of 32 bytes transmitted to the PMC. It is necessary to
receive the data on the PMC side to write the... [read more]

Fanuc Focas Library | Pmc | pmc_wrpmcparam


Description The PMC parameter(timer, counter, keep relay, and data) is
downloaded by the tape format. When you execute this function, set... [read more]

Fanuc Focas Library | Pmc | pmc_wrpmcrng


Description Writes the PMC data of the specified PMC address/range. This
function is used to exchange the data between the... [read more]

Fanuc Focas Library | Pmc | pmc_wrprmend


Description End of download of the PMC parameter(timer, counter, keep relay, and
data) by the tape format. Even if the PWE of CNC parameter is... [read more]

Fanuc Focas Library | Pmc | pmc_wrprmstart


Description Starts downloading the PMC parameter(timer, counter, keep relay, and
data) of the tape format. To downloading of PMC parameter,... [read more]

Modified: 2018-06-11

Вам также может понравиться