User guide

82
VTB USER GUIDE
0 OFF
1 ON
WARNING: THE INDEX INPUT IS DIFFERENTIAL, THE ON STATE ON OCCURS WHEN ON CH+ THERE IS A VOLTAGE
GREATER THAN THE VOLTAGE ON CH- .
Example
if ng_t0(0)
. . .
endif
NG_RELE – RELE' NGMsX
This function allows to update the two RELAIS equipped in each expansion card NGMsx.
Usually these RELAIS are connected to the input ENABLE of the SERVO DRIVER but they can be managed for any
applications. The channel selection is made as for the reading of encoders.
Syntax
NG_RELE(Char Chan, char State)
Parameters
Chan Number of channel (from 0 to 5)
Stato State of the relay:
0 OFF (contact opened)
1 ON (contact closed)
Example
Used variables:
channel UINT
stato UINT
channel = 1
stato = 1
ng_rele(channel,stato) 'active the relay of the second channel
channel = 2
stato = 0
ng_rele(channel,stato) ‘disactive the relay of the third channel
ng_rele(0,1) ‘active the relay of the first channel