P
ar
t
2: C
omman
d
s
Moog Animatics SmartMotor™ Developer's Guide, Rev. L
Page 754 of 909
UJA
Bus Voltage
APPLICATION:
System
DESCRIPTION:
Gets (reads) the bus voltage applied to the motor's drive bridge
EXECUTION:
Immediate
CONDITIONAL TO:
N/A
LIMITATIONS:
Class 5 hardware can measure up to 100 volts; the voltage sup-
ply should not exceed 48 volts
READ/REPORT:
RUJA
WRITE:
Read only
LANGUAGE ACCESS:
N/A
UNITS:
millivolts (mV)
RANGE OF VALUES:
0 to 2147483647
TYPICAL VALUES:
0 to 48000
DEFAULT VALUE:
0
FIRMWARE VERSION:
5.x and later
COMBITRONIC:
RUJA:3; x=UJA:3
where ":3" is the motor address — use the actual address or a
variable
DETAILED DESCRIPTION:
The UJA command gets (reads) the bus voltage. The value returned is in millivolts. Therefore,
divide the value by 1000 to convert it to volts. For example, 24000 equals 24 volts.
The voltage is measured at the motor's drive bridge; it is not the "control" power supplied for
the CPU and electronics. If a DE motor is used, then this is an important difference. If a non-
DE motor is used, then both voltage supplies are effectively the same.
EXAMPLE:
VT
=100000
'Set maximum velocity
PT
=1000000
'Set final position
MP
'Set Position Mode
G
'Start motion
WHILE
Bt
'Loop while motion continues
IF
UJA
<18500
'If voltage is below 18.5 Volts
OFF
'Turn motor off
ENDIF
LOOP
'Loop back to WHILE
END
'Required END
Part 2: Commands: UJA