Page 2 of 7 FirstFirst 123456 ... LastLast
Results 11 to 20 of 69
  1. #11
    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: HSI Pulse Range Counter Display - How to manipulate in SIOC?

    Jack,
    I understand. Leave it as it is.
    Regards,
    Nico

  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: HSI Pulse Range Counter Display - How to manipulate in SIOC?

    Jack,
    I have tested the Pulses Subrutine with a led. Works like a charm
    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: HSI Pulse Range Counter Display - How to manipulate in SIOC?

    Hi Nico,

    Thanks so much for testing with an LED BTW.

    I have good news! Whilst there are some problems, the HSI display works most of the time, accurately representing the distance (eg 1.6 nm appears as "16", but it's actually 1.6 because of the DP).

    The problem was, that when the HSI counted to 16, I flew towards the VOR station. The value counted down, as it should, but stopped at 0.4. Then, when I flew over the VOR station, and the distance started to increase again, the HSI value remained stuck at 0.4nm.

    One thing, I had to change the script slightly. The "UP" and "DOWN" Pins I mentioned are infact the same pin. +5V to the pin (ON) means that it counts up, whilst 0V (OFF) to the pin makes the display count down.

    This is the script; identical, just for that minor change:

    Code:
    Var 0 Value 0
    {
      &Out = 0
      &CurrentD = 0   
      &Control = 0
      &Control = TIMER 1 0 100   // control is called each second
    }
    
    Var 100 name Control Link SUBRUTINE
    {
      L0 = &NewDistance - &CurrentD                                                                                                                                                                                              
        IF L0 > 0 
        {  
          &UPDOWN_Pin = 1  // Ensure HSI counts UP                                                                                          
          IF L0 > 9
          {
            L0 = 9  // no more then 9 pulses per second
            &CurrentD = &CurrentD  + 9
          } 
          ELSE
          {
            &CurrentD = &NewDistance
          }  
        }
        ELSE
        {                                                                                          
          &UPDOWN_Pin = 0    // We don't want to count up here!
          L0 = L0 * -1
          IF L0 > 9
          {
            L0 = 9  // no more then 9 pulses per second
            &CurrentD = &CurrentD  - 9
          } 
          ELSE
          {
            &CurrentD = &NewDistance
          }  
        }
        CALL &Pulses L0                           
      }                                                                                                                     
    
    Var 1, name CurrentD
    
    Var 2, name UPDOWN_Pin, Link IOCARD_OUT, Output 21 // Count UP or DOWN selector Pin
    
    Var 4, name Out, Link IOCARD_OUT, Output 29 // Pulse Pin
    
    Var 5, name NewDistance, Link FSUIPC_IN, Offset $0300, Length 2  // FSUIPC VOR1 DME Input Source
    
    Var 10 name Pulses link SUBRUTINE    // parameter is number of pulses ...
    {
      &Out = 1
      &PulseDown = DELAY &Pulses 5  // 50 msec for a half pulse
    }
    
    Var 11 name PulseDown
    {
      L0 = &PulseDown
      IF L0 > 0 
     {
        &Out = 0
        &Finish = DELAY &PulseDown 5  // 50 msec for the other half of the pulse
     }
    }
    
    Var 12 name Finish
    {
      L0 = &Finish
      IF L0 > 0
      {
        IF L0 > 1
        {
          L0 = L0 - 1
          CALL &Pulses L0   // recursive subroutine call
        }
        ELSE
        {
          &PulseDown = 0   // make responsive for another series of pulses.
          &Finish = 0      // make responsive for another series of pulses.
        }
      }
    }
    However, I am extremely impressed by your script. I am surprised I have got it working at all, so when FSX read 1.6, and the HSI read 1.6, I was very, very pleased.

    One thing; when using the script, SIOC seems to activate output 28 (unrelated) when it is counting up. There is a RESET pin on the pulse meter, which, if tampered with, can seriously affect the pulse. Is it possible SIOC is accidently activating this output, just like 28?

    Kindest regards,

    Jack

  4. #14
    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: HSI Pulse Range Counter Display - How to manipulate in SIOC?

    Hi Jack,
    We're making progress!

    I see you have removed the IF L0 <> 0 test in Var 100.... that's not right, now if L0 = 0 you try to count down...

    And no, it's not very likely that the SIOC script changes Output 28. That output is not mentioned at all, is it? Are you sure you have no short-circuits in your hardware?

    regards,

    Nico

  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: HSI Pulse Range Counter Display - How to manipulate in SIOC?

    Hi Nico,

    I have changed the script back to the <>; so now it's the same just with that one alteration.

    This is what I did this time:

    - Started a flight

    - Started SIOC

    - VOR1 DME = Out of range

    - I then tune 116:00, VOR1 DME = 1.6nm away

    - The range counter went to 1.4

    - I changed back to the "0" range frequency, it went down to 2 (or something like that; not 0)

    Weirdly, this is what the IOCPConsole log states:

    Code:
    5=0 - New Distance
    5 = 16 New Distance
    5 = 15 New Distance
    5 = 14 New Distance
    ... And so on, as I fly towards it.

    As you can see, even though "New Distance" changes; no other var at all changes.

    Regards,

    Jack

  6. #16
    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: HSI Pulse Range Counter Display - How to manipulate in SIOC?

    Hi Nico,

    To add to my last post, here is the full IOCPConsole Log:

    Code:
    5=9 - NewDistance
    2=1 - UPDOWN_Pin
    1=9 - CurrentD
    10=9 - Pulses
    11=9 - PulseDown
    4=0 - Out
    12=9 - Finish
    10=8 - Pulses
    4=1 - Out
    11=8 - PulseDown
    4=0 - Out
    12=8 - Finish
    10=7 - Pulses
    4=1 - Out
    11=7 - PulseDown
    4=0 - Out
    12=7 - Finish
    10=6 - Pulses
    4=1 - Out
    11=6 - PulseDown
    4=0 - Out
    12=6 - Finish
    10=5 - Pulses
    4=1 - Out
    11=5 - PulseDown
    4=0 - Out
    12=5 - Finish
    10=4 - Pulses
    4=1 - Out
    11=4 - PulseDown
    4=0 - Out
    12=4 - Finish
    10=3 - Pulses
    4=1 - Out
    11=3 - PulseDown
    4=0 - Out
    12=3 - Finish
    10=2 - Pulses
    4=1 - Out
    11=2 - PulseDown
    4=0 - Out
    12=2 - Finish
    10=1 - Pulses
    4=1 - Out
    11=1 - PulseDown
    4=0 - Out
    12=1 - Finish
    11=0 - PulseDown
    12=0 - Finish
    2=0 - UPDOWN_Pin
    10=0 - Pulses
    4=1 - Out
    5=8 - NewDistance
    2=1 - UPDOWN_Pin
    1=8 - CurrentD
    10=-1 - Pulses
    11=-1 - PulseDown
    2=0 - UPDOWN_Pin
    10=0 - Pulses
    11=0 - PulseDown
    5=7 - NewDistance
    2=1 - UPDOWN_Pin
    1=7 - CurrentD
    10=-1 - Pulses
    11=-1 - PulseDown
    2=0 - UPDOWN_Pin
    10=0 - Pulses
    11=0 - PulseDown
    5=6 - NewDistance
    2=1 - UPDOWN_Pin
    1=6 - CurrentD
    10=-1 - Pulses
    11=-1 - PulseDown
    2=0 - UPDOWN_Pin
    10=0 - Pulses
    11=0 - PulseDown
    5=0 - NewDistance
    2=1 - UPDOWN_Pin
    1=0 - CurrentD
    10=-6 - Pulses
    11=-6 - PulseDown
    2=0 - UPDOWN_Pin
    10=0 - Pulses
    11=0 - PulseDown
    5=6 - NewDistance
    2=1 - UPDOWN_Pin
    1=6 - CurrentD
    10=6 - Pulses
    11=6 - PulseDown
    4=0 - Out
    12=6 - Finish
    10=5 - Pulses
    4=1 - Out
    11=5 - PulseDown
    4=0 - Out
    12=5 - Finish
    10=4 - Pulses
    4=1 - Out
    11=4 - PulseDown
    4=0 - Out
    12=4 - Finish
    10=3 - Pulses
    4=1 - Out
    11=3 - PulseDown
    4=0 - Out
    12=3 - Finish
    10=2 - Pulses
    4=1 - Out
    11=2 - PulseDown
    4=0 - Out
    12=2 - Finish
    10=1 - Pulses
    4=1 - Out
    11=1 - PulseDown
    4=0 - Out
    12=1 - Finish
    11=0 - PulseDown
    12=0 - Finish
    2=0 - UPDOWN_Pin
    10=0 - Pulses
    4=1 - Out
    5=5 - NewDistance
    5=6 - NewDistance
    5=7 - NewDistance
    5=8 - NewDistance
    Generally, the script did not give the correct values. Also, the last 5 lines are strange; distance changes but nothing else.

    kindest regards,

    Jack

  7. #17
    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: HSI Pulse Range Counter Display - How to manipulate in SIOC?

    Hi Jack,
    I have no experience with IOCPConsole, never work with it.

    I recommend to build it up from the ground up with small steps.
    We know that the Pulses SUBRUTINE is ok.
    So first make a script that sends say 5 pulses to your HSI and count UP, then do the same counting down. Check the correct working of that first.

    If that's OK, do some tests with the NewDistance variable.

    If that's ok bring in the control routine without the test about sending more then 9 pulses.
    If that's ok maximise the number of pulses sent in a control cycle.

    and so on...

    Such an approach gives a lot more insight then "staring at a IOCPlog file...."

    regards,
    Nico

  8. #18
    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: HSI Pulse Range Counter Display - How to manipulate in SIOC?

    Hi Nico,

    I'm so sorry; I couldn't quite understand that.

    Do you mean a script with JUST the pulse subroutine on its own? Maybe linked to a pushbutton or something? Because that subroutine on its own doesn't do anything unless it's used with the other variables in the script.

    Kindest regards,

    Jack

  9. #19
    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: HSI Pulse Range Counter Display - How to manipulate in SIOC?

    Jack,
    Quote Originally Posted by Boeing 747 Flyer View Post
    Do you mean a script with JUST the pulse subroutine on its own? Maybe linked to a pushbutton or something?
    Yes indeed. Or called from Var 0.
    And "connected" via Outputs to your HSI.

    Like I did when I tested the Pulses subrutine with a led.

    regards,
    Nico

  10. #20
    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: HSI Pulse Range Counter Display - How to manipulate in SIOC?

    Hi Nico,

    How is this:

    Code:
    Var 2 name Trigger Link IOCARD_IN Input 25
    {
     IF &Trigger = 1
     {
      CALL &Pulses
     }
    }
    
    Var 1 name Pulses link SUBROUTINE    // parameter is number of pulses ...
    {
      &Out = 1
      &PulseDown = DELAY &Pulses 5  // 50 msec for a half pulse
    }
    
    Var 3 name Out Link IOCARD_OUT Output 29 // Pulse Pin
    
    Var 11 name PulseDown
    {
      L0 = &PulseDown
      IF L0 > 0 
     {
        &Out = 0
        &Finish = DELAY &PulseDown 5  // 50 msec for the other half of the pulse
     }
    }
    
    Var 12 name Finish
    {
      L0 = &Finish
      IF L0 > 0
      {
        IF L0 > 1
        {
          L0 = L0 - 1
          CALL &Pulses L0   // recursive subroutine call
        }
        ELSE
        {
          &PulseDown = 0   // make responsive for another series of pulses.
          &Finish = 0      // make responsive for another series of pulses.
        }
      }
    }
    I couldn't isolate the Pulses var because it relies on the "Pulsedown" var, which is further linked to the finish var.

    Regards,

    Jack

Page 2 of 7 FirstFirst 123456 ... LastLast