Description
The channel data for the sampling of various data of Servo and Spindle are set.
As for the data which can be acquired, refer to channel.type in the arguments.
The position feedback pulse data of the Servo and the Spindle shows the summation value.(When the CNC was powered on, these value are "0".)
Sampling cycle of servo data is 0.25msec or 1msec. The one of spindle data is 1msec.
These functions cannot be simultaneously used with the Servo Guide or the Servo Guide Mate. In this case, these functions return EW_REJECT. |
The processing flow is as follows.
Universal Fanuc Driver
Fanuc Focas Library CD
Declaration
Arguments
Specify the library handle. See "Library handle" for details.
Specify the number of channels which wants to be sampled. Maximum channel numbers are "8".
However, the following limitations are in the data which can be acquired at the same time.
Servo axes | : | 4ch can be set to 1DSP(2 axes) |
Spindle axis | : | 2ch can be set to 1DSP(=1 spindle amplifier) |
Specify the number of total points of the data which wants to be sampled. (Specify the value of eight or more.)
If you wants to read data after all sampling ends, the maximum number which can be set is as follows.
setting channel numbers | max. points |
---|---|
1ch | 262144 |
2ch | 131072 |
3ch | 87376 |
4ch | 65536 |
5ch | 52424 |
6ch | 43688 |
7ch | 37448 |
8ch | 32768 |
So, when the sampling data of each 10msec is necessary, the following numbers can be sampled.
setting channel numbers | sampling points |
---|---|
1ch | 23300 |
2ch | 12335 |
3ch | 8387 |
4ch | 6353 |
5ch | 5242 |
6ch | 4368 |
7ch | 3744 |
8ch | 3276 |
In case that data is serially read during the sampling execution, this limitation does not exist.
When -1 is specified, the limitation of a total number is lost.
Please serially read the data by the sampling data reading function(cnc_sdtreadsmpl).
When the reading buffer is filled, the sampling data reading function returns EW_BUFFER.
Pointer to the IDBSFBCHAN structure including the channel data.
Prepare the number of the channel data which you want to set as an array, and specify the top pointer of the array for this argument(channel).
The structure of IDBSFBCHAN is as follows.
typedef struct idbsdtchan {
short type; /* data type */
char chno; /* channel number */
char axis; /* axis number */
unsigned short shift; /* upper byte : sampling cycle,
lower byte : right shift amount */
} IDBSDTCHAN;
- type
- Specify the sampling data type.
- In case of positive value(sampling axis is servo):
- type=14-17, 19-22 are avilable on 90B1/06 or later and 90BP/01 or later.
- In case of negative value(sampling axis is spindle):
Value | The sampling data type |
The unit of the sampling data (In case of shift's lower byte=0) |
note | ||
---|---|---|---|---|---|
0 | Summation of position feedback pulse data (POSF) | 1 | = Detection unit(1 pulse) |
|
|
1 | Position error (ERR) | 1 | = Detection unit(1 pulse) |
|
|
2 | Velocity command (VCMD) | 16,777,216 |
= 3750min-1 (In case of shift = 9 : 32768=3750min-1) |
|
|
3 | Torque command (TCMD) | 7,282 | = The maximum current value of amplifier (A) |
|
|
4 | Speed feedback signal (SPEED) | 262,144 |
= 3750min-1 (In case of shift=3 : 32768=3750min-1) |
|
|
5 | Estimated disturbance torque (DTRQ) | 7,282 | The maximum current value of amplifier (A) |
|
|
6 | Synchronous error on rigid tapping (SYNC) | 1 | = 1/4096 rotation of spindle |
|
|
7 | OVC simulation data (OVCLV) | 1 | = 1% |
|
|
8 | Effective current (IEFF) | 6,554 | = The maximum current value of amplifier (A) |
|
|
9 | DC link voltage(VDC) | 8,192 | = 640V (200V) or 1280V (400V) |
|
|
10 | Semi-Full error(SFERR) | 1 | = Detection unit(1 pulse) |
|
|
11 | Analog signal command(ALGCMD) | 32,767 |
= 100% (Maximum analog signal command) (In case of pressure and position control : Maximum pressure command value) |
Pressure command in case of pressure and position control (90BP only) | |
12 | Analog signal feedback(ALGFB) | 32,767 |
= 100% (Maximum analog signal feedback) (In case of pressure and position control : Maximum pressure detecting value) |
Pressure feedback in case of pressure and position control (90BP only) | |
13 | R-phase current(IR) | 6,554 | = The maximum current value of amplifier (A) |
|
|
14 | R-phase current(PDM slave1)(IR1) | 6,554 | = The maximum current value of amplifier (A) |
|
|
15 | R-phase current(PDM slave2)(IR2) | 6,554 | = The maximum current value of amplifier (A) |
|
|
16 | R-phase current(PDM slave3)(IR3) | 6,554 | = The maximum current value of amplifier (A) |
|
|
17 | R-phase current(PDM slave4)(IR4) | 6,554 | = The maximum current value of amplifier (A) |
|
|
18 | S-phase current(IS) | 6,554 | = The maximum current value of amplifier (A) |
|
|
19 | S-phase current(PDM slave1)(IS1) | 6,554 | = The maximum current value of amplifier (A) |
|
|
20 | S-phase current(PDM slave2)(IS2) | 6,554 | = The maximum current value of amplifier (A) |
|
|
21 | S-phase current(PDM slave3)(IS3) | 6,554 | = The maximum current value of amplifier (A) |
|
|
22 | S-phase current(PDM slave4)(IS4) | 6,554 | = The maximum current value of amplifier (A) |
|
|
23 | Reactive current(ID) | 8,027 | = The maximum current value of amplifier (A) |
|
|
24 | Active current(IQ) | 8,027 | = The maximum current value of amplifier (A) |
|
|
25 | Motor winding temperature(MTTMP) | 1 | 1 degrees centigrade |
|
|
26 | Pulsecoder temperature(PCTMP) | 1 | 1 degrees centigrade |
|
|
27 | Velocity command without FF(VCOUT) | Same as VCMD |
|
||
28 | Advanced velocity command(VCC0) | Internal unit(not open) |
|
||
29 | Backlash acceleration amount(BLACL) | Internal unit(not open) |
|
||
30 | Absolute position detected internal pulse coder(ABS) | 1 | = 1/2^21 rotation |
|
|
31 | Vibration frequency(FREQ) | 1 | = 1Hz |
|
|
32 | Vibration torque command(FRTCM) | 7,282 | = The maximum current value of amplifier (A) |
|
|
33 | DC link voltage(VDC) |
|
|
Same as type=9 | |
34 | Acceleration feedback in direction specified by No.2277#7,6,5(ACC) | 512 | = 0.1G = 0.98m/s^2 | In case of aiGS0.1-3D (0.1G) | |
4096 | = 1G = 9.8m/s^2 | In case of aiGS1-3D (1G) | |||
35 | 1st direction acceleration feedback(ACC1) | 512 | = 0.1G = 0.98m/s^2 | In case of aiGS0.1-3D (0.1G) | |
4096 | = 1G = 9.8m/s^2 | In case of aiGS1-3D (1G) | |||
36 | 2nd direction acceleration feedback(ACC2) | 512 | = 0.1G = 0.98m/s^2 | In case of aiGS0.1-3D (0.1G) | |
4096 | = 1G = 9.8m/s^2 | In case of aiGS1-3D (1G) | |||
37 | 3rd direction acceleration feedback(ACC3) | 512 | = 0.1G = 0.98m/s^2 | In case of aiGS0.1-3D (0.1G) | |
4096 | = 1G = 9.8m/s^2 | In case of aiGS1-3D (1G) | |||
38 | Vibration velocity command(FRVCM) | Same as VCMD |
|
||
39 | Backlash compensation(BLCMP) | 1 | = Detection unit(1 pulse) |
|
|
40 | Backlash acceleration amount 1(BLAC1) | Internal unit(not open) |
|
||
41 | Backlash acceleration amount 2(BLAC2) | Internal unit(not open) |
|
||
42 | Smart backlash compensation (position compensation amount)(SMTBKL) | 1 | = Detection unit(1 pulse) |
|
|
43 | Estimated load torque for Smart backlash compensation(SMTTRQ) | 7282 | = The maximum current value of amplifier (A) |
|
|
44 | Compensation amount of smart backlash (for full-closed)(SMTBAC) | 1 | = Detection unit(1 pulse) |
|
|
45 | Analog signal offset(ALGOFS) | -32000 - 0 - 32000 | = -10V - 0V - +10V | In case of Voltage input(AIM) | |
-32768 - 0 - 32767 | = 0mA - 12.5mA - 25mA | In case of current input(AMU) | |||
46 | Analog signal offset 2(ALGOF2) | Same as ALGOFS |
|
Value | The sampling data type |
The unit of the sampling data (In case of shift's lower byte=0) |
note | |
---|---|---|---|---|
0 | Summation of position feedback pulse data (CSPOS) | 360,000 pulses | = 1 rotation(In case of No.4005#0=0) |
|
3,600,000 pulses | = 1 rotation(In case of No.4005#0=1) | |||
1 | Moter speed (SPEED) | 4,096 | = 1min-1 |
|
2 | Torque command (TCMD) | 16,384 | = Maximun moter torque |
|
3 | Moter speed command (VCMD) | 4,096 | = 1min-1 |
|
4 | Position error (ERR) | At Cs: |
|
|
360,000 pulses | = 1 rotation(In case of No.4005#0=0) | |||
3,600,000 pulses | = 1 rotation(In case of No.4005#0=1) | |||
Others: | ||||
4,096 pulses | = 1 rotation | |||
5 | Load meter data (LMDAT) | 32,768 | = 10 Volts |
|
6 | Spindle load torque (DTRQ) | 16,384 | = Maximun moter torque |
|
7 | Amplitude of moter current (INORM) | Changed with the kind of the motor and the amplifier. |
|
|
8 | Moter winding temperature (MTTMP) | 1 | = 1 degree |
|
9 | Spindle axis power consumption(EPMTR) | 1 | = 10kW (In case of No.4541#2,#1=0,0) |
When you get this data, the setting of the power consumption monitor function is necessary.(No.4541#0=1 etc.) Refer to the "Power consumption monitor Specifications(A-92737E etc.)" for detail. (Series 9D80 or later) Note) type=9 will become valid at 9D80/T(20) or later(plan). |
1 | = 1kW (In case of No.4541#2,#1=0,1) | |||
1 | = 0.1kW (In case of No.4541#2,#1=1,0) | |||
1 | = 0.01kW (In case of No.4541#2,#1=1,1) | |||
10 | Frequency of disturbance torque(FREQ) | 1 | = 1Hz |
|
11 | Gain data(GAIN) | 4096 | = 100% |
|
12 | Torque command 2(TCMD2) | 16,384 | = Maximun moter torque |
|
13 | A/D data of motor sensor (A phase)(PA1) | 65536 | = 1.48V |
|
14 | A/D data of motor sensor (B phase)(PB1) | 65536 | = 1.48V |
|
15 | A/D data of spindle sensor (A phase)(PA2) | 65536 | = 1.48V |
|
16 | A/D data of spindle sensor (B phase)(PB2) | 65536 | = 1.48V |
|
17 | Velocity error(VERR) | 4096 | = 1min-1 |
|
18 | Spindle speed(SPSPD) | 4096 | = 1min-1 |
|
19 | Present value of loadmeter (Normalized by cont. rated output(LMDTC) | 1 |
= 1% 100% is equivalent to continuous rated output. |
|
20 | Maximum value of loadmeter at the present speed (Normalized by cont. rated output)(LMMAX) | 1 |
= 1% 100% is equivalent to continuous rated output. |
|
21 | Duration time for cutting(DURTM) | 1 | = 1sec |
|
- chno
- Specify the channel number(1-8).
- axis
- Specify the sampling axis number.
- Specify the logical axis number which is allocated to the entire paths of CNC system.
- The axis number is not the relative axis number of each path.
- (It is the same as the order of CNC parameter No.981(Spindle axis is No.982).)
Servo axis number | : | 1 to 32 |
Spindle axis number | -1 to -8 |
- shift
- Specify sampling period at upper byte and right shift value at lower byte.
- Specify sampling period at upper byte as follows.
-
0 : 1msec 2 : 0.25msec
- * 0.25msec can be set in case of servo data. In case of setting any value except 0 to shift's upper byte, EW_DATA(5)(No.24 for detail) is returned.
- * In case of difference of sampling period of servo between channels, EW_DATA(5)(No.24 for detail) is returned. Make the same sampling period of servo between channels.
- * In case of setting under the following conditions simultaneously, EW_DATA(5)(No.3 for detail) is returned.
-
- 0.25msec(Sampling period of servo)
- 1msec (Sampling period of spindle)
- any normal value except -1(The number of total points of sampling data to read(per one channel), datanum)
- In case of setting channel of servo(Sampling period : 0.25msec) and spindle(Sampling period : 1ms) at the same time, set the number of total points which wants to be sampled(per one channel), datanum to -1 and execute process of count the number of reading data and of end of sampling in program.
- Specify the right shift amount(0-15) for the sampling data at lower byte.
- The sampling data acquired by specifying this data is as follows.
-
In case of shift = 0 : 1 detection unit(or 1 rotation) In case of shift = 1 : 2 detection units In case of shift = 2 : 4 detection unit : In case of shift = 7 : 128 detection units : In case of shift = 15 : 32,768 detection units
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 | |||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
(3) |
Channel number(num) data is wrong. |
|||||||||||||||||||||
(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.
|
|||||||||||||||||||||
(11) |
Path which is corresponding to specified sampling axis number (axis) does not exist. |
|||||||||||||||||||||
(13) |
Sampling is already starting. Execute this function again after executing of cnc_sdtcancelsmpl or cnc_sdtendsmpl. |
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 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.
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 | O |
"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_sdtclrchnl cnc_sdtstartsmpl cnc_sdtcancelsmpl cnc_sdtreadsmpl cnc_sdtendsmpl cnc_sdtread1shot