Quote Originally Posted by flyingasics View Post

Relay[1] = 14 'RB6
Relay[2] = 20 'RC4
Relay[3] = 26 'RD2
main:
' cycle through relays
for i = 1 to 3
x = relay[i]
serout2 porta.0[x], 8276, ["hello"]

Thanks!
Something I can't understand ...

Porta.0[14,20 or 26] ???

Also note relay[] can be a bit array...

May be some " select case " will do a better job here ...

Alain