Fanuc C-Executer Operating Manual
B-62443EN-3/03E
- 1019 -
------------------------------------------------------------------------------
16. Write setting parameter. (immediate writing) <Main,Alarm>
------------------------------------------------------------------------------
[Name]
cnc_wrset2
[Syntax]
#include <data.h>
#include <fwindow.h>
int cnc_wrset2( int length, struct iodbpsd *buf ) ;
struct iodbpsd {
int datano ; /* Setting parameter number. */
int type ; /* Axis number. */
union {
char cdata ; /* Bit/Byte parameter. */
int idata ; /* Word parameter. */
long ldata ; /* 2-Word parameter. */
char cdatas[N] ; /* Bit/Byte axis parameter. */
int idatas[N] ; /* Word axis parameter. */
long ldatas[N] ; /* 2-Word axis parameter. */
} u ; /* N is the amount of controlled*/
} ; /* axes. */
[Arguments]
length Data block length ( =4+(byte size of the setting
parameter)*(amount of axes to be read) )
buf Buffer in which the setting parameter is stored.
[Return]
0 Successful.
2 Incorrect data block length "length".
3 Incorrect setting parameter number "datano".
4 Incorrect axis number "type".
Any data other than -1, 0 or (1,..,amount of controlled axes)
has been specified.
5 Invalid value of the setting parameter to be written.
For example, when any data other than 0,..,3 was attempted to
write for I/O device number, this return code is returned.
-1 Attempted to execute this function while the other low-speed
window function is being executed.
Retry after completing currently executed window's process.
The condition to write parameter data is not satisfied.