EasyManua.ls Logo

pitsco TETRIX PULSE

pitsco TETRIX PULSE
146 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
Read Encoder Count
Reads the encoder count value. The
PULSE controller uses encoder pulse
data to implement PID control of a
TETRIX DC Motor connected to the
motor ports. The PULSE controller
counts the number of pulses produced
over a set time period to accurately
control velocity and position. Each 1/4
degree equals one pulse, or count, or
1 degree of rotation equals 4 encoder
counts. The current count can be
read to determine a motor’s shaft
position. The total count accumulation
can range from -2,147,483,648 to
2,147,483,647. A clockwise rotation
adds to the count value, while a
counterclockwise rotation subtracts
from the count value. The encoder
values are set to 0 at power-up and
reset.
readEncoderCount(enc#);
Data Type:
enc# = integer
Data Range:
enc# = 1 or 2
Data Type Returned:
value = long
readEncoderCount(1);
Read the current count value of encoder
1 (ENC 1 port).
readEncoderCount(2);
Read the current count value of encoder
2 (ENC 2 port).
Read Encoder Degrees
Reads the encoder degree value. The
PULSE controller uses encoder pulse
data to implement PID control of a
TETRIX DC Motor connected to the
motor ports. The PULSE controller
counts the number of pulses produced
over a set time period to accurately
control velocity and position. This
function is similar to the encoder count
function, but instead of returning the
raw encoder count value, it returns
the motor shaft position in degrees.
The total degree count accumulation
can range from -536,870,912 to
536,870,911. A clockwise rotation
adds to the count value, while a
counterclockwise rotation subtracts
from the count value. The encoder
values are set to 0 at power-up and
reset.
readEncoderDegrees(enc#);
Data Type:
enc# = integer
Data Range:
enc# = 1 or 2
Data Type Returned:
value = long
readEncoderDegrees(1);
Read the current degree count value of
encoder 1 (ENC 1 port).
readEncoderDegrees(2);
Read the current degree count value of
encoder 2 (ENC 2 port).
Reset Each Encoder
Resets the encoder count accumulator
to 0.
resetEncoder(enc#);
Data Type:
enc# = integer
Data Range:
enc# = 1 or 2
resetEncoder(1);
Reset the encoder 1 count to 0.
resetEncoder(2);
Reset the encoder 2 count to 0.
Reset Both Encoders (1 and 2)
Resets encoder 1 and encoder 2 count
accumulators to 0.
resetEncoders();
Data Type: None
resetEncoders();
Reset the encoder 1 count to 0 and
encoder 2 count to 0.
Appendix 137

Related product manuals