How can I detect if a global bolean variable has changed

I have a boolean global variable that change its value from time to time. At hte beginning of my program I take the actual time, but everytime this value change I have to reset this previous value and take the actual one. I've tried to do this with the event structure but it doesn't work because this is a global variable and not a control in the panel. Some idea to solve this problem? Thanks in advance,
Angel

It's mainly because you are reading value change events for the indicator, not the control. Value change events are only fired for changes given by a user. The indicator however is not updated by the GUI, but by programmatic input from the control. By replacing the reference with a reference to the control it will work. Or you can write the value to the indicator by using a Value (Signaling) property, that will trigger a change event for the indicator.
Note: You should not register the event inside the loop, do that only once - outside the loop.
If the boolean you are to monitor is not changed from the GUI you can as I mentioned above make it fire an event by setting the value using the value signalling property inst
ead of wiring the new value directly, but the property node has it's downsides so another option is to create a user event, put that reference in the global, and then run the generate user event function whenever the boolean changes.
I see you read the ms timer when the value changes. Why? If you want the time get the time, if you want the time since the last update you could use the ms timer, keep the previous value in a shift register and then calculate the difference, but the ms timer rolls over now and then so that can give false results...What is the purpose of the time and how often does the value change?
Attached is an exmaple that use a user event and the generate event function.
MTO
Attachments:
example_Rev3.llb ‏54 KB

Similar Messages

  • How can I generate an Event if an indicator has changed it´s value?

    I need do gather some Errormessages of an application (e.g. The application sends "Not Ready" and it´s indicated on the LabVIEW window) because I want to sample them in a History box.
    I´ve tried this: First I placed an control (an LED) on the panel and copied the value of the "Not Read" indicator to a property node of the LED.
    Then configured the Event structure with the setting "Value has changed" of the LED.
    But the Event structure is not triggered only when I set the indicator with mouse..!
    Thanx in advance for Help!

    Sorry, can t read the message...
    "Paul Cardinale" a écrit dans le message de
    news: [email protected]..
    > EMG wrote in message
    news:<506500000008000000BF000100-1079395200000@exc​hange.ni.com>...
    > > I need do gather some Errormessages of an application (e.g. The
    > > application sends "Not Ready" and it s indicated on the LabVIEW
    > > window) because I want to sample them in a History box.
    > > I ve tried this: First I placed an control (an LED) on the panel and
    > > copied the value of the "Not Read" indicator to a property node of the
    > > LED.
    > >
    > > Then configured the Event structure with the setting "Value has
    > > changed" of the LED.
    > >
    > > But the Event structure is not trig
    gered only when I set the indicator
    > > with mouse..!
    > >
    > > Thanx in advance for Help!
    >
    > Use the Val (signaling) property.

  • How can I detect in javascript if a user has set "raise or lower windows" javascript option off?

    I am working on an application and include a feature that allows users to hide a window by calling the javascript "focus" method. However, this does not work in Firefox when the user has the "raise or lower windows" setting turned off. Not a big deal, but it seems as if there is no way to detect this via javascript so I can gracefully handle the situation for my users (e.g. send them a message that their browser will not allow that to occur).

    A good place to ask advice about web development is at the mozillaZine Web Development/Standards Evangelism forum.<br />
    The helpers at that forum are more knowledgeable about web development issues.<br />
    You need to register at the mozillaZine forum site in order to post at that forum.<br />
    See http://forums.mozillazine.org/viewforum.php?f=25

  • How can I detect a dialog and respond?

    I'm having trouble doing something that's probably not that hard. I'm trying to "Print to PDF" a bunch of old AppleWorks documents. When you open a document created in AppleWorks v6 it opens right up, but when you open a document created in AppleWorks 5 you get a dialog box that says, "This document was created by a previous version of AppleWorks. A copy will be opened and "[v6.0]" will be added to the filename."
    Right now I open the file and then:
    tell application "AppleWorks 6"
            activate
            repeat while not (exists front document)
                    delay .2
            end repeat
    end tell
    When the dialog box pops up, there's no front document so the whole thing freezes until you hit OK. How can I detect this dialog box and dismiss it?
    Thanks
    PS
    When the box is open I ran this and got this result:
    /usr/bin/osascript -e 'tell application "System Events" to get properties of windows of application process "AppleWorks 6"'
    minimum value:missing value, orientation:missing value, position:436, 153, class:window, role description:dialog, accessibility description:missing value, focused:missing value, title:missing value, size:412, 123, value:missing value, help:missing value, enabled:missing value, maximum value:missing value, role:AXWindow, entire contents:, subrole:AXDialog, selected:missing value, name:missing value, description:dialog, minimum value:missing value, orientation:missing value, position:8, 76, class:window, role description:floating window, accessibility description:missing value, focused:missing value, title:Starting Points, size:631, 189, value:missing value, help:missing value, enabled:missing value, maximum value:missing value, role:AXWindow, entire contents:, subrole:AXFloatingWindow, selected:missing value, name:Starting Points, description:floating window, minimum value:missing value, orientation:missing value, position:4, 22, class:window, role description:floating window, accessibility description:missing value, focused:missing value, title:Button Bar, size:612, 51, value:missing value, help:missing value, enabled:missing value, maximum value:missing value, role:AXWindow, entire contents:, subrole:AXFloatingWindow, selected:missing value, name:Button Bar, description:floating window

    Hi,
    The simplest would be to set the application preferences in the script.
    Like this :
    -- *** set prefs ****
    tell application "AppleWorks 6"
          activate
          set oldPrefs to its preferences
          copy oldPrefs to tPrefs
          tell tPrefs
                set old version warning to false --doesn't show the old version warning alert  
                set converted file suffix to true -- append “[v6.0]” to documents converted from older formats
                set locked file warning to false
                set paint reduction warning to false
          end tell
          set preferences to tPrefs
    end tell
    -- *** end set prefs ****
    --**** your script, example ***
    set tfiles to choose file with multiple selections allowed
    tell application "AppleWorks 6"
          repeat with i in tfiles
                open i
                tell front document
                      -- do something
                end tell
          end repeat
    end tell
    --**** end  your script ***
    -- *** reset prefs ****
    tell application "AppleWorks 6" to set preferences to oldPrefs

  • How can I detect a certain text within a field within CASE using IF

    Dear all,
    for a transformation / generation of values receiving from R/3 into BW I try to
    manupulate three fields. I have a problem detecting a string in a field.
    I am using a CASE with several WHEN clauses on one field. Depending on the
    value, an IF is integrated. There I look into another field evaluating, if it contains
    a certain string. E.g. IF STRING CP 'xyz' OR 'abc'.
    System gives error for the locigal expression. I also tried CS, but same error.
    How can I detect a certain text within a field and which is the right logical
    expression.
    Many thanks in advance!!!
    Claudia

    Hi,
    Folow the blow example...
    May be it helps....
    DATA: hex1 TYPE string,
          hex2 TYPE string.
    hex1 = 'FFFF'.
    hex2 = '123FF'.
    IF hex1 CP hex2.
    ENDIF.
    Cheers,
    SImha.

  • How can i detect if my PC is not on Network..... Urgent Pls Help Soon !!!!!

    Hello Everyone,
    We all know whenever we try to connect to a PC which is not on network, we get UnKnownHostException etc..... by which we can detect that the corresponding PC is not an network(intranet/internet)
    But when i send a msg from my PC to my PC, it works fine even if the network is down. I hv provided my PC's IP address instead of using localhost or 127.0.0.1 which reduces the possibility that the msg will not be traversed thru the network.
    Any IDEA how this works.
    Is There any possible way by which i can detect that my PC is not on network or the PC to which i'm trying to connect is not on network .......
    Pls help me out, its really urgent as to be implemented in my Project
    Thanks In Advance
    Sahil Shaikh

    Hello Surtee
    I have developed a Messeging Service for the eCRM Apllication my company is developing and we r in the final stage of debugging.
    Now whenever a user sends a msg to a PC which is not on network, the messaging service automatically sends an Offline mssg to that PC. But know i want ot distinguish wheather the PC to which i'm sending the msg is not on network or am I not on network based on this i need to perform diff. actions, hence i wanted to know that how can i detect .......
    Pls see if u canhelp me out ......
    Thanks
    Sahil Shaikh

  • How can we detect a virus on our mac?, How can we detect a virus on our mac?

    We think we may have a virus from the USPS spam email.  How can we detect a virus on our computer?

    What makes you think there is a "virus"?  Any symptoms...?
    There are other types of malware (such as trojans) that can affect Mac OS X, but no viruses.  A trojan would have to trick you into installing something (the malware) by making you think it is something else.  You would be notified (by the system) that you are running a downloaded application for the first time, AND if something will be done to update your current system, you will be asked to authenticate (with your admin user name and password).  If something like that comes up when you don't expect it, you should be suspicious (and NOT authenticate).  Just opening an email won't do anything, even if it's an email that may affects Windows PCs.
    This free utility can scan your Mac for malware. 
    http://www.clamxav.com/
    Apparently, there is a version on the Mac App Store.
    http://search.itunes.apple.com/WebObjects/MZContentLink.woa/wa/link?path=mac%2fC lamXav
    In the past, when I bothered to run it a few times a year, the only things it found were junk emails that I had not bothered to delete with embedded malware, all of it aimed at Windows PCs.

  • How can i detect the windows version

    Hi,
    How can I detect the windows version from Forms 6i?
    I was used get_application_property(operating_system); But it only return MSWINDOWS, MSWINDOWS32, WIN32COMMON.
    Any function or way can return the exact windows version(98/ME/NT/XP)?
    Regards, Wing

    You may use Win_Api_Environment API call to get windows version.
    I have sample code on my home PC if you need code send mail at [email protected]

  • How can I detect the lable of CD or hard drive?

    hi all
    How can I detect the lable of CD or hard drive?
    thanx ;)

    Hi,
    Not to my knowmledge... you must use JNI to access the OS methods for that.
    JRG

  • How can i Customize the UIShell Global Area ? Please provide some steps to Customize the UIShell Global Area ? i am using JDev11.1.1.7.0g version

    How can i Customize the UIShell Global Area ? Please provide some steps to Customize the UIShell Global Area ?
    Actually I need to manipulate the Sign Out link and put my own Sign out link there...

    If you want to customize the UI Shell you need to download the code from UI Shell - ADF UI Patterns - Dynamic Tabs UI Shell Template Functional UI Pattern ; modiffy and use the updated code

  • How can I detect that there is an internet connection?

    How can I detect that there is an internet connection?
    Peter Goossens

    How can I detect that there is an internet connection?
    Peter Goossens
    Peter,
    You might want to experiment with this. It's not perfect, but...
    Class
    Imports System.IO
    Imports System.Net
    Namespace InternetConnection
    Public Class SiteInfo
    Private _displayName As String
    Private _connectionString As String
    Private Sub New(ByVal name As String, _
    ByVal connectionString As String)
    _displayName = name.Trim
    _connectionString = connectionString.Trim
    End Sub
    ''' <summary>
    ''' Gets the connection string of this instance.
    ''' </summary>
    ''' <value></value>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Public ReadOnly Property ConnectionString() As String
    Get
    Return _connectionString
    End Get
    End Property
    ''' <summary>
    ''' Gets the display name of this instance.
    ''' </summary>
    ''' <value></value>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Public ReadOnly Property DisplayName() As String
    Get
    Return _displayName
    End Get
    End Property
    ''' <summary>
    ''' A method which will add a new site to your collection of SiteInfo.
    ''' </summary>
    ''' <param name="siList">Your generic List(Of SiteInfo).</param>
    ''' <param name="displayName">The display name for this new instance
    ''' of SiteInfo.</param>
    ''' <param name="connectionString">The connection string for this
    ''' new instance of SiteInfo.</param>
    ''' <remarks></remarks>
    Public Shared Sub AddNew(ByRef siList As List(Of SiteInfo), _
    ByVal displayName As String, _
    ByVal connectionString As String)
    Try
    If siList Is Nothing Then
    Throw New NullReferenceException("The collection of SiteInfo cannot be null.")
    ElseIf String.IsNullOrEmpty(displayName) OrElse displayName.Trim = "" Then
    Throw New ArgumentException("The display name cannot be null or empty.")
    ElseIf String.IsNullOrEmpty(connectionString) OrElse connectionString.Trim = "" Then
    Throw New ArgumentException("The connection string cannot be null or empty.")
    Else
    If siList.Count > 0 Then
    Dim findDuplicate As IEnumerable(Of SiteInfo) = _
    From si As SiteInfo In siList _
    Where si.DisplayName.ToLower.Replace(" "c, "") = _
    displayName.ToLower.Replace(" "c, "") AndAlso _
    si.ConnectionString.ToLower.Replace(" "c, "") = _
    connectionString.ToLower.Replace(" "c, "")
    If findDuplicate.Count <> 0 Then
    Throw New ArgumentException("This is a duplicate entry.")
    Else
    siList.Add(New SiteInfo(displayName, connectionString))
    End If
    Else
    siList.Add(New SiteInfo(displayName, connectionString))
    End If
    End If
    Catch ex As Exception
    Throw
    End Try
    End Sub
    ''' <summary>
    ''' A method which will return a boolean value to indicate internet
    ''' connection status.
    ''' </summary>
    ''' <param name="siList">Your generic List(Of SiteInfo).</param>
    ''' <param name="displayName">The display name for the instance
    ''' of SiteInfo to use.</param>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Public Shared Function InternetIsConnected(ByVal siList As List(Of SiteInfo), _
    ByVal displayName As String) As Boolean
    Dim retVal As Boolean = False
    Try
    If siList Is Nothing Then
    Throw New NullReferenceException("The collection of SiteInfo cannot be null.")
    ElseIf siList.Count = 0 Then
    Throw New ArgumentOutOfRangeException("Count", "The collection of SiteInfo cannot be empty.")
    ElseIf String.IsNullOrEmpty(displayName) OrElse displayName.Trim = "" Then
    Throw New ArgumentException("The display name cannot be null or empty.")
    Else
    Dim findInstance As IEnumerable(Of SiteInfo) = _
    From si As SiteInfo In siList _
    Where si.DisplayName.ToLower.Replace(" "c, "") = _
    displayName.ToLower.Replace(" "c, "")
    If findInstance.Count <> 1 Then
    Throw New ArgumentException("This instance is not in the collection of SiteInfo.")
    Else
    retVal = TestConnection(findInstance.First.ConnectionString)
    End If
    End If
    Catch ex As Exception
    Throw
    End Try
    Return retVal
    End Function
    Private Shared Function TestConnection(ByVal url As String) As Boolean
    Dim retVal As Boolean = False
    Try
    Dim request As WebRequest = WebRequest.Create(url)
    Using response As HttpWebResponse = DirectCast(request.GetResponse, HttpWebResponse)
    Using dataStream As Stream = response.GetResponseStream
    Using reader As New StreamReader(dataStream)
    Dim responseFromServer As String = reader.ReadToEnd()
    retVal = True
    End Using
    End Using
    End Using
    Catch ex As WebException
    retVal = True
    Catch ex As Exception
    retVal = False
    End Try
    Return retVal
    End Function
    End Class
    End Namespace
    Example Usage
    Public Class Form1
    Private Sub Form1_Load(ByVal sender As System.Object, _
    ByVal e As System.EventArgs) _
    Handles MyBase.Load
    Dim siList As New List(Of InternetConnection.SiteInfo)
    InternetConnection.SiteInfo.AddNew(siList, _
    "Test1", _
    "http://dev.virtualearth.net/REST/v1/Locations/37221?o=xml")
    InternetConnection.SiteInfo.AddNew(siList, _
    "Test2", _
    "nothing here")
    InternetConnection.SiteInfo.AddNew(siList, "Test3", _
    "www.google.com")
    InternetConnection.SiteInfo.AddNew(siList, "Test4", _
    "http://fls-online.com")
    ' This will return true:
    Dim bool1 As Boolean = _
    InternetConnection.SiteInfo.InternetIsConnected(siList, _
    "Test1")
    ' This will return false:
    Dim bool2 As Boolean = _
    InternetConnection.SiteInfo.InternetIsConnected(siList, _
    "Test2")
    ' This will return false:
    Dim bool3 As Boolean = _
    InternetConnection.SiteInfo.InternetIsConnected(siList, _
    "Test3")
    ' This will return true:
    Dim bool4 As Boolean = _
    InternetConnection.SiteInfo.InternetIsConnected(siList, _
    "Test4")
    Stop
    End Sub
    End Class
    Let me know your results please?
    Still lost in code, just at a little higher level.

  • How can I detect the PC show down event?

    I want to save a file to a certain destination once the PC shut down event happened.
    And the save process must be proceeded prior to the PC shutdown.
    How can I detect the PC shut down event?

    Hi there
    Try the "Application Instance Close?" Event.
    Best regards
    chris
    CL(A)Dly bending G-Force with LabVIEW
    famous last words: "oh my god, it is full of stars!"

  • How can I detect in Business HTML that the app was called from portal?

    How can I detect in Business HTML that the app was called from portal?
    I need to distinguish whether the application was called from portal (URL iView) or by using an URL outside of portal.
    So what I'm looking for is a variable or function that can be used like this:
    `if (~within_portal==1)`
      do this if called from portal
    `else;`
      do that if not called from portal
    `end;`
    For example, can I check in the program that there is a SSO2 cookie from the portal?
    I'm using Integrated ITS in Basis 700.

    Here is the trick:
      if (sapwp_active=="1")
        in portal
      else
        without portal
      end;

  • How can I detect if I'm running a compiled versione of my application?

    In my application I have included some special functions I don't want my customer to use. Since I will distribute the application as an .exe file, instead of cutting away those functions before releasing the .exe, I want to hide them when the application is runnig as an executable, and leave them active when running in the LV environment.
    How can I detect if I'm running an executable or the LV environment? Do I have to scan the application name until I find an .exe different from labview.exe or there is another way to obtain the flag (something similar to CVI function InStandaloneExecutable() for example)?
    Roberto
    Proud to use LW/CVI from 3.1 on.
    My contributions to the Developer Zone Community
    If I have helped you, why not giving me a kudos?

    An application property exists:Application:Kind
    with the following values: Development System, Runtime System, Student Edition, or Embedded LabVIEW.
    greetings from the Netherlands

  • How can I detect the vertices of a rectangle in my image ?

    I have applied a gradientMagnitude operator to my Image, and now I can see the shape of a rectangle with also other lines.
    How can I detect the vertices of the rectangle in my image?
    thank you

    Right mouse click the song and select "Get Info", go to option tab and check both Start Time and Stop Time.  Type in the Start and Stop time then click OK

Maybe you are looking for

  • 10.6.8 update crashed before it completed and now the Finder won't launch

    This morning I was installing the update on my 25" iMac 2.8 GHz Intel Core 2 Duo (was at 10.6.7) and after almost 15 minutes of the installer claiming to be moving files around, the screen went blank except for being backlit. After few minutes of pon

  • How to configure two separate channels

    Hi all, I'm working with a two nodes RAC using 9.2.0.8 Enterprise edition. I want to configure the archivelog backup: CONFIGURE CHANNEL 1 DEVICE TYPE 'SBT_TAPE' CONNECT 'rman_intranet/oracleto@DBCIAT01' PARMS 'ENV=(TDPO_OPTFILE=/home/adsmadm/rman_DBC

  • Problem in installing Windows 8 on T430 laptop

    I just received 3 new T430 laptops in my office and tried install winodws 8 on them with the pre-configured bootable DVD with ImageX. But, just after the initial "W8 PE boot mechanism 9.1" screen the laptops aregetting re-started automatically withou

  • PI / XI content for SAP APPL 6.04?

    Hi guys, I would like to use the Business Partner functionality (create, read etc) in SAP PI 7.1. We currently only have PI content for SAP APPL 6.03.....but the SYNCHRONOUS interfaces I really want are in SAP APPL 6.04. Here are the interfaces I nee

  • ITunes 11.1.5 Won't Update Apps

    About Mid Feb 2014, my iTunes 11.1.5 on my MacBook Pro suddenly "refused" to update Apps or download new Apps over my home wifi.  However, it had no trouble quickly downloading content like video podcasts and even HD movies. I searched high and low f