Thank you Pizman
Another way for me is to run SIOC together with MF and make the logic work via SIOC such that
Var 0001, name 5528, Link FSUIPC_INOUT, Offset $5528, Length 1
{
IF &5528 > 0
{
&3340 = SETBIT 0
}
ELSE
{
&3340 = CLEARBIT 0
}
}
My project is I have 4 microphones and 4 Push to talk switches. All microphones are routed to a single microphone connector (via relays) . THe idea is only one microphone PTT can be pressed at a time (pressing other three ptts will not have any effects on the relays)
so my inputs (PTT buttons B1,B2, B3 and B4 ) are via MEGA2560 and MF.
I decided to use a useless project magena offset the 5528 and my buttons are acting like
B1 pressed sets Bit0 of 5528 to 1, releasing B1 sets Bit0 of 5528 to 0
B2 pressed sets Bit1 of 5528 to 1, releasing B2 sets Bit1 of 5528 to 0
B3 pressed sets Bit2 of 5528 to 1, releasing B3 sets Bit2 of 5528 to 0 and
B4 pressed sets Bit3 of 5528 to 1, releasing B4 sets Bit3 of 5528 to 0 all these are fine
My OUTPUTS are as follows
OUT1 looks at Bit0 of 5528 and linked to a physical led/display output which is connected to a relay
OUT2 looks at Bit1 of 5528 and linked to a physical led/display output which is connected to a relay
OUT3 looks at Bit2 of 5528 and linked to a physical led/display output which is connected to a relay
OUT4 looks at Bit3 of 5528 and linked to a physical led/display output which is connected to a relay
All OUTs are reversed with compare function such that if cuırrent value = 0 set to 1 else set to 0 (this is needed for relays to remain unpowered during normal conditions)
All outs have preconditions such that
OUT1 preconditions is OUT2 and OUT3 and OUT4 =1
OUT 2 preconditions is OUT1 and OUT3 and OUT4=1
OUT 3 preconditions is OUT1 and OUT2 and OUT4=1
OUT 4 preconditions is OUT1 and OUT2 and OUT3=1
are your following me so far ?
So all I need now is if 5528>0 set bit0 of 3340 to 1 else set bit0 of 3340 to 0 (which is the offset for button input in FSUIPC, which is linked to a key which is linked to Vatsim software)
So said in the very beginning I am running a sioc script next to MF for the logic of 3340 and seems to work ok.
I hope to have clarified all
Best Regards from Istanbul
MFG
OKan Sacli
www.okansacli.com