
3.SAFETY FUNCTIONS B-63494EN/02
- 38 -
Monitoring of abnormal state
If a mismatch between the state of the signal posted via the PMC and
the state of the signal posted via the FSSB lasts for a certain period of
time or more, the occurrence of a safety-related error is assumed. The
CNC CPU and the monitor CPU immediately shut off power to the
motor drive circuit independently of each other.
3.9.2 C Language Executor
For input/output of programmable safe-related I/O signals to and from
the monitor, use the C language executor library below.
CNC window call <HILEV>
[Function name] cnc_window
[Format] int cnc_window( unsigned int *iodata )
[Argument] iodata : Input/output data area
[Return value] A CNC window processing completion code is returned. This value is
the same one as stored in iodata[1].
[Description] A CNC window function is called.
iodata specifies an input/output data area for the CNC window
function. The pointer to this area is passed to the CNC window
processing. Set necessary information in this area with an application
program then call this function. Information returned by the CNC
window processing is stored in iodata.
A work RAM area required for the CNC window processing is
prepared within this function.
A general input/output area has the following data structure:
iodata[0] Function code
iodata[1] Completion code
iodata[2] Data length
iodata[3] Data number
iodata[4] Data attribute
iodata[5] and up Data area
For example, specify the following to call the function for "input of
alarm status":
unsigned int iodata[11] ;
iodata[0] = 23 ;
cnc_window( iodata ) ;
To iodata[5], CNC alarm information is returned.
High-level applications cannot call all CNC window functions. The
functions that can be called are listed below.
(1) Input of the number of the program currently being executed
(2) Input of the sequence currently being executed