User guide

88
VTB USER GUIDE
NGQ_INIT PROPERTY-NGQ and NGQx
The object provides a complete vision of all the software option to be set for the correct use of NGM13-NGMEVO.
In detali it allows to set:
Enabling of the communication protocol RPC (PROMAX proprietary), with relative baudrate
The step/dir axes to be used in interpolation mode
Property
Link RPC port Serial port RS232 on which enable the RPC protocol to manage an HOST PC
connection. These are the available options:
0 No RPC Link
1 RPC on serial port SER1/PROG (the DEBUG facilities will be disable and the
application download must be done by manual keys BOOT/RESET of the NGM13.
2 RPC on serial port SER2
Link RPC baud Baud rate to be used for RPC communication
P-P Interp. Mask Enabling mask of step/dir channel in interpolation mode. It is processed at bit.
Bit 0 Channel 0 in interpolation mode
Bit 1 Channel 1 in interpolation mode
Bit 2 Channel 2 in interpolation mode
Bit 3 Channel 3 in interpolation mode
STEP Level If value=1 the clock pulse is inverted for have more delay for pulse and dir signals
Some drives STEP have a high delay time from pulse and dir commutation
ENCODER Enable if Value=1 is enabled the Encoder Read in the NGQx and the analog outputs +/- 10V
in the NGQ
NG_DI - DIGITAL INPUTS NGM13 NGMEVO
This function allows to read the digital input of the NGM13-NGMEVO and its expansion cards: NGM-IO and NGM-PS.
The expansion cards are identified with a progressive number starting from 0. The first card is to consider the NGM13-
NGMEVO (index 0), the nearest expansion at that will have the index 1, and to follow the others.
Syntax
NG_DI(Char Card) as uint
Parameters
Card Index of the expansion card (from 0 to 7)
Return value:
Uint Value of 16 BITS of the input, if Bit is 1 the input is ACTIVE
Input
16
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1
Bit
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1
0
Example
Used variables:
input UINT
input = ng_di(0) read the digital inputs from the first card
input = ng_di(2) read the digital inputs from the second card