hi guys,
i am a noob to the programming side of things, ive managed to do a few
things so far such as sending code from my seq software to my abb (with basic pro28)which then controls the ssc-32. it plays seq’s great, but now i am wanting to control these sequences with simple switches(I/0), does anyone have any code i could manipulate please? im goin nuts… iv tried to make my own code but no luck…
[code]**delay var byte
rate var byte
count1 var byte
delay=80
rate=40
startloop
button p4,0,delay,rate,count1,1,right
goto startloop
right
Steps Wordtable $03E8, $0BE8, $13E8, $1BE8, $23E8, $2BE8, $33E8, $3BE8, $43E8, $4BE8, $53E8, $5BE8, $63E8, $6BE8, $73E8, $7BE8, $83E8, $8BE8, $93E8, $9BE8, $A3E8, $ABE8, $B3E8, $BBE8, $C3E8, $CBE8, $D3E8, $DBE8, $E3E8, $EBE8, $F3E8, $FBE8, $F81F, $F81F, |
$07D0, $001F, $001F, |
$0FD0, $081F, $081F, |
$17D0, $101F, $101F, |
$1FD0, $181F, $181F, |
$27D0, $201F, $201F, |
$2FD0, $281F, $281F, |
$37D0, $301F, $301F, |
$3FD0, $381F, $381F, |
$47D0, $401F, $401F, |
$4FD0, $481F, $481F, |
$57D0, $501F, $501F, |
$5FD0, $581F, $581F, |
$67D0, $601F, $601F, |
$6FD0, $681F, $681F, |
$77D0, $701F, $701F
SeqPos Wordtable $0000, |
$004F
SeqIndex var Word
Index var Word
LastServo var Byte
TmpServo var Byte
TmpValue var Word
DejaVu var bit
LastServo = 99
DejaVu = 0
pause 500
Main
For SeqIndex = 0 to 0
For Index = SeqPos(SeqIndex) to SeqPos(SeqIndex + 1) - 1
TmpServo = Steps(Index) >> 11
TmpValue = Steps(Index) & 2047
if LastServo = TmpServo then
TmpValue = TmpValue << 5
if DejaVu then
Pause TmpValue
LastServo = 99
else
serout p0,i38400,“T”, DEC TmpValue, 13]
DejaVu = DejaVu ^ 1
endif
else
TmpValue = TmpValue + 500
serout p0,i38400,"#", DEC TmpServo, “P”, DEC TmpValue]
DejaVu = 0
LastServo = TmpServo
endif
next
next
goto Maingoto
startloop[/code]**
also, how would you plug in your I/O switches to the abb? iv been pluggin mine in P4 (push=1 release=O) with one wire on signal and one on positive?
oh im using 08.0.1.07 ide
please help