bool32 b1
bool32 b2
bool32 b3
bool32 b4
int32.positive output
int32.positive enc
bool32.tgl latch index
spinner c1
spinner c2
spinner c3
spinner c4
int32.label enc
int index;
int combi;
index = 0;
combi = inlet_b1 + (inlet_b2 << 1) + (inlet_b3 << 2) + (inlet_b4 << 3);
if (combi == 1)
index = 1;
else if (combi == 2)
index = 2;
else if (combi == 4)
index = 3;
else if (combi == 8)
index = 4;
else if (combi == attr_c1)
index = 5;
else if (combi == attr_c2)
index = 6;
else if (combi == attr_c3)
index = 7;
else if (combi == attr_c4)
index = 8;
else if (!param_indexlatch)
index = 0;
outlet_out = index;
outlet_enc = combi;
disp_enc = combi;