Description
Writes the waveform diagnosis parameter.
cnc_wrwaveprm2 supports Series 15i and
is expanded the function.
Please use cnc_wrwaveprm2 better than cnc_wrwaveprm.
If used, the behavior of this function is not guaranteed.
Universal Fanuc Driver
Fanuc Focas Library CD
Declaration
Arguments
Specify the library handle.
See "Library handle" for details.
Pointer to the IODBWAVE structure including the waveform diagnosis parameter.
The IODBWAVE structure is as follows.
typedef struct iodbwave {
short condition ; /* condition */
char trg_adr ; /* trigger address */
char trg_bit ; /* trigger bit */
short trg_no ; /* trigger number */
short delay ; /* delay time */
short t_range ; /* sampling time */
struct {
short kind ; /* kind of waveform data */
union {
#ifdef M_AXIS2 /* Series 15 : maximum axis=24 */
long axis ; /* axis information */
#else
short axis ; /* axis information */
#endif
struct { /* machine signal */
char adr ; /* kind of PMC address */
char bit ; /* bit number */
short no ; /* number of PMC address */
} io ;
} u ;
} ch[12] ;
} IODBWAVE ;
- condition
- condition
One of the following condition should be specified.0 : The sampling of the data is started by cnc_wavestart function, and stopped after the specified sampling time. 1 : The sampling of the data is started when the trigger specified by the next item rises after calling cnc_wavestart function, and stopped after the specified sampling time. 2 : The sampling of the data is started when the trigger specified by the next item falls after calling cnc_wavestart function, and stopped after the specified sampling time. 100 : The sampling of the data is started by cnc_wavestart function, and stopped when a servo alarm occurrs. 101 : The sampling of the data is started by cnc_wavestart function, and stopped when a servo alarm occurrs or the trigger rises. 102 : The sampling of the data is started by cnc_wavestart function, and stopped when a servo alarm occurrs or the trigger falls.
* In case of Series 16i/18i-W, there is not the setting for condition 100,101,102. - trg_adr
- trigger address
- Specify the kind of PMC address which corresponds to machine signal for a trigger with ASCII code.
- It is valid when condition is 1/2/101/102.
- Kind of stored PMC address : "G","F","Y","X"
- NULL(0x00) invalidates the setting.
- trg_bit
- trigger bit
- Specify the bit number of PMC address which corresponds to machine signal for a trigger.
- It is valid when condition is 1/2/101/102.
- Range of stored bit number : 0 - 7
- trg_no
- trigger number
- Specify the PMC address number which corresponds to machine signal for a trigger.
- It is valid when condition is 1/2/101/102.
- Range of stored number is shown in pmc_rdpmcrng function reference.
- delay
- delay time
- After the stop condition is satisfied and this delay time has passed, the sampling is stopped.
- range
Series 15 0 - 32000 Series 16/18, 16i/18i/21i, 0i 0 - 32760 - unit 1 msec
- It is valid when the condition is 100/101/102.
- t_range
- sampling time
- sampling time is stored.
- range
Series 15 25/50/100/200/400/800 show the following time respectively.
500/1000/2000/4000/8000/16000Series 16/18, 16i/18i/21i, 0i 10 - 8192 - unit 1 msec
- It is valid when the condition is 0/1/2.
- ch[n].kind
- kind of waveform data( n is channel number 0 - 11)
- Specify the number in the table of "Kind of waveform data" on the next page.
- An available channel and the kind of the waveform data are as follows according to the CNC MODEL and the condition.
- condition : 100/101/102
channel No (n) ch[n].kind
(kind of waveform data)Series 16/18, 16i/18i/21i, 0i Series 15 0 0 0 - 2, 4 - 7 1 1 0 - 2, 4 - 7 2 2 0 - 2, 4 - 7 3 5 0 - 2, 4 - 7 4 6 not used 5 7 not used - condition : 0/1/2
channel No (n) ch[n].kind
(kind of waveform data)Series 16/18, 16i/18i/21i, 0i Series 15 6 0 - 3, 5 - 7, 9 - 13 0 - 2, 4 - 7, 9 - 11 7 0 - 3, 5 - 7, 9 - 13 0 - 2, 4 - 7, 9 - 11 8 not used 0 - 2, 4 - 7, 9 - 11 9 not used 13 10 not used 13 11 not used 13 - * If "-1" is stored in ch[n].kind, the data of its channel is invalid.
(The value of "kind" concerning an unused channel is indefinite.) - * Select a following member of union properly according to the value of ch[n].kind.
ch[n].u.axis kind : except '13' ch[n].u.io kind : '13' - * In case of Series 16i/18i-W, there is not the value of ch[n].kind, 100,101,102.
- Kind of waveform data (O:available,X:not available)
number meaning unit Series 16/18, 16i/18i/21i, 0i Series 15 0/1/2 100/101/102 0/1/2 100/101/102 -1 No data - O O O O 0 Servo error(8msec) Pulse(detection unit) O O O O 1 Number of servo pulses to be generated Pulse(detection unit) O O O O 2 Servo torque %(max. current ratio) O O O O 3 Servo error(2msec) Pulse(detection unit) O X X X 4 Number of servo pulses after acceleration,deceleration Pulse(detection unit) X X O O 5 Actual speed rpm O O X X Pulse(detection unit) X X O O 6 Value of the electric current command for servo %(max. current ratio) O O O O 7 Data during heat %(OVC alarm ratio) O O O O 9 Composite speed for 1st,2nd,3rd axis Pulse(detection unit) O X X X Composite speed for all axes MM/MIN or RPM X X O X 10 Spindle speed %(max. spin ratio) O X X X rpm X X O X 11 Load meter for spindle %(max. output ratio) O X O X 12 Difference of spindle conversion error Pulse(detection unit) O X X X 13 on/off state of specified machine signal - O X O X - ch[n].u.axis
- axis information of waveform data
- Specify the axis information of waveform data.
- It is valid when the kind of waveform data is expect '13'.
- 0 invalidates the setting of its channel.
- Axis information are as follows.
- Series 15
-
Each bit according to the kind of waveform data is as follows.
Plural bits cannot be set.
In case that condition is 0/1/2, channel number 6, 7 are valid.
In case that condition is 100/101/102, channel number 0,..,3 are valid.
Channel 0 and 1, channel 2 and 3 must be set the same. If not, channel 0 and 2 is valid.
Maximum axis <= 15kind of waveform data 0 - 7 bit 0 ON : first axis designation bit 1 ON : second axis designation : bit 14 ON : 15th axis designation bit 15 : not used 9 bit 0 ON : first path designation bit 1 ON : second path designation(only 15TT) bit 2 - 15 : not used 10 - 11 bit 0 ON : first spindle designation bit 1 ON : second spindle designation bit 2 - 15 : not used
Maximum axis = 24kind of waveform data 0 - 7 bit 0 ON : first axis designation bit 1 ON : second axis designation : bit 22 ON : 23rd axis designation bit 23 ON : 24th axis designation bit 24 - 31 : not used 9 bit 0 ON : first path designation bit 1 ON : second path designation(only 15TT) bit 2 - 31 : not used 10 - 11 bit 0 ON : first spindle designation bit 1 ON : second spindle designation bit 2 - 31 : not used - Series 16/18, 16i/18i/21i, 0i
-
Each bit according to channel number is as follows.
channel 0 - 5The kind of waveform data 0 - 3, 5 - 7 bit 0 ON : first axis designation bit 1 ON : second axis designation : bit 7 ON : eighth axis designation bit 8 - 15 : not used
channel 6, 7The kind of waveform data 0 - 3, 5 - 7 bit 0 ON : first axis designation bit 1 ON : second axis designation : bit 7 ON : eighth axis designation bit 8 - 15 : not used 10 - 11 bit0 ON : first spindle designation bit1 ON : second spindle designation bit2 ON : third spindle designation bit3 - 15 : not used - ch[n].u.io.adr
- Kind of PMC address of machine signal
- Specify the kind of PMC address which corresponds to machine signal to trace with ASCII code.
- It is valid only when condition is 0/1/2 and the kind of waveform data is 13.
- Kind of stored PMC address : "G","F","Y","X"
- NULL(0x00) invalidates the setting.
- ch[n].u.io.bit
- bit number of machine signal
- Specify the bit number of PMC address which corresponds to machine signal to trace.
- It is valid only when condition is 0/1/2 and the kind of waveform data is 13.
- Range of stored bit number : 0 - 7
- ch[n].u.io.no
- number of PMC address of machine signal
- Specify the PMC address number which corresponds to machine signal to trace.
- It is valid only when condition is 0/1/2 and the kind of waveform data is 13.
- Range of specified number is shown in pmc_rdpmcrng function reference.
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 | ||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
(5) |
In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following detail status will be set onto the member, err_no of ODBERR structure.
(In case that a date is not related to channel, -1 is set) |
||||||||||||||||||||||||||||||||||||
(6) |
The extended driver/library function is necessary. |
||||||||||||||||||||||||||||||||||||
(9) |
3112#0=0 when CNC is turned on. set 3112#0=1 and reboot. |
||||||||||||||||||||||||||||||||||||
(13) |
The waveform diagnosis data is being sampled. |
As for the other return codes or the details, see "Return status of Data window function"
CNC option
For HSSB connection,
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 related to the following CNC parameter.
See the manual of CNC parameter for details.
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 | 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
cnc_rdwaveprm cnc_rdwaveprm2 cnc_wrwaveprm2 cnc_wavestart cnc_wavestop cnc_wavestat cnc_rdwavedata