
------------------------------------------------------------------------------
1.56 Read P-code macro variable. <Main,Alarm>
------------------------------------------------------------------------------
[Name]
cnc_rdpmacro
[Syntax]
#include <data.h>
#include <fwindow.h>
short cnc_rdpmacro( long number, struct odbpm *buf ) ;
struct odbpm {
long datano ; /* P-code macro variable number. */
short dummy ; /* Not used. */
union {
struct {
long mcr_val ; /* P-code macro variable value. */
short dec_val ; /* Digit number after decimal */
/* point. */
} p6 ;
struct {
short mcr_val ; /* P-code macro variable value. */
short dec_val ; /* Digit number after decimal */
/* point. */
} p2 ;
} u ;
} ;
[Arguments]
number P-code macro variable number. ( >= 10000 )
buf Buffer in which the P-code macro variable data is
stored.
[Return]
EW_OK( 0) Successful.
EW_NUMBER( 3) Incorrect P-code macro variable number "number".
EW_DATA( 5) Value of the P-code macro variable is out of the limit.
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]
Reads 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.