Simple question about "Sound" command


Closed Thread
Results 1 to 4 of 4

Hybrid View

  1. #1
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,615


    Did you find this post helpful? Yes | No

    Default Re: Simple question about "Sound" command

    You need a flag to remember that you've already sounded the alarm.

    Code:
    AlarmDone VAR BIT
    
    IF Temperature > TempUp THEN
      PortA.2 = 0
      PortA.3 = 1
      IF AlarmDone = 0 THEN          ' Only activate alarm if not already activated.
        SOUND PortA.7, [107, 50]
        AlarmDone = 1                   ' Alarm has been activated.
      ENDIF
    ELSE
      AlarmDone = 0                   ' Temperature is not over the limit, rearm the alarm.
    ENDIF

  2. #2
    Join Date
    Dec 2008
    Location
    Ploiesti, ROMANIA
    Posts
    582


    Did you find this post helpful? Yes | No

    Default Re: Simple question about "Sound" command

    Thanks for reply !
    The second variant work verry fine. THANK YOU, Mr.Henrik ! As usual, You're a Great Gentleman !
    Last edited by fratello; - 10th July 2012 at 11:13.

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts