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

    [LOGIC] Up -Down Counter

    Hi Enrico
    Is there a UP-Down Counter for the [logic] section

    This counter would be event driven.

    If cutoff1 > 0 then counter (0 to 100)
    ValveTransitEng1 = 1
    else
    ValveTransitEng1 = 0
    endif

    This counter would count up from 0 to 100 as long as cutoff1 > 0,
    While it is counting the event would be true, and when it reached the
    final value it would turn false.

    If the state of cutoff1 > 0 became false and the counter had not
    reached 100, it would start counting back down to 0 from the number it
    reached when the state of cutoff1 > 0

    So if had counted to 50 and there was the change of state it would
    count down from 50 to 0 and then it would turn false. In this example
    the total time 0 to 50 to 0 would be equal to a uninterrupted count
    from 0 to 100

    David


  2. #2
    Enrico Schiratti
    Guest

    Re: [LOGIC] Up -Down Counter

    Hi,

    how is this not possible with existing tools? (if I understood)

    if cutoff1 > 0 then
    if valvemovecounter
    else
    if valvemovecounter > 0 then valvemovecounter = valvemovecounter - 1
    endif

    then check on valvemovecounter?

    or even better (using a delay of 15 seconds)

    if cutoff1 change
    if ValveTransitEng1 = 0
    ValveTransitEng1 = 1 [15]
    else
    ValveTransitEng1 = 0 [15]
    endif
    endif

    Ciao

    Enrico

    "David Allen" wrote in message
    news:269490.53489@wb.onvix.com...
    > Hi Enrico
    > Is there a UP-Down Counter for the [logic] section
    >
    > This counter would be event driven.
    >
    > If cutoff1 > 0 then counter (0 to 100)
    > ValveTransitEng1 = 1
    > else
    > ValveTransitEng1 = 0
    > endif
    >
    > This counter would count up from 0 to 100 as long as cutoff1 > 0,
    > While it is counting the event would be true, and when it reached the
    > final value it would turn false.
    >
    > If the state of cutoff1 > 0 became false and the counter had not
    > reached 100, it would start counting back down to 0 from the number it
    > reached when the state of cutoff1 > 0
    >
    > So if had counted to 50 and there was the change of state it would
    > count down from 50 to 0 and then it would turn false. In this example
    > the total time 0 to 50 to 0 would be equal to a uninterrupted count
    > from 0 to 100
    >
    > David
    >



  3. #3
    null null
    Guest

    Re: [LOGIC] Up -Down Counter

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

    Small Cut

    >or even better (using a delay of 15 seconds)
    >
    >if cutoff1 change
    > if ValveTransitEng1 = 0
    > ValveTransitEng1 = 1 [15]
    > else
    > ValveTransitEng1 = 0 [15]
    > endif
    >endif


    I could not get this to work

    Maybe a better explanation:

    A young man and his new bride live within a 10 minute walk of the a
    Ferrari sales office. He decides to walk to the sales office to
    purchase a used F-355 Spider, half way to the sales office he realizes
    he has forgotten his PM checkbook, and heads back home. He has been
    gone from home a total of 10 minutes. He is greeted by his lovely wife
    who wipers in his ear that she would like to become pregnant. 2 hours
    later that day he sets off again with his checkbook for the Ferrari
    sales office. After walking 2 minutes he realizes that he has no pants
    on and walks back home. The total elapsed time is 4 minutes. He is
    again greeted by his lovely wife who wipers in his ear they should try
    again. The next day he again sets off to the Ferrari sales office, he
    arrives at the sales office in 10 minutes. He purchases the car and
    drives away. Fifteen years later his son ponders what happened along
    that 10 minute walk to Ferrari sales office. The now older man returns
    to the Ferrari sales office and sells the high mileage F-355 and walks
    the 10 minutes home. He is greeted by his lovely wife, and she wipers
    in his ear. "The walk to and from Ferrari sales office was only 20
    minuets my love, a lot has changed in 16 years."

    Thanks

    David


Similar Threads

  1. 777 logic file?
    By sbecker777 in forum PMSystems
    Replies: 7
    Last Post: 10-18-2018, 02:07 PM
  2. SixPack Logic
    By Potrohkocsonya in forum PMSystems
    Replies: 2
    Last Post: 04-18-2009, 12:41 PM
  3. Logic circuit
    By gokhotit in forum FS2Phidget Users
    Replies: 9
    Last Post: 09-23-2007, 11:49 PM
  4. Airbus logic
    By 3202b in forum PMSystems
    Replies: 3
    Last Post: 02-08-2007, 04:36 PM
  5. [LOGIC] Center logic 0 Three position toggle switch
    By null null in forum PM General Q & A
    Replies: 2
    Last Post: 11-24-2004, 04:42 PM