News CNCnetPDM About us Support  
         
  

CNC_RDUNSOLICPRM | UNSOLIC

Description

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 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_unsolicstart and make the parameter effective before reading the parameters by this function. So, when this function is called just after the parameters are set by the cnc_wrunsolicprm, the correct value cannot be read.
MTConnect Fanuc Adapter

Universal Fanuc Driver

Fanuc Focas Library CD

Declaration

#include "fwlib32.h"

FWLIBAPI short WINAPI cnc_rdunsolicprm( 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".

data   [ out ]

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

The IODBUNSOLIC structure is as follows.
typedef struct iodbunsolic {
    char            ipaddr[16] ;
    unsigned short  port ;
    short           reqaddr ;
    short           pmcno ;
    short           retry ;
    short           timeout ;
    short           alivetime;
    short           setno ;
    union {
        struct {
            short   type ;
            short   rdaddr ;
            short   rdno ;
            short   rdsize ;
        } pmc ;
        struct {
            short   type ;
            long    dummy1 ;
            short   dummy2 ;
        } dmy ;
    } rddata[3] ;
} IODBUNSOLIC ;
ipaddr
IP address of destination PC.
port
TCP port number of destination PC.
reqaddr
PMC address type for the data transmission control.
5 : R (Internal relay)
12 : E (Extended relay)
pmcno
PMC address number for the data transmission control.
retry
Number of transmission retry to observe communication board transmits data.
timeout
Timeout time(sec) to observe communication board transmits data.
alivetime
The interval time(sec)of the existence signals which are transmitted while communication board operates.
setno
Number of the Message data to be transmitted. (1-3).
type
The type of the transmission data. (=1).
rdaddr
PMC address which becomes the contents of Message data.
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)
11 : N (Output signal to other devices)
12 : E (Extended relay)
rdno
Start address number of PMC data which becomes the contents of Message data.
rdsize
Size(byte) of PMC data which becomes the contents of Message data.

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 16i/18i/21i-B, 0i-B/C, 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.

  • Series 16i/18i/21i, 0i, Power Mate i
    No.904#4=1 (must be set)

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

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


Power Mate i-DE
Power Mate i-HE
Power Motion i-AX

"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_unsolicstart   cnc_unsolicstop   cnc_rdunsolicmsg  

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_rdunsolicprm
Fanuc Focas Library | Unsolic | cnc_rdunsolicmsg
Description 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]
cnc_rdunsolicmsg
Fanuc Focas Library | Unsolic | cnc_rdunsolicmsg2
Description 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]
cnc_rdunsolicmsg2
Fanuc Focas Library | Unsolic | cnc_rdunsolicprm2
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... [read more]
cnc_rdunsolicprm2
Fanuc Focas Library | Unsolic | cnc_unsolicstart
Description 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]
cnc_unsolicstart
Fanuc Focas Library | Unsolic | cnc_unsolicstop
Description Directs the termination of reception of the unsolicited messaging. When the CNC parameter No.905#4 is "1", this function can be... [read more]
cnc_unsolicstop
Fanuc Focas Library | Unsolic | cnc_wrunsolicprm
Description 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]
cnc_wrunsolicprm
Fanuc Focas Library | Unsolic | cnc_wrunsolicprm2
Description 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]
cnc_wrunsolicprm2
Fanuc Focas Library | Unsolic | flist_UnSolic
CNC: Function related to Unsolicited messaging function... [read more]
flist_UnSolic
Modified: 2018-06-11