
------------------------------------------------------------------------------
1.57 Write P-code macro variable. <Main,Alarm>
------------------------------------------------------------------------------
[Name]
cnc_wrpmacro
[Syntax]
#include <data.h>
#include <fwindow.h>
short cnc_wrpmacro( long number, long mcr_val, short dec_val ) ;
[Arguments]
number P-code macro variable number. ( >= 10000 )
mcr_val P-code macro variable value.
dec_val Digit number after decimal point.
[Return]
EW_OK( 0) Successful.
EW_NUMBER( 3) Incorrect P-code macro variable number "number".
EW_NOOPT( 6) Macro executor option isn't added, or macro module
isn't loaded.
EW_BUSY(-1) An attempt was made to execute this command when other
window processing of a low-speed type was in progress.
Execute the command after the window processing has
ended.
[Description]
Writes the macro executor variable (P-code macro variable) data of
specified number.
This function is used for controlling flow of the machining program of
CNC or interactive macro function by the application program
exchanging data between the macro executor program in CNC and the
application program, etc.
Specify the P-code macro variable number to be written in "number"
with binary format.
Specify variable data to be written in both "mcr_val" and "dec_val".
mcr_val 4-byte singed binary format data.
(The negative value is represented as 2's
complement.)
Variable value converted into integer.
dec_val 2-byte signed binary format data.
(The negative value is represented as 2's
complement.)
Digit number after decimal point.