
------------------------------------------------------------------------------
1.22 Read actual spindle speed. <Main,Alarm>
------------------------------------------------------------------------------
[Name]
cnc_acts
[Syntax]
#include <data.h>
#include <fwindow.h>
short cnc_acts( struct odbact *buf ) ;
struct odbact {
short dummy[2] ; /* Not used. */
long data ; /* Actual spindle speed. */
} ;
[Arguments]
buf Buffer in which the actual spindle speed is stored.
[Return]
EW_OK( 0) Successful.
[Description]
Reads the actual rotational speed of the spindle connected to CNC.
The actual spindle speed data is stored in "buf.data" with unsigned
binary format.
[Example]
The following program displays "CURRENT S=2470" while the actual
rotational speed of the main spindle is 2470.
#include <data.h>
#include <fwindow.h>
#include <stdio.h>
void example( void )
{
struct odbact buf ;
cnc_acts( &buf ) ;
printf( "CURRENT S=%ld¥n", buf.data ) ;
}