News CNCnetPDM About us Support  
       
  

CNC_RDUNSOLICPRM2 | UNSOLIC

TOP

Description

Reads the parameter for unsolicited messaging from CNC. This function is available only for Series Series 30i/31i/32i, 0i-D/F and PMi-A. This function cannot be used with Visual Basic. Please use Visual C++ for making your application.
Please refer to "Unsolicited Messaging Function" for the detail information of unsolicited messaging function.

It is necessary to execute cnc_wrunsolicprm2 and make the parameter effective before reading the parameters by this function.
MTConnect Fanuc Adapter

Universal Fanuc Driver

Fanuc Focas Library CD

Declaration

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

FWLIBAPI short WINAPI cnc_rdunsolicprm2( unsigned short FlibHndl, short number, IODBUNSOLIC *data );

Arguments : Ethernet

FlibHndl   [ in ]

Specify the library handle. See "Library handle" for details.

number   [ in ]

The parameter number for unsolicited messaging. Reserved argument, so must be set to "1".

data2   [ out ]

Pointer to IODBUNSOLIC2 structure in which the parameter for the unsolicited messaging will be stored.

The IODBUNSOLIC structure is as follows.

typedef struct iodbunsolic2 {
    char                ipaddr[64];
    unsigned long       port;
    unsigned short      retry;
    unsigned short      timeout;
    unsigned short      alivetime;
    char                dummy1[8];
    UNSOLICMSG_TYPE_PRM cntrl;
    unsigned short      transnum;
    char                dummy2[14];
    UNSOLICMSG_TYPE_PRM trans[3];
} IODBUNSOLIC2;

typedef struct unsolicmsg_type_prm {
    unsigned short      type;
    char                dummy1[2];
    union {
        typedef {
            unsigned short  path;
            short           addr;
            unsigned long   no;
            unsigned long   size;
        } pmc;
        typedef {
            unsigned short  path;
            char            dummy2[2];
            unsigned long   no; 
            unsigned long   num;
        } macro;
    } prm
} UNSOLICMSG_TYPE_PRM;
ipaddr
IP address or host name of destination PC.
ex.) "192.168.0.1"
port
TCP/UDP port number of destination PC.
Range) 5001 - 65535
retry
Number of transmission retry to observe communication board transmits data. Set the retry count that is used when there is no answer for the data transmission.
Range) 1 - 32767
timeout
Timeout times(sec)
Timeout(sec) to observe communication board transmits data. Set the time(sec) of timeout until answering to the data transmission.
Range) 1 - 32767
alivetime
Alive signal time(sec)
The interval time(sec)of the existence signals which are transmitted while communication board operates. Set the value less than the value of the above "timeout".
Range) 1 - 32767
cntrl.prm.type
Kind of control parameter
This data is the kind of control parameter for the ladder program or the NC program to demand the message transmission.
0 : Control parameter is invalid.
1 : PMC address(Response Notice method)
2 : PMC address(Simple method)
3 : Custom macro variable(Simple method)
4 : Temporary RTM variable(Simple method)(0i-F,30i/31i/32i only)
cntrl.prm.pmc.path
PMC unit type for control parameter
This data is PMC unit type number for control parameter for the ladder program to demand the message transmission.
When the value of "Kind of control parameter" is "1" and "2", this value is effective.
Range) 1 - 3 (The range depends on an effective PMC unit type number.) When this value is 65535, the control parameter is invalid.
cntrl.prm.pmc.addr
PMC address for control parameter
This data is PMC address for control parameter for the ladder program to demand the message transmission.
When the value of "Kind of control parameter" is "1" and "2", this value is effective.
5 : R (Internal relay)
12 : E (Extended relay)
cntrl.prm.pmc.no
PMC address number for control parameter
This data is PMC address number for control parameter for the ladder program to demand the message transmission.
When the value of "Kind of control parameter" is "1" and "2", this value is effective.
Range) (The range depends on an effective PMC area)
cntrl.prm.pmc.size
unused
cntrl.prm.macro.path
CNC path number for control parameter
This data is CNC path number for control parameter for the NC program to demand the message transmission.
When the value of "Kind of control parameter" is "3" and "4", this value is effective.
Range) 1 - 10(The range depends on an effective PMC area) When this value is 65535, the control parameter is invalid.
cntrl.prm.macro.no
Macro variable number for control parameter
This data is Macro variable number for control parameter for the NC program to demand the message transmission.
When the value of "Kind of control parameter" is "3" and "4", this value is effective.
Range) (The range depends on an effective Macro variable)
cntrl.prm.macro.num
unused
transnum
Transmission number
Number of transmitted messages.
Range) 1 - 3
trans[n].prm.type
Kind of transmission parameter : range of n (0-2).
0 : Transmission parameter is invalid.
1 : PMC address
3 : Custom macro variable
4 : Temporary RTM variable
5 : Permanent RTM variable(0i-F,30i/31i/32i only)
trans[n].prm.pmc.path
PMC unit type number for transmission parameter : range of n (0-2).
When the value of "Kind of transmission parameter" is "1", this value is effective.
Range) 1 - 3 (The range depends on an effective PMC unit type number.) When this value is 65535, the transmission parameter is invalid.
trans[n].prm.pmc.addr
PMC address for transmission parameter : range of n (0-2).
When the value of "Kind of transmission parameter" is "1", this value is effective.
0 : G (Signal to PMC->CNC)
1 : F (Signal to CNC->PMC)
2 : Y (Signal to PMC->machine)
3 : X (Signal to machine->PMC)
4 : A (Message demand)
5 : R (Internal relay)
6 : T (Changeable timer)
7 : K (Keep relay)
8 : C (Counter)
9 : D (Data table)
10 : M (Input signal from other devices)(0i-F,30i/31i/32i only)
11 : N (Output signal to other devices)(0i-F,30i/31i/32i only)
12 : E (Extended relay)
13 : Z (System relay)(0i-F,30i/31i/32i only)
trans[n].prm.pmc.no
PMC address number for transmission parameter : range of n (0-2).
When the value of "Kind of transmission parameter" is "1", this value is effective.
Range) 1 - 10(The range depends on an effective PMC area)
trans[n].prm.pmc.size
PMC data size for transmission parameter (bytes) : range of n (0-2).
When the value of "Kind of transmission parameter" is "3", "4" and "5", this value is effective.
Range) (The range depends on an effective PMC data area and transmission number.)
trans[n].prm.macro.path
CNC path number of transmission parameter : range of n (0-2).
When the value of "Kind of transmission parameter" is "3", "4" and "5", this value is effective.
Range) 1 - 10 (The range depends on an effective CNC path number) When this value is 65535, the transmission parameter is invalid.
trans[n].prm.macro.no
Macro valiable number for transmission parameter : range of n (0-2).
When the value of "Kind of transmission parameter" is "3", "4" and "5", this value is effective.
Range) (The range depends on an effective Macro variable data )
trans[n].prm.macro.num
Number of macro variable for transmission parameter : range of n (0-2).
When the value of "Kind of transmission parameter" is "3", "4" and "5", this value is effective.
Range) (The range depends on an effective Macro variable data and transmission number.)

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_FUNC
(1)
Unavailable
EW_NUMBER
(3)
The parameter number(number) for unsolicited messaging is wrong.
EW_PARAM
(9)
The parameter for the unsolicited messaging has not been set.

As for the other return codes or the details, see "Return status of Data window function"

CNC option

For Ethernet connection,

    The Ethernet function and the extended driver/library function are necessary.

    However, in case of Series 0i-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.

This function is related to the following CNC parameter.
See the manual of FAST Ethernet for details.

    No.904#4=1 : Unsilocited messaging function(must be set)
    No.904#5 : If you use the DNS function, set "1".
    No.14880#4=1 : Unsilocited messaging function(Embedded Ethernet(Built-in port))
    No.14880#5 : If you use the DNS function, set "1".(Embedded Ethernet(Built-in port))

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)X X E E X X X X X X X X X X X E E
T (Turning) X X E E X - X X X X X X X X X E E
LC (Loader) - - - - - - X X X X X X X X X - -

0i-D0i-F16i18i30i-A30i-B
P (Punch press)E E X X - E
L (Laser) - - X - - E
W (Wire) - - X X X X


Power Mate i-DX
Power Mate i-HX
Power Motion i-AE

"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

cnc_wrunsolicprm   cnc_wrunsolicprm2   cnc_unsolicstart   cnc_unsolicstop   cnc_rdunsolicmsg   cnc_rdunsolicmsg2  

Privacy notice

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

https://www.inventcom.net/fanuc-focas-library/unsolic/cnc_rdunsolicprm2

Fanuc Focas Library | Unsolic | cnc_rdunsolicmsg

Reads the unsolicited messaging data. This function is available only for Series 16i/18i/21i, 0i and Power Mate i. This function cannot be used with Visual Basic.... [read more]
Fanuc Focas Library | Unsolic | cnc_rdunsolicmsg

Fanuc Focas Library | Unsolic | cnc_rdunsolicmsg2

Reads the unsolicited messaging data. This function is available only for Series Series 30i/31i/32i, 0i-D/F and PMi-A. This function cannot be used with... [read more]
Fanuc Focas Library | Unsolic | cnc_rdunsolicmsg2

Fanuc Focas Library | Unsolic | cnc_rdunsolicprm

Reads the parameter for unsolicited messaging from CNC. This function is available only for Series 16i/18i/21i, 0i and Power Mate i. This function cannot be used... [read more]
Fanuc Focas Library | Unsolic | cnc_rdunsolicprm

Fanuc Focas Library | Unsolic | cnc_unsolicstart

Directs the starting of reception of the unsolicited messaging. The starting of reception directs by the PC that receives the unsolicited messaging. This... [read more]
Fanuc Focas Library | Unsolic | cnc_unsolicstart

Fanuc Focas Library | Unsolic | cnc_unsolicstop

Directs the termination of reception of the unsolicited messaging. When the CNC parameter No.905#4 is 1, this function can be... [read more]
Fanuc Focas Library | Unsolic | cnc_unsolicstop

Fanuc Focas Library | Unsolic | cnc_wrunsolicprm

Sets the parameter for unsolicited messaging to CNC. This function is available only for Series 16i/18i/21i, 0i and Power Mate i. This function cannot be used with... [read more]
Fanuc Focas Library | Unsolic | cnc_wrunsolicprm

Fanuc Focas Library | Unsolic | cnc_wrunsolicprm2

Sets the parameter for unsolicited messaging to CNC. This function is available only for Series 30i/31i/32i, 0i-D/F and PMi-A. This function cannot be used... [read more]
Fanuc Focas Library | Unsolic | cnc_wrunsolicprm2

Fanuc Focas Library | Unsolic | flist_UnSolic

CNC: Function related to Unsolicited messaging function... [read more]
Fanuc Focas Library | Unsolic | flist_UnSolic
Modified: 2023-12-05