Page 2 of 4 FirstFirst 1234 LastLast
Results 11 to 20 of 37
  1. #11
    150+ Forum Groupie


    Perik's Avatar
    Join Date
    Aug 2007
    Location
    NORWAY
    Posts
    193
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: SIOC and Offset 023A

    Jack

    The "Endless timer" example from Nico works great at my end.
    &control will never change but the timer works great anyway.

    Extend the code this way:
    Code:
    Var 0 Value 0
    
     {
       &control = 0
       &control = TIMER 1 0 5
     }
    Var 10 name Counter Value 0
    
    Var 1 name control Link SUBRUTINE
    {
    &Counter = &Counter + 1
       // regular control work in here (is called every 50 msec)
    }
    And check &Counter in IOCP Console and you'll see it increments like a dream

    BTW - $049C seems to be another "wrong" FSUIPC offset.
    Regards,
    Per-Erik
    www.hoddo.net

  2. #12
    500+ This must be a daytime job kiek's Avatar
    Join Date
    Jan 2007
    Location
    Netherlands
    Posts
    698
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: SIOC and Offset 023A

    Hi Guys,

    It is indeed 'by design' that the control variable stays 0 in my endless timer example. Simply because the increment is 0... so control stays endless 0 and never reaches 1.... but the Timer works flawlessly and calls the control subroutine every 50 ms.



    Nico

  3. #13
    500+ This must be a daytime job Boeing 747 Flyer's Avatar
    Join Date
    Nov 2009
    Location
    England
    Posts
    635
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: SIOC and Offset 023A

    Thank you everyone.

    I was under the impression that, after starting a timer, &control would change values as it counts up. As long as it calls the Subroutine; I don't care !!!

    PS: Does anyone know how to define the Potentiometers from the USBDCMotors card in SIOC? They are defined in my SIOC.ini as "USBAnalogic, Device 0,38". I do, however, have Potentiometers connected to my USBEXpansion card; so how do I differentiate between the two devices?

    PS2: I haven't done any SIOC scripting in about 6 months; sorry if I'm a little rusty!

  4. #14
    500+ This must be a daytime job



    Join Date
    Jul 2013
    Posts
    917
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: SIOC and Offset 023A

    Jack

    Surely not so rusty that the "help file" has also seized up to

    It is all in the Help section of Config

    USB_Analogic etc etc and IOCARD_Analogic etc etc

    Regards

    David

  5. #15
    500+ This must be a daytime job Boeing 747 Flyer's Avatar
    Join Date
    Nov 2009
    Location
    England
    Posts
    635
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: SIOC and Offset 023A

    Hi David,

    That's the problem. I have the Pots defined in the .ini as USBAnalogic=0,38 - Just as the manual says.

    I then reference it in the SIOC file like so:

    Code:
    Var 0003, name Pot_GS, Link USB_ANALOGIC, Device 0, Input 2, PosL 97, PosC 133, PosR 170   // Potentiometer for GS
    Now, according to the manual, that's correct.

  6. #16
    500+ This must be a daytime job



    Join Date
    Jul 2013
    Posts
    917
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: SIOC and Offset 023A

    Jack

    You asked how to reference the pots when they are connected to the USBExpansion card.
    The answer is to use the definition Link IOCard_analogic, Device?, Input ? etc etc.

    Do you now have a different problem?

    David

  7. #17
    500+ This must be a daytime job Boeing 747 Flyer's Avatar
    Join Date
    Nov 2009
    Location
    England
    Posts
    635
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: SIOC and Offset 023A

    Hi David,

    I'm talking about reference the Pots if they're connected to the DC Motors Card, not the USBExpansion Card.

    Cheers,

    Jack

  8. #18
    500+ This must be a daytime job



    Join Date
    Jul 2013
    Posts
    917
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: SIOC and Offset 023A

    Jack

    "I do, however, have Potentiometers connected to my USBEXpansion card; so how do I differentiate between the two devices?"

    That was the question I was answering.

    With regard to USB devices, I believe it is as you have typed.

    I will do some checking later and revert if anything comes to mind. I need to spray the Stab Trim guards on my throttle

    David

  9. #19
    500+ This must be a daytime job Boeing 747 Flyer's Avatar
    Join Date
    Nov 2009
    Location
    England
    Posts
    635
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: SIOC and Offset 023A

    The USBExpansion Card is listed as "Device 0" in the SIOC.ini, and it has Pots connected to it.

    Likewise, the USBDCMotors Card is also "device 0" (since it's my only motors card), but it too has Pots connected to it.

    I'm wondering how to define Potentiometers on the USBDCMotors Card.

    Cheers,

    Jack

  10. #20
    500+ This must be a daytime job



    Join Date
    Jul 2013
    Posts
    917
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: SIOC and Offset 023A

    Jack

    Your post # 15 above appears to correctly answer your question. So what is the problem?

    David

Page 2 of 4 FirstFirst 1234 LastLast