analog inputs

Forum for the OC4BA v2/v3 and OC4BAConfig including the OCP4NGX driver
fschrewe
Posts: 31
Joined: Tue Aug 13, 2013 3:22 pm

analog inputs

Post by fschrewe »

Hi,
I want to use some of the analog inputs mounted on Servo Cards, DCMotors cards and USB Outputscard for Spoilers and Flaps axes. To use these inputs I need a second entry for every card following the scheme: "USBAnalogic=XX,YY", where XX is the IDX number of the card and YY the number of the USB device.
OC4BAConfig doesn't add these lines, and every time I add them manually they are deleted by OC4BAConfig the next time I start the program.
Can you help?
Regards,
Frank Schrewe
mvr1918
Site Admin
Posts: 1704
Joined: Thu Aug 30, 2012 3:35 pm

Re: analog inputs

Post by mvr1918 »

Hi,

I am not sure I am right here, but..

Let say you already have your Servo card setup with IDX 36 as you are using the servo outputs already
isn't defining a script code as in this example:


Var 2513, name MAIN_BRT, Static


Var 57 name MAIN_BRT_POT, Link USB_ANALOGIC, Device 36, Input 1, posL 1, posC 128, posR 255
{
&MAIN_BRT = &MAIN_BRT_POT
}

Could you try that and tell me if you succeed. I haven't looked into this issue in dept, but this is how I thought it should work.

If this is not working I will find a way to solve it.

/Roar
fschrewe
Posts: 31
Joined: Tue Aug 13, 2013 3:22 pm

Re: analog inputs

Post by fschrewe »

Hi Roar,
sorry for the late reply.
I didn't have the time to test it until today. This morning I wanted to do the test and noticed that the Servo Card seems to be broken - I don't get it powered and it isn't recognised by SIOC anymore. So I'll have to wait with the test until a new card is shipped.
I will report back as soon as poosible...
Regards,
Frank Schrewe
fschrewe
Posts: 31
Joined: Tue Aug 13, 2013 3:22 pm

Re: analog inputs

Post by fschrewe »

Hi,
my new servo card just arrived. I startad a test, and the analog inputs are recognised by sioc monitor with the sioc.ini your tool provides. But for some reason the speed brake lever does not move. I tried to script this lever via FSUIPC as I couldn't find the parameters to use event number 2341. I know the analog input uses valoues 0-255 and FSUIPC 0-16384. What values have to be used for event 2341?
I tried it this way without success:

Var 9039, name spoil_ax, static, Link IOCARD_ANALOGIC, Device 39, Input 2, PosL 0, PosC 128, PosR 255 // spoiler axis

Var 9040, name spoil_v, Link FSUIPC_OUT, Offset $0BD0, Length 4 // spoiler value
{
&spoil_v = &spoil_ax * 64
}
Regards,
Frank Schrewe
mvr1918
Site Admin
Posts: 1704
Joined: Thu Aug 30, 2012 3:35 pm

Re: analog inputs

Post by mvr1918 »

Hi,

The parameter to use for Speedbrake (2341) is not stated, but try 0-100 ( as in T7 SDK)
the 2342+ vars defines som states to be used
UweN
Posts: 10
Joined: Wed Dec 10, 2014 5:45 pm

Re: analog inputs

Post by UweN »

Hi,

i hope everyone can help me.
After installing my Overhead and MIP, all works fine, no Problems.

Now i had the Intention to use the analogic inputs from MIP-Expansioncard (IDX31) for the
TrustLever, FlapsLever. I try to send the input to

2335 EVT_CONTROL_STAND_FWD_THRUST1_LEVER
2336 EVT_CONTROL_STAND_FWD_THRUST2_LEVER

but only the Link to FSUIPC $089 work, not to Var 2335.

Var 2335, name THR1_FSD, static
Var 0760, name THR1_FS, Link FSUIPC_OUT, Offset $089A, Length 4

Var 0761, name THR1, Link IOCARD_Analogic, Device 31, Input 3, PosL 0, PosC 127, PosR 255
{
// &THR1_FS =THR1_FS //to FSUIPC works
&THR1_FS =THR1_FSD // to OCP-Var it works not
}

At the IOCP Console the Value will Change at Var 3225.
The same Problem is with the Flaplevers.

What get's wrong?

Thanks Uwe
mvr1918
Site Admin
Posts: 1704
Joined: Thu Aug 30, 2012 3:35 pm

Re: analog inputs

Post by mvr1918 »

Var 0761, name THR1, Link IOCARD_Analogic, Device 31, Input 3, PosL 0, PosC 127, PosR 255
{
// &THR1_FS =THR1_FS //to FSUIPC works
&THR1_FS =THR1_FSD // to OCP-Var it works not
}

At the IOCP Console the Value will Change at Var 3225.
I am a little puzzled about the above lines?

I believe the 2nd line should be
$THR1_FSD = $THR1


The value of the analogic var 0761 named THR1 should be copied to the PMDG EVT_CONTROL_STAND_FWD_THRUST1_LEVER you have defined and named THR1_FSD.

AS the SDK do not have any list of parameter range that should be used with these Event, so you need to experiment to find the range. It could be 0-255, I really do not know.

Edited:

There seems to be some issues with these variables. They seems not to accept the values 0-255. At least they do not nothing when receiving values in this range.

I will look into this a come up with a fix.

I will be away for a week now, but if you ask PMDG on their forum which parameter values the EVT_CONTROL_STAND_FWD_THRUST1_LEVER accept, it would be easer to make an update
UweN
Posts: 10
Joined: Wed Dec 10, 2014 5:45 pm

Re: analog inputs

Post by UweN »

Hi,
is there enybody hwo connect the FlapLever to a Analogic Input?

What is the right Event and Value to set the Flaps?
I try somthing Events and Values but without success.

2325 EVT_CONTROL_STAND_FLAPS_LEVER
2326 EVT_CONTROL_STAND_FLAPS_LEVER_0
2327 EVT_CONTROL_STAND_FLAPS_LEVER_1
2328 EVT_CONTROL_STAND_FLAPS_LEVER_10
2329 EVT_CONTROL_STAND_FLAPS_LEVER_15
2330 EVT_CONTROL_STAND_FLAPS_LEVER_2
2331 EVT_CONTROL_STAND_FLAPS_LEVER_25
2332 EVT_CONTROL_STAND_FLAPS_LEVER_30
2333 EVT_CONTROL_STAND_FLAPS_LEVER_40
2334 EVT_CONTROL_STAND_FLAPS_LEVER_5
UweN
Posts: 10
Joined: Wed Dec 10, 2014 5:45 pm

Re: analog inputs

Post by UweN »

I have it. The right Values for the Flaps (Event 2325 - 2334) and Spoilers (Event 2342 - 2346) are -1 (Set) and 0.

Uwe.
mvr1918
Site Admin
Posts: 1704
Joined: Thu Aug 30, 2012 3:35 pm

Re: analog inputs

Post by mvr1918 »

Thanks for sharing this info to other users.
Post Reply