PDA

View Full Version : Can SIOC sync switches?



hercules
10-25-2009, 12:19 PM
Hello together,

i use SIOC for my PM Cockpit or lomg time without problems. But for that problem i never found an answer and/ or solution.

Can SIOC sync the switch-positions with PMSYSTEMS? I tried different ways like the I,P,T Types within SIOC switch defintions, but no does work.

Has anybody an idea how it could work?

Regards

Thomas

kiek
10-25-2009, 04:33 PM
Hi,

Could you explain what you mean with can SIOC sync switches?

1) Do you mean that you would like SIOC to set the switches in PM systems according to the positions of your hardware switches?

2) And if answer to 1 is positive, do you want that syncronisation at start-up or always? (with always I mean if i chanage a switch in the panel with the mouse, should SIOC then roll back that action to the position of the hardware switch?).

Note that Type I or Type P is used to model a single throw on/of switch and a push button. That is no related to synchronisation with PM systems.

regards,
Nico

hercules
10-25-2009, 05:01 PM
Hello Nico,

yes your right! When i start start PMSystems, it never knows the positions of the hardware switches on the Overhead. PMSYSTEMS saves the last conditions prior it stops and expect exactly these positions on startup. But when the positions of any switches was changed for any reason, PM-Systems does not readout the new positions.

Nico....since you are a GURU in SIOC, do you have an answer to my second posting regarding the timer for A/T servos????

Have a nice evening

Thomas

kiek
10-26-2009, 06:07 AM
Hi,

This is one way you could do it:
Rather brute force, I admit, but it should work. It does not happen quite often in time that you set a switch (compared to the number of available cpu cycles ;-) )



Var 1 Link IOCARD_SW Input 23 Type I
{
CALL &SyncSwitches
}
Var 2 Link IOCARD_SW Input 25 Type P
{
CALL &SyncSwitches
}
Var 5 name SyncSwitches Link SUBRUTINE
{
v10 = v1
v11 = v2
// ...
}
var 10 Link FSUIPC_OUT Offset $wxyz Length mn // PM offset for a switch
var 11 Link FSUIPC_OUT Offset $wxyz Length mn // PM offset for a switch

// Call SyncSwitches also at start-up,
// either by detecting that your aircraft is loaded (FSUIPC offset):
var 20 Link FSUIPC_IN Offset $wxyz Length mn // Offset about aircaaft type loaded
{
// some comparion code here, and if it is your aircraft:
CALL &SyncSwitches
}
// or via a push button specific for this goal:
Var 1 Link IOCARD_SW Input 23 Type P // "hidden" buton to sync all switches
{
CALL &SyncSwitches
}

hercules
10-26-2009, 09:13 AM
Hey Nico,

you are unbelievable! Many people discused this topic without founding a way to realize it.

When it understand it correct, i can just use the subroutine and sync the switches with one button without insert the sync call in each switch var?! Or is the call in each switch var necessary?

Have you allready done a look to my A/T problem in the other thread? I dont want to be shameless, but you may have also a solution for this problem:-)

Have a nice day

Thomas

kiek
10-26-2009, 10:27 AM
When it understand it correct, i can just use the subroutine and sync the switches with one button without insert the sync call in each switch var?! Or is the call in each switch var necessary?

In each switch var a sync call is needed, this to take care of the normal situation that you change a hardware switch. The actual synchronisation is always done in that subroutine.

No I have not looked at your other 'problem' yet, too busy.