Description
Reads waveform diagnosis data.
In case of using this function, the waveform diagnosis screen of CNC must not be used.
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.
Specify the channel number to be read.
Series 15 | : | 0,..,3, 6,..,11 |
Series 15i | : | 0,..,3, 8,..,11 |
Series 16/18, 16i/18i/21i, 0i | : | 0,..,7 |
Series 16i/18i-W | : | 6, 7 |
Specify axis number of data to be read.(1 to number of controlled axis)
This is invalid except channel number 0 to 5.
In case of Series 16/18, 16i/18i/21i, 0i, and Series 15/15i, 16i/18i-W,
this is not used.
Specify the start pointer to read.
example)
In case of the top, '0' should be specified.
In case of the 10th from the top, '9' should be specified.
Specify the address of the variable which shows the number of data
of the waveform diagnosis data.
Set the read number of data to this variable(*number).
After executing this function, the number of data which has been read actually is set.
The maximum data number which can be sampled is shown in the following table according to the condition and the CNC MODEL.
MODEL | Series 16/18, 16i/18i/21i, 0i | Series 15 | Series 15i | ||
---|---|---|---|---|---|
condition | 0/1/2 | 100/101/102 | 0/1/2 | 100/101/102 | |
maximum number(n) | 4096 | 8192 | prm.15#6= 0:1000 1:5000 |
2000 | 5001 |
Pointer to the ODBWVDT structure including the waveform diagnosis data.
The ODBWVDT structure is as follows.
typedef struct odbwvdt {
short channel ; /* channel number */
short kind ; /* kind of waveform data */
union {
short axis ; /* axis number of waveform data */
struct { /* machine signal */
char adr ; /* kind of PMC address */
char bit ; /* bit number */
short no ; /* PMC address number */
} io ;
} u ;
char year ; /* year (0<->99) */
char month ; /* month (1<->12) */
char day ; /* day (1<->31) */
char hour ; /* hour (0<->23) */
char minute ; /* minute (0<->59) */
char second ; /* second (0<->59) */
short t_cycle ; /* sampling cycle (msec) */
short data[8192] ; /* waveform diagnosis data */
} ODBWVDT ;
- channel
- channel number
- The channel number which has been read actually is set.
- kind
- kind of waveform data
-
Refer to the kind of waveform data in cnc_rdwaveprm function.
- In case that "kind" is except 13(machine signal)
- axis
- axis number of waveform data( Series 15/15i )
axis number of waveform data 0,..,7 1 to number of controlled axis : axis number 9 1 to number of path : path number 10,..,11 1 to number of spindle : spindle number - axis number of waveform data( Series 16/18, 16i/18i/21i, 0i )
channel number kind of waveform data 0,..,5 1,..,number of controlled axis : axis number 6, 7 0,..,3, 5,..,7 1,..number of controlled axis : axis number 6, 7 10, 11 1,..number of spindle : spindle number - In case that "kind" is 13(machine signal)
- adr
- kind of PMC address of machine signal
- The kind of the PMC address which is traced is stored with ASCII code.
- kind of PMC address to be set : G, F, Y, X
- bit
- bit number of machine signal
- The bit number of PMC address which is traced is stored.
- range of bit number which is stored : 0,..,7
- no
- number of PMC address of machine signal
- The PMC address number which is traced is stored.
- The range of stored number is shown in pmc_rdpmcrng
- year, month, day, hour, minute, second
- If condition is 0,..,20, these are the date when sampling is started.
- If condition is 100,..,120, these are the date when sampling is stopped.
year Year (0,..,99) month Month (1,..,12) day Day (1,..,31) hour Hour (0,..,23) minute Minute (0,..,59) second Second (0,..,59) - t_cycle
- sampling cycle (msec)
MODE Series 16/18, 16i/18i/21i, 0i Series 15 Series 15i condition 0/1/2 100/101/102 0/1/2 100/101/102 kind is except 13 kind is 13 cycle 2 8 2/4/8/16 8 2/4/8/16 8/16 - data
- waveform diagnosis data
- The data which is specified by "kind" is stored.(In case of kind=13, this is 0/1. Othewise, this is binary data)
- Concerning the unit, etc., refer to the kind of the waveform data in cnc_rdwaveprm function.
Summary of the reading data
- In case that "kind" is except 13(machine signal)
- In case that "kind" is 13(machine signal)
structure membar | size | kind | effecitve range(binary) |
---|---|---|---|
channel | 2 | channel number | 0,.., |
kind | 2 | kind of waveform data | 0,..,12 |
axis | 2 | axis number of waveform data | 1,..,number of controlled axis |
(dummy) | 2 | ||
year | 1 | year | 0,..,99 |
month | 1 | manth | 1,..,12 |
day | 1 | day | 1,..,31 |
hour | 1 | hour | 0,..,23 |
minute | 1 | minute | 0,..,59 |
second | 1 | second | 0,..,59 |
t_cycle | 2 | sampling cycle | 2/4/8/16(ms) |
data[0] | 2 | waveform diagnosis data | |
data[1] | 2 | waveform diagnosis data | |
: | : | : | |
data[n-1] | 2 | waveform diagnosis data |
structure member | size | kind | effecitve range(binary) |
---|---|---|---|
channel | 2 | channel number | 6,.., |
kind | 2 | kind of waveform data | 13 |
adr | 1 | kind of PMC address of machine signal | ASCII code(G,F,Y,X) |
bit | 1 | bit number of machine signal | 0,..,7 |
no | 2 | PMC address number | 0,.., |
year | 1 | year | 0,..,99 |
month | 1 | manth | 1,..,12 |
day | 1 | day | 1,..,31 |
hour | 1 | hour | 0,..,23 |
minute | 1 | minute | 0,..,59 |
second | 1 | second | 0,..,59 |
t_cycle | 2 | sampling cycle | 2/4/8/16(ms) |
data[0] | 2 | waveform diagnosis data | 0 or 1 |
data[1] | 2 | waveform diagnosis data | 0 or 1 |
: | : | : | : |
data[n-1] | 2 | waveform diagnosis data | 0 or 1 |
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) |
cnc_wavestop function has not been executed. |
(2) |
The number of data(*number) is less than 1. |
(3) |
Channel number(channel) is out of range. |
(4) |
Axis number(axis) is out of range. |
(5) |
Start pointer to read(rd_pntr) is out of range. |
(6) |
The extended driver/library function is necessary. |
(9) |
3112#0=0 when CNC is turned on. set 3112#0=1 and reboot. |
(10) |
There is no specified waveform diagnosis data. (The case that the condition of a waveform diagnosis does not correspond to the specified channel number is included.) |
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_wrwaveprm cnc_wrwaveprm2 cnc_wavestart cnc_wavestop cnc_wavestat