MotoMax

![]() | ![]() | ![]() | ![]() |
Heavy Duty Motor Controller
- Overview
- Drivers
- Samples
- Projects
Heavy Duty Motor Controller
Key features • Screw terminal connections | Resources |
Function | Description |
---|---|
Init() | Initialize device |
Set(s, d, r) | Set Motor. s: Speed, range 0..100, d: Duration in ms, 0 forever, r: 0: Normal - 1: Revert |
DVer() | This driver version. |
The Code!
Modules ship with this script preloaded. Use Console to reload or modify the drivers. Additionally, some languages, such as Python, include DUELink.Engine.Record()
for recording scripts directly from the host.
# Pin 3,4: RPWM, LPWM
# Pin 5,6: R_EN, L_EN
# Pin 7,8: R_IS, L_IS
_r = 0
_l = 0
fn Init()
dwrite(5,1)
dwrite(6,1)
freq(3, 500, 0, 0)
freq(4, 500, 0, 0)
#IStart("RAlarm", 7, 1, 2) # Not work because https://github.com/ghi-electronics/duelink-fw/issues/154
#IStart("LAlarm", 8, 1, 2) # Not work because https://github.com/ghi-electronics/duelink-fw/issues/154
fend
fn RAlarm()
println("Detected current alarm on R_IS")
_r = 1
fend
fn LAlarm()
println("Detected current alarm on L_IS")
_l = 1
fend
fn IsRAlarm()
return _r
fend
fn IsLAlarm()
return _l
fend
fn ClrRAlarm()
_r = 0
fend
fn ClrLAlarm()
_l = 0
fend
fn Set(s, d, r)
# s: speed in 0 to 100%
# d: duration in ms, 0: forever
# r: 0: Normal, 1: Revert
if (r = 0)
freq(3, 500, d, 0)
freq(4, 500, d, s / 100)
else
freq(4, 500, d, 0)
freq(3, 500, d, s / 100)
end
fend
fn DVer()
return 0.1
fend
Init()
##### User Code Starts Here #####
- Script
- Python
- JavaScript
Use Console to modify the default driver by adding this sample.
# Append this code at the bottom of the script, right after the driver.
# You MUST keep the driver code!!
while 1
Set(50, 10000, 0)
Wait(10000)
Set(50, 10000, 1)
Wait(10000)
wend
from DUELink.DUELinkController import DUELinkController
import time
availablePort = DUELinkController.GetConnectionPort()
duelink = DUELinkController(availablePort)
//code
Coming soon!
Ordering Info
Description | Part Number | Price |
---|---|---|
MotoMax | GDL-ACMOTOMAX-A | $00.00 |