Description
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.
Universal Fanuc Driver
Fanuc Focas Library CD
Declaration
Arguments : Ethernet
Specify the library handle. See "Library handle" for details.
The parameter number for unsolicited messaging. Reserved argument, so must be set to "1".
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 |
---|---|
(1) |
|
(3) |
|
(9) |
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) | |||||||||||||||||
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 | E |
"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