N@Textaporter Storage 1-4
I@Resync Resync1 X1a Y1b Z1c X2d Y2e Z2f X3g Y3h Z3a X4b Y4c Z4d
O@Xa1 Yb1 Zc1 Xd2 Ye2 Zf2 Xg3 Yh3 Za3 Xb4 Yc4 Zd4 Sync Send
Command=recv(Resync,1),Clear=recv(Resync,3)
A=recv(Resync1,1),B=recv(Resync1,2)
C=recv(Resync1,3),D=recv(Resync1,3)
A1=(Command==1 & A==1),B1=(Command==1 & B==1),C1=(Command==1 & C==1),D1=(Command==1 & D==1)
X=recv(Resync1,10),Y=recv(Resync1,11),Z=recv(Resync1,12)
A1==1 -> Xa1=X,Yb1=Y,Zc1=Z;
B1==1 -> Xd2=X,Ye2=Y,Zf2=Z;
C1==1 -> Xg3=X,Yh3=Y,Za3=Z;
D1==1 -> Xb4=X,Yc4=Y,Zd4=Z;
Clear & A -> Xa1=0,Yb1=0,Zc1=0;
Clear & B -> Xd2=0,Ye2=0,Zf2=0;
Clear & C -> Xg3=0,Yh3=0,Za3=0;
Clear & D -> Xb4=0,Yc4=0,Zd4=0;
Sync = send(Xa1,Yb1,Zc1,Xd2,Ye2,Zf2,Xg3,Yh3,Za3,Xb4,Yc4,Zd4)
Send=0
A==1 | B==1 | C==1 | D==1 -> Send=1;