News CNCnetPDM About us Support  
         
  

PMC_RDPMCRNG | PMC

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 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, 0900-0909 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.

  • The referenceable range of PMC data of Series 15i
  • 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.

  • The referenceable range of PMC data of Series 16/18 Model B/C
  • 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.

  • The referenceable range of PMC data of Series 21 Model B, Series 0i-A
  • 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.

  • The referenceable range of PMC data of Series 16i/18i,0i-B(SB7)
  • 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.

  • The referenceable range of PMC data of Series 21i, 0i-B(SA1)
  • 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.

  • The referenceable range of Series 0i-D
  • 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.

  • The referenceable range of Series 30i/31i/32i-A
  • ID code Kind of PMC address 30i/31i/32i-A PMC 32i-A PMC/L
    1st, 2nd and 3rd PMCDSC PMC
    PMC Memory-APMC Memory-BPMC 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
    1This area is reserved for PMC management software. Do not use it in user programs.
    2This area is used to specify the precision of a variable timer.
    3This 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.
    4No extra relay is available for the dual-check safety PMC.
    5It 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
  • ID code Kind of PMC address 1st to 5th path PMCDSC PMC
    PMC Memory-APMC Memory-BPMC Memory-CPMC 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
    1This area is reserved for PMC management software. Do not use it in user programs.
    2This area is used to specify the precision of a variable timer.
    3This 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.
    4No extra relay is available for the dual-check safety PMC.
    5To save all area of the data table, the "Nonvolatile PMC data table area expansion (40KB)" option may be necessary.
    6It 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 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.

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 type) : length = 8 + N 4
data_type is 5(64-bit floating-point type) : length = 8 + N 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.
  2. adr_type 9
    data_type 1
    s_number 100
    e_number 101
    length 8+21 (=10)
    buf.u.idata[0] The content of D0100 is stored.
  3. R0200,..,R0209(It is assumed the byte type) is read.
  4. adr_type 5
    data_type 0
    s_number 200
    e_number 209
    length 8+110 (=18)
    buf.u.cdata[0]
    ,..,buf.u.cdata[9]
    The contents of R0200,..,R0209 are stored.
  5. D0100(It is assumed the 32-bit floating-point type) is read.
  6. adr_type 9
    data_type 4
    s_number 100
    e_number 103
    length 8+41 (=12)
    buf.u.cdata[0] The contents of D0100 is stored.
  7. R0104, R0112(It is assumed the 64-bit floating-point type) is read.
  8. adr_type 5
    data_type 5
    s_number 104
    e_number 119
    length 8+82 (=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
EW_NOPMC
(1)
There is no PMC.
EW_LENGTH
(2)
Data block length error
Size of IODBPMC structure(length) is wrong.
EW_RANGE
(3)
Address range error
PMC address number(s_number,e_number) is wrong.
EW_ATTRIB
(4)
Data attribute error
Kind of PMC address(adr_type) or type of PMC data (data_type) is wrong.
EW_PASSWD
(17)
The data of specified range cannot be read because the data is protected.
(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-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)H O O O H O H H H O O O O O O O O
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-D0i-F16i18i30i-A30i-B
P (Punch press)O O O O - O
L (Laser) - - O - - O
W (Wire) - - O O O O


Power Mate i-DO
Power Mate i-HO
Power Motion i-AO

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

Privacy notice

This website uses cookies. By continuing to use it you agree to our privacy policy. 

https://www.inventcom.net/fanuc-focas-library/pmc/pmc_rdpmcrng
Fanuc Focas Library | Pmc | flist_Pmc
PMC: Function related to PMC... [read more]
flist_Pmc
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]
pmc_crdmsg
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]
pmc_cwrmsg
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]
pmc_getdtailerr
Fanuc Focas Library | Pmc | pmc_get_current_pmc_unit
Description Get the current PMC unit type.... [read more]
pmc_get_current_pmc_unit
Fanuc Focas Library | Pmc | pmc_get_number_of_pmc
Description Reads the number of existing PMC paths (i.e. number of unit).... [read more]
pmc_get_number_of_pmc
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]
pmc_get_pmc_unit_types
Fanuc Focas Library | Pmc | pmc_get_timer_type
Description Reads the PMC timer type of the specified timer number.... [read more]
pmc_get_timer_type
Fanuc Focas Library | Pmc | pmc_kpmsiz
Description Reads the maximum size of the extended backup memory.... [read more]
pmc_kpmsiz
Fanuc Focas Library | Pmc | pmc_rdalmmsg
Description Reads the alarm messages from PMC.... [read more]
pmc_rdalmmsg
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]
pmc_rdcntldata
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]
pmc_rdcntlgrp
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]
pmc_rdkpm
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]
pmc_rdkpm2
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]
pmc_rdmsg
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]
pmc_rdpmcinfo
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]
pmc_rdpmcparam
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]
pmc_rdpmctitle
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]
pmc_rdprmend
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]
pmc_rdprmstart
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]
pmc_select_pmc_unit
Fanuc Focas Library | Pmc | pmc_set_timer_type
Description Writes the PMC timer type of the specified timer number.... [read more]
pmc_set_timer_type
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]
pmc_wrcntldata
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]
pmc_wrcntlgrp
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]
pmc_wrkpm
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]
pmc_wrkpm2
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]
pmc_wrmsg
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]
pmc_wrpmcparam
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]
pmc_wrpmcrng
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]
pmc_wrprmend
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]
pmc_wrprmstart
Modified: 2018-06-11