Description
The PMC parameter(timer, counter, keep relay, and data) is downloaded by the tape format.
When you execute this function, set '1' for PWE of the CNC parameter and make the state of CNC an emergency stop.
Refer to the description of pmc_rdpmcparam for the format of PMC parameter.
When the last character of buffer is not "A" or "%", EW_DATA error occurs.
MTConnect Fanuc AdapterUniversal Fanuc DriverFanuc Focas Library CDDeclaration
#include "fwlib32.h" or "fwlib64.h"
FWLIBAPI short WINAPI pmc_wrpmcparam(unsigned short FlibHndl, long *length, char *buff);Arguments : HSSB
FlibHndl
[ in ]
length
[ in/out ]
Specify the pointer to the variable where the character size which wants to write is set.
The function returns the length of the character which was written actually.
buff
[ in ]
Specify the pointer to the area where the PMC parameter which wants to be written is 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_RESET (-2) |
Stop request
All PMC parameter already was written.
|
EW_FUNC (1) |
pmc_wrprmstart function has not been executed.
|
EW_LENGTH (2) |
Data length error
The value of 0 or less was specified for write size(*length).
|
EW_DATA (5) |
Data error
The writing format is wrong. In case of 0i-F,30i/31i/32i, in order to get more information for this err_no return value, execute
pmc_getdtailerrfunction.
The following detail status will be set onto the member, err_no of ODBERR structure.
| 1 | : | The first character string was not "%;". |
| 2 | : | The end of the character string was not ";(0x0A)" or "%". |
| 3 | : | The character string of second block was not the header information. |
| 4 | : | A model name of header information and an actual model are different. |
| 5 | : | The character by which header information and ID information were delimited was not ",". |
| 6 | : | The character string of ID information on header information was not "MSID =". |
| 7 | : | The MSID number on header information and current PMC unit type are different. |
| 8 | : | The last character of header information was not ")". |
| 9 | : | The first character of parameter block was not "N". |
| 10 | : | The address number of parameter block was wrong. (no six digits) |
| 11 | : | The address number of parameter block was wrong. (the head of N number is not "6") |
| 12 | : | The third character of the parameter block was not "0", "1", "2", "3", "4", or "9". |
| 13 | : | The block of larger group information than the total of the group was specified. |
| 14 | : | The data table control information was wrong. (number which cannot be specified) |
| 15 | : | The head of the character for the set value on the parameter block was not "P". |
| 16 | : | The character which was not the numerical value was included in the setting value. (format error of setting value) |
| 17 | : | The number of characters of bit patterns was not eight characters. (format error of setting value) |
| 18 | : | The range of address was wrong. |
| 19 | : | The total number of data table control information was wrong. |
| 20 | : | The data table control information was wrong. |
And the block number(0-) in which includ an incorrect data will be set onto the member, err_dtno of ODBPMCERR.
|
EW_NOOPT (6) |
no option
|
EW_PARAM (9) |
Parameter error
CNC parameter(PWE) is '0'.
|
EW_PATH (11) |
PMC unit type was wrong.(only 0i-F,30i/31i/32i)
The PMC unit type was changed.
|
EW_REJECT (13) |
CNC execution rejection
CNC is not in "Emergency" state.
|
As for the other return codes or the details, see
"Return status of Data window function"
CNC option
For HSSB connection,
CNC parameter
This function is related to the following CNC parameter.
See the manual of CNC parameter for details.
No.8900#0(PWE) (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 |
X |
O |
O |
X |
X |
X |
X |
X |
H |
H |
H |
H |
H |
H |
H |
O |
| T (Turning) | X |
X |
O |
O |
X |
-
|
X |
X |
X |
H |
H |
H |
H |
H |
H |
H |
O |
| LC (Loader) |
-
|
-
|
-
|
-
|
-
|
-
|
X |
X |
X |
H |
H |
H |
H |
H |
H |
-
|
-
|
| 0i-D | 0i-F | 16i | 18i | 30i-A | 30i-B |
| P (Punch press) | H |
H |
H |
H |
-
|
H |
| L (Laser) |
-
|
-
|
H |
-
|
-
|
H |
| W (Wire) |
-
|
-
|
X |
X |
X |
X |
| Power Mate i-D | X |
| Power Mate i-H | X |
| Power Motion i-A | X |
|
"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_rdprmstart
pmc_rdpmcparam
pmc_rdprmend
pmc_wrprmstart
pmc_wrprmend