Class MotorDemo
- java.lang.Object
-
- org.deepjava.runtime.arm32.Task
-
- org.deepjava.runtime.zynq7000.demo.MotorDemo
-
- All Implemented Interfaces:
Iarm32
,Actionable
public class MotorDemo extends Task
Demo application for motor controller in sign magnitude mode.
Use the Maxon motor module with a RE-max13 and connect it as follows:- PWM A (Right): PWM, channel 0
- PWM B (Left): PWM, channel 1
- Encoder A: FQD, channel 0 A
- Encoder B: FQD, channel 0 B
-
-
Field Summary
-
Fields inherited from class org.deepjava.runtime.arm32.Task
done, firstErr, maxNofTasks, nextTime, nofActivations, period, periodNs, safe, time
-
Fields inherited from interface org.deepjava.runtime.arm32.Iarm32
ACTLR, CPACR, CPSR, D0, D1, D10, D11, D12, D13, D14, D15, D16, D17, D18, D19, D2, D20, D21, D22, D23, D24, D25, D26, D27, D28, D29, D3, D30, D31, D4, D5, D6, D7, D8, D9, FPSCR, ID_ISAR0, ID_ISAR1, ID_ISAR2, ID_ISAR3, LR, LR_ABT, LR_FIQ, LR_IRQ, LR_MON, LR_SVC, LR_UND, LR_USR, MIDR, MPIDR, MPUIR, PC, R0, R1, R10, R10_FIQ, R11, R11_FIQ, R12, R12_FIQ, R2, R3, R4, R5, R6, R7, R8, R8_FIQ, R9, R9_FIQ, S0, S1, S10, S11, S12, S13, S14, S15, S16, S17, S18, S19, S2, S20, S21, S22, S23, S24, S25, S26, S27, S28, S29, S3, S30, S31, S4, S5, S6, S7, S8, S9, SCTLR, SP, SP_ABT, SP_FIQ, SP_IRQ, SP_MON, SP_SVC, SP_UND, SP_USR, SPSR_ABT, SPSR_FIQ, SPSR_IRQ, SPSR_MON, SPSR_SVC, SPSR_UND
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
action()
Action to be performed by the taskstatic void
disableAutoMode()
Command: Disable automatic mode.static void
enableAutoMode()
Command: Enable automatic mode.static void
left10pi()
Command: Rotate motor with 5 turns per second in anticlockwise direction.static void
left2pi()
Command: Rotate motor with 1 turn per second in anticlockwise direction.static void
right10pi()
Command: Rotate motor with 5 turns per second in clockwise direction.static void
right2pi()
Command: Rotate motor with 1 turn per second in clockwise direction.static void
stop()
Command: Stop motor.
-
-
-
Method Detail
-
action
public void action()
Description copied from class:Task
Action to be performed by the task- Specified by:
action
in interfaceActionable
- Overrides:
action
in classTask
-
stop
public static void stop()
Command: Stop motor.
-
left10pi
public static void left10pi()
Command: Rotate motor with 5 turns per second in anticlockwise direction.
-
left2pi
public static void left2pi()
Command: Rotate motor with 1 turn per second in anticlockwise direction.
-
right10pi
public static void right10pi()
Command: Rotate motor with 5 turns per second in clockwise direction.
-
right2pi
public static void right2pi()
Command: Rotate motor with 1 turn per second in clockwise direction.
-
disableAutoMode
public static void disableAutoMode()
Command: Disable automatic mode.
-
enableAutoMode
public static void enableAutoMode()
Command: Enable automatic mode.
-
-