PDA

View Full Version : This script driving me crazy



verticallimit
03-07-2010, 05:15 PM
Hi,
Please a little bit help

This script for Open cockpit is about to drive me crazy.
This is the first attempt to manage Flight Director 1 and Flight Director 2.
They work fine individually, but goes in and locks for each other, so that sometimes the FD1 toggle switch as to be toggled several times to switch in the software. then it works perfectly, but then the second toggle contact is blocked, so it must be toggled several times before it works.

//********** FLIGHT DIRECTOR 1 **************

VAR 1390, NAME CONTROLFD, Link FSUIPC_OUT, Offset $3110, Length 4
VAR 1391, NAME FS_FD1, LINK FSUIPC_OUT, offset $3114, Length 4

VAR 1392, name AP_FD1_SET, Link IOCARD_SW, Input 13, TYPE 1

{
&FS_FD1 = &AP_FD1_SET
&CONTROLFD = 69651
&CONTROLFD = DELAY 0 5
}


//********** TEST TEST TEST TEST TEST**************

VAR 9380, NAME CONTROL, Link FSUIPC_OUT, Offset $3110, Length 4
VAR 9381, NAME FS_PAR, LINK FSUIPC_OUT, offset $3114, Length 4

VAR 9390, name FDL, Link IOCARD_SW, Input 14, TYPE 1
{
&FS_PAR = &FDL
&CONTROL = 69652
&CONTROL = DELAY 0 5
}

//********** TEST TEST TEST TEST TEST**************

I have also tried to use the same variable 1390 and 1391 on both FD1 and FD2, but it gave the same result.

If I can get this to work, I can manage all electrical switches in the cockpit in this way because I have all FSUIPC offset numbers

------------------------------------------------
www.md80project.dk

fordgt40
03-07-2010, 05:30 PM
Claus

Are you sure that your coding for the switch type is correct ie TYPE 1 (one)? Latching switches ie toggles are TYPE I and momentary push button switches are TYPE P

Regards

David

verticallimit
03-07-2010, 05:43 PM
Claus

Are you sure that your coding for the switch type is correct ie TYPE 1 (one)? Latching switches ie toggles are TYPE I and momentary push button switches are TYPE P

Regards

David

Hi David

The FD switch in the MD-80 is a latching switch.

fordgt40
03-07-2010, 05:48 PM
Claus

Have you tried using TYPE I (letter I) instead of TYPE 1 (number one)?

Edit - Claus, I have just checked my sioc files and I have used TYPE T for toggle switches. Sorry for any confusion, but when faced with the problems that you mentioned, I have often found that the solution lies with the TYPE function

Regards

David

verticallimit
03-08-2010, 09:26 AM
Hi David

Thanks for the support.
Have now tried with T and I, and i did not help. I stil have the same problem.

fordgt40
03-08-2010, 10:52 AM
Claus

Sorry that it did not work! I am not clear about what you are trying to achieve with the script, but suggest that you use the log function within IOCPCOSOLE to see what is happening and that should help you solve it

Regards

David

verticallimit
03-18-2010, 03:25 PM
Then I succeed. it helps to make some other tasks in between, and come back to it with a different perspective.
The script is now as follows

VAR 9381, LINK FSUIPC_OUT, offset $3114, Length 4
Var 9380, NAME IN10, Link IOCARD_SW, Input 10, TYPE T
{
V9381 = &IN10
&CONTROL = 69831
&CONTROL = DELAY 0 15
}

VAR 9392, LINK FSUIPC_OUT, offset $3114, Length 4
Var 9391, NAME IN0, Link IOCARD_SW, Input 0, TYPE T
{
V9392 = &IN0
&CONTROL = 69843
&CONTROL = DELAY 0 15
}

Var 9379, NAME CONTROL, Link FSUIPC_OUT, Offset $3110, Length 4


But another question, can I get data out of fsuipc offset 3110 / 3114, or can only write to these offsets I have tried but without success.

_______________________
http://www.md80project.dk