EasyManua.ls Logo

pitsco Tetrix Max - Page 14

pitsco Tetrix Max
22 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Description Function Coding Example (for controller ID = 1)
Set Motor Degrees
Implements velocity and positional PID
control to set the constant speeds and
the degree target holding positions of
both TETRIX DC Motor channels with
TETRIX encoders installed. Both Motor
1 and Motor 2 channel parameters are
set with a single statement. The speed
parameter range is 0 to 720 degrees
per second (DPS). The encoder degree
target position is a signed long integer
from -536,870,912 to 536,870,911 with
a 1-degree resolution.
setMotorDegrees(ID#, speed1,
degrees1, speed2, degrees2);
Data Type:
ID# = integer
speed1 = integer
degrees1 = long
speed2 = integer
degrees2 = long
Data Range:
speed1 = 0 to 720
degrees1 = -536870912 to 536870911
speed2 = 0 to 720
degrees2 = -536870912 to 536870911
setMotorDegrees(1, 180, 360, 180,
360);
Spin Motor 1 and Motor 2 at a constant
speed of 180 DPS until each motor
encoder degree count equals 360. When
a motor reaches its degree target count,
hold position in a servo-like mode.
setMotorDegrees(1, 360, 720, 90, 360);
Spin Motor 1 at a constant speed of 360
DPS until encoder 1 degree count equals
720. Spin Motor 2 at a constant speed
of 90 DPS until encoder 2 degree equals
360. Each motor will hold its position in
a servo-like mode when it reaches the
encoder target.
Set Motor Direction Invert
Inverts the forward/reverse direction
mapping of a DC motor channel. This
function is intended to harmonize
the forward and reverse directions
for motors on opposite sides of a
skid-steer robot chassis. Inverting
one motor channel can make coding
opposite-facing DC motors working
in tandem more intuitive. An invert
parameter of 1 = invert. An invert
parameter of 0 = no invert. The default
is no invert.
setMotorInvert(ID#, motor#, invert);
Data Type:
ID# = integer
motor# = integer
invert = integer
Data Range:
motor# = 1 or 2
invert = 0 or 1
setMotorInvert(1, 1, 1);
Invert the spin direction mapping of Motor
1.
setMotorInvert(1, 2, 1);
Invert the spin direction mapping of Motor
2.
setMotorInvert(1, 1, 0);
Do not invert the spin direction mapping
of Motor 1.
setMotorInvert(1, 2, 0);
Do not invert the spin direction mapping
of Motor 2.
Note: Non-inverting is the default on
power-up or reset.

Related product manuals