Relay P16
- Overview
- Drivers
- Samples
- Projects
16 Port Relay Controller
Key features • 16 Screw terminal ports | Resources 📄Schematics |
Function | Description | Use |
---|---|---|
Set(index, value) | index: start from 1 to 16. Value 1: On, 0: Off | |
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.
##### Driver Code Starts Here ###
fn Send(r, v)
if v = 1
dwrite(r, 0)
else
dread(r, 0)
end
fend
fn Set(r, v)
if (r = 1)
Send(11, v)
end
if (r = 2)
Send(7, v)
end
if (r = 3)
Send(8, v)
end
if (r = 4)
Send(9, v)
end
if (r = 5)
Send(6, v)
end
if (r = 6)
Send(5, v)
end
if (r = 7)
Send(4, v)
end
if (r = 8)
Send(3, v)
end
if (r = 9)
Send(2, v)
end
if (r = 10)
Send(1, v)
end
if (r = 11)
Send(12, v)
end
if (r = 12)
Send(13, v)
end
if (r = 13)
Send(15, v)
end
if (r = 14)
Send(14, v)
end
if (r = 15)
Send(16, v)
end
if (r = 16)
Send(10, v)
end
fend
fn DVer()
return 0.1
fend
##### 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(2, 1) # turn on relay 2
wait(1000)
Set(2, 0) # turn off relay 2
wait(2000)
wend
from DUELink.DUELinkController import DUELinkController
import time
availablePort = DUELinkController.GetConnectionPort()
duelink = DUELinkController(availablePort)
//code
Coming soon!
Ordering Info
Description | Part Number | Price |
---|---|---|
Relay P16 | GDL-ACRELAYP16-A | $00.00 |