Hello,
I am goining to start a new topic:
The motor i am using is the DB87L01-S from NANOTEC
I want to use the module in stand allone mode with:
Analog input for speed on connection A1
Digital input turn right on connection O1
Digital input turn left on connection O2
I got so far:
SGP 77, 0, 1
SGP 253, 0, 8
SGP 250, 0, 12
SGP 249, 0, 0
SAP 159, 0, 0
SAP 128, 0, 1
SAP 11, 0, 0
SAP 147, 0, 1
SAP 6, 0, 500
LOOP: GIO 9, 0 // Get the state of digital input #0
JC NZ, L2 //Conditional jump to "SmallWay" if input #0 is high (not zero)
GIO 9, 1 // Get the state of digital input #1
JC NZ, L1 //Conditional jump to "SmallWay" if input #1 is high (not zero)
L1: SAP 157, 0, 50000 // set max. speed
JA END
L2: SAP 157, 0, -50000 // set max. reverse speed
JA END
END: JA LOOP //Jump to "Loop"
STOP
But I cant find a way to make the program scan for a different direction.
In other words: How can i make the program jump between L1 and L2 in the same LOOP?
Does the module understand plain c?
Like If and else statements?
With these settings the module turns hot and wil go in TEMP error. when it cools down, motor starts automaticly.
Thanks in advance
