Results 1 to 3 of 3
  1. #1
    null null
    Guest

    [LOGIC] How to code question

    Hi Enrico
    Trying to understand how to code the Isolation valve logic in the
    737txt [logic] section, This is what I need

    If the Isolation valve switch is in the "auto" position
    (isolationvalve = 1), and any of the following are off

    Engine 1 Bleed = off (eng1bleed = 0)
    Engine 2 Bleed = off (eng2bleed = 0)
    Pack 1 = off (pack1 = 0)
    Pack 2 = off (pack2 = 0)

    Then the isolation valve opens . OR

    If the Isolation valve switch position is in the "open" position the
    isolation valve opens

    if (isolationvalve = 1 and ((eng1bleed = 0) or (eng2bleed = 0) or
    (pack1 = 0) or (pack2 = 0))) or (isolationvalve = 2)
    if b1r > b2r
    b2r = b1r - 1
    else
    b1r = b2r - 1
    endif
    else
    b1r = b1r + 1
    b2r = b2r + 1
    endif

    Thanks

    David


  2. #2
    Enrico Schiratti
    Guest

    Re: [LOGIC] How to code question

    Hi,

    so you are changing completely from the current code?

    I would do the following, if I understand it correctly

    if isolationvalve = 0
    isolationvalveopen = 0
    else
    if isolationvalve = 1
    isolationvalveopen = (eng1bleed = 0) or (eng2bleed = 0) or (pack1 =

    0) or (pack2 = 0)
    else
    isolationvalveopen = 1
    endif
    endif

    then use the temp variable isolationvalveopen instead of isolationvalve

    Ciao

    Enrico

    "David Allen" wrote in message
    news:269651.53525@wb.onvix.com...
    > Hi Enrico
    > Trying to understand how to code the Isolation valve logic in the
    > 737txt [logic] section, This is what I need
    >
    > If the Isolation valve switch is in the "auto" position
    > (isolationvalve = 1), and any of the following are off
    >
    > Engine 1 Bleed = off (eng1bleed = 0)
    > Engine 2 Bleed = off (eng2bleed = 0)
    > Pack 1 = off (pack1 = 0)
    > Pack 2 = off (pack2 = 0)
    >
    > Then the isolation valve opens . OR
    >
    > If the Isolation valve switch position is in the "open" position the
    > isolation valve opens
    >
    > if (isolationvalve = 1 and ((eng1bleed = 0) or (eng2bleed = 0) or
    > (pack1 = 0) or (pack2 = 0))) or (isolationvalve = 2)
    > if b1r > b2r
    > b2r = b1r - 1
    > else
    > b1r = b2r - 1
    > endif
    > else
    > b1r = b1r + 1
    > b2r = b2r + 1
    > endif
    >
    > Thanks
    >
    > David
    >



  3. #3
    null null
    Guest

    Re: [LOGIC] How to code question

    On Wed, 24 Nov 2004 05:11:06 EST, Enrico
    Schiratti wrote:

    >Hi,
    >
    >so you are changing completely from the current code?


    Short answer yes

    >I would do the following, if I understand it correctly


    You did and it works GREAT!

    Thanks

    David


Similar Threads

  1. System Logic Question
    By Michael Carter in forum I/O Interfacing Hardware and Software
    Replies: 16
    Last Post: 05-31-2008, 03:29 AM
  2. Configuring Logic Variable Question
    By mhayling in forum FS2Phidget Users
    Replies: 1
    Last Post: 02-15-2008, 09:51 PM
  3. Re: pmsystems logic question
    By David Rabiner in forum PMSystems
    Replies: 0
    Last Post: 02-05-2006, 11:59 PM
  4. pmsystems logic question
    By Rob Archer in forum PM General Q & A
    Replies: 0
    Last Post: 02-05-2006, 12:44 PM