First call is always true

I want to set the value of a numeric slider every time a sertain mode is set. I would suspect the "first call' would be the obvius solution. But for some reson it is always
'true"
Is there a nother good way of solving this problem, or am I doing somthing wrong?
/REO
Attachments:
Rhino interface.vi ‏290 KB

Hai,
The first call function will always return TRUE in your case the reason is as follows:  When a VI runs for the first time this fuction returns TRUE and this VI should remain in memory (in execution mode) so that when it is called the next time it will give FALSE.  But the vi does not stay in memory i.e. when you press run button it executes and unloads from memory when execution completes.
One Workaround is keep the VI in memory or put a while loop with unintialized shift register and should run only once! Look at the VI that i have attached.
Hope this helps.
With regards,
JK
(Certified LabVIEW Developer)
Give Kudos for Good Answers, and Mark it a solution if your problem is solved.
Attachments:
Rhino interface1.vi ‏129 KB

Similar Messages

  • Using first call? in LVOOP

    LVOOP experts,
    I am quite green when in comes to LV classes, but am striving to understand them better.
    Is there any way to use the First Call? primitive inside a static dispatch method VI? It seems to work fine when I have one instance of my class, but does not work if I create several instances (which was my goal in the first place). The First Call only returns true for the very first instance, all the others it returns false all the time.
    It is quite easy for me to add an initialise method to the class, but was wondering if its possible to do it with the First Call?
    Thanks
    Neil
    nrp
    CLA
    Solved!
    Go to Solution.

    First things first:
    I am not a LVOOP expert but I am trying!
    You can use the fFirst Call but it wil only be true the first time the containing VI runs. It could be used to develop a Singlton design pattern so that if multiple threads try to init the class using a VI with First Call could enusre that only a single instance it created.
    I think you should go with the "Init" or "Create" method for each instance.
    like i said, I am no expert. Please reply if I am not making sense!
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • Why poor WCF performance for first calls?

    I'm seeing some weird WCF call timings that I can't explain, and it is causing some real issues in my application. My WCF service calls seem to be taking hundreds of milliseconds if not seconds longer than they should.
    I've set up a simple SL5 project hosted in a web app project just to reduce the variables, and I still see terrible timings.
    I've got a very simple WCF service call, and I'm using ClientBase to instantiate the service instance, then I'm calling the service in a tight loop 30 times (asynchronously).
    The problem is that the first handful of calls take extremely long, according to the IE F12 tools. I'm seeing network times of between 500ms and 2000ms. After that, all of the service call times drop down below 100 ms. The problem for me is that,
    when I am just calling the service once in an application, I am seeing these initial delays, meaning every time I call the service it tends to take a really long time. I only did the tight loop test to see if things get better over time, which they do.
    I would imagine it is doing something like establishing the initial channels, and that is what is taking the hit, and then calls after that just reuse them, but is there anyway to reduce that initial hit? Adding tons of extra time to each of my
    calls in the real app is killing my performance.
    Here is a screenshot of F12 with the call results. You can see the first bunch of calls take an extremely long time, then everything gets nice and quick after:
    Here is the calling code in the test app:
    Private Sub TestWcfClientBase()
    Dim client = ServicesCommon.GetService()
    client.Proxy.BeginGetCurrentUser((AddressOf OnGetUserCompletedCommon), Nothing)
    End Sub
    Public Shared Function GetService() As ServiceClient(Of IServiceAsync)
    Dim service As New ServiceClient(Of IServiceAsync)("IServiceAsyncEndpoint")
    Return service
    End Function
    Public Class ServiceClient(Of T As Class)
    Inherits ClientBase(Of T)
    Implements IDisposable
    Private _disposed As Boolean = False
    Public Sub New()
    MyBase.New(GetType(T).FullName)
    End Sub
    Public Sub New(endpointConfigurationName As String)
    MyBase.New(endpointConfigurationName)
    End Sub
    Public ReadOnly Property Proxy() As T
    Get
    Return Me.Channel
    End Get
    End Property
    Protected Sub Dispose() Implements IDisposable.Dispose
    If Me.State = CommunicationState.Faulted Then
    MyBase.Abort()
    Else
    Try
    Catch
    End Try
    End If
    End Sub
    End Class
    The client config is as follows:
    <system.serviceModel>
    <bindings>
    <basicHttpBinding>
    <binding
    name="NoSecurity"
    closeTimeout="00:10:00"
    openTimeout="00:01:00"
    receiveTimeout="00:10:00"
    sendTimeout="00:10:00"
    maxBufferSize="2147483647"
    maxReceivedMessageSize="2147483647"
    textEncoding="utf-8">
    <security mode="None" />
    </binding>
    </basicHttpBinding>
    </bindings>
    <client>
    <endpoint
    name="IServiceAsyncEndpoint"
    address="http://localhost/TestService.svc"
    binding="basicHttpBinding"
    bindingConfiguration="NoSecurity"
    contract="Services.Interfaces.IServiceAsync" />
    </client>
    </system.serviceModel>
    Here is the stripped down service code:
    <AspNetCompatibilityRequirements(RequirementsMode:=AspNetCompatibilityRequirementsMode.Allowed)>
    <ServiceBehavior(InstanceContextMode:=InstanceContextMode.PerCall)>
    Public Class TestProxy
    Implements IServiceAsync
    Public Function GetCurrentUser() As WebUser Implements IServiceAsync.GetCurrentUser
    Dim user As New WebUser
    With user
    .User_Name = "TestUser"
    End With
    Return user
    End Function
    End Class
    And here is the service config:
    <system.serviceModel>
    <serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true"/>
    <bindings>
    <basicHttpBinding>
    <binding name="NoSecurity" closeTimeout="00:10:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:10:00" maxBufferSize="2147483647" maxReceivedMessageSize="2147483647" textEncoding="utf-8">
    <readerQuotas maxDepth="32" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="4096" maxNameTableCharCount="16384"/>
    </binding>
    </basicHttpBinding>
    </bindings>
    <behaviors>
    <serviceBehaviors>
    <behavior name="TestProxyServiceBehavior">
    <serviceMetadata httpGetEnabled="true"/>
    <serviceDebug includeExceptionDetailInFaults="false"/>
    </behavior>
    </serviceBehaviors>
    </behaviors>
    <services>
    <service behaviorConfiguration="TestProxyServiceBehavior" name="TestProxy">
    <endpoint address="" binding="basicHttpBinding" bindingConfiguration="NoSecurity" contract="Services.Interfaces.IService" />
    <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>
    </service>
    </services>
    </system.serviceModel>

    Hi ChrisMikeC,
    Based on your description and config file, it seems that you host your WCF Service in IIS and you try to consume this WCF Service in a SL5 project, if I do not misunderstand you, in my mind when we are hosting our WCF service in IIS, there is a high
    cost for the first call. On the first call to our WCF service, IIS must compile our service. Then IIS must construct and start the service host, so it will be slow in the first call. For more information about how to improve the time for the first call, please
    try to refer to
    this article. Meanwhile please try to host your WCF Service in Windows Activation Services or Windows Service in where you will have greater control on the service host startup.
    Besides, since your SL5 project hosted in a web app, then in my mind ASP.NET applications always takes longer in first call because it includes JIT compilation step, and ocne the code is compiled, all the calls thereafter are faster than first one, so please
    try to use the Console application or a Windows Forms appliction to test if the time can be slow down.
    Best Regards,
    Amy Peng
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • CoCreateInstance returns 0x8007007e (Module could not be found) for the first call only at system startup on Windows 2008 Enterprise SP2

    Hi Guys,
    I'm experiencing a problem with CoCreateInstance, where it returns error 0x8007007e.
    The code is something like this:
    HRESULT hRes = S_OK;
    CComPtr<IMyInterface> spObj;
    if(FAILED(CoInitialize(NULL))) { /* quit */ }while(FAILED(hRes = spObj.CoCreateInstance(CLDIS_MyClass, NULL, CLSCTX_LOCAL_SERVER)))
    // LogFailure(hRes);
    Sleep(10);
    The problems occurs only on a single machine having Windows 2008 Enterprise SP2 installed (it works fine on other machines / OS versions). It happens only during the system startup (this is a Windows Service) and only for the first call of the CoCreateInstance.
    The second call always succeeds.
    The problem does not occurr when starting the service manually from Services.
    I did some investigation using Process Monitor and found that the HKCR\CLSID\[CLSID of MyClass]\LocalServer32!LocalServer32 registry value is accessed before the failure. The registry value exists - it is added by the Windows Installer during
    installation.
    If I remove the registry value then the CoCreateInstance always succeeds.
    I've been trying to lookup for some documentation on HKCR\CLSID\...\LocalServer32!LocalServer32 but haven't found anything useful other than it's a "Windows Installer Entrypoint". I assume that the Windows Installer does some integrity checks when
    calling CoCreateInstance for such class and this fails for some reason but currently I fail to find the reason.
    Can anyone help finding out what's the root cause of the 0x8007007e error here, please? Any help or tip is much appreciated.
    Many thanks!
    Marcin.

    Hi Marcin,
    This forum is mainly for talk about the product use related issue and not the best place to talk about the develop issue, for the develop issue we can post in MSDN forum for
    the further help and your issue may need capture a dump then for the further analysis it is not an efficient way to work in this community since we may need more resources which is not appropriate to handle in the community. I‘d like to suggest that you submit
    a service request to MS Professional tech support service so that a dedicated Support Professional can further assist with this request.
    MSDN forum
    https://social.msdn.microsoft.com/Forums/en-US/home
    Please visit the below link to see the various paid support options that are available to better meet your needs.
    http://support.microsoft.com/default.aspx?id=fh;en-us;offerprophone
    Thanks for your understanding and support.
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Support, contact [email protected]

  • Skype Windows client hangs for the first call - co...

    Hi,
    Skype on my Windows 8.1 (depending on its mood) hangs for the first call. It will keep ringing and ringing till it times out, during that time I am not able to hang up the call as well, the red hang up button doesnt work and we have to let the call go on till it drops on its own. Then on the second try it connects perfectly fine. This happens most of the times, there are only a few days where it connects on the first try otherwise its always the 2nd time. 
    Please let me know what could be the possible solution for this one?
    Thanks

    Hi Marcin,
    This forum is mainly for talk about the product use related issue and not the best place to talk about the develop issue, for the develop issue we can post in MSDN forum for
    the further help and your issue may need capture a dump then for the further analysis it is not an efficient way to work in this community since we may need more resources which is not appropriate to handle in the community. I‘d like to suggest that you submit
    a service request to MS Professional tech support service so that a dedicated Support Professional can further assist with this request.
    MSDN forum
    https://social.msdn.microsoft.com/Forums/en-US/home
    Please visit the below link to see the various paid support options that are available to better meet your needs.
    http://support.microsoft.com/default.aspx?id=fh;en-us;offerprophone
    Thanks for your understanding and support.
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Support, contact [email protected]

  • When I receive calls I always get the option to remind me later, but only certain times I get the option to respond with text.  Is there a setting I need to update to always get this option?

    When I receive calls I always get the option to remind me later, but only certain times I get the option to respond with text.  Is there a setting I need to update to always get this option?  Also i can't use location reminders.  Is this because my calendar is in Outlook?

    The only known way to make it work on an external drive is by first installing Windows onto an internal drive, then cloning the install to an external Thunderbolt drive. Thunderbolt is seen as an extension of the internal bus, so Windows doesn't see it as an external device.

  • First call function problem

    hello there,
    i am using labview's first call function inside a for loop, inside a sequence structure. inside the for loop the function works fine activating a true/false structure, however, when i attempt to do the same thing outside the for loop i get a broken arrow. It says that the the tunnel of the case structure, to which i have wired the first call function, is missing an assignment to it. Cant understand why it is fine in one part and not in the other. Perhaps somebody has encountered this before? I have atttached the relevant code
    Thank you
    Dave
    Attachments:
    forum.vi ‏467 KB

    Stranger, I think if you will look closely at the case statement you will see that you have inadvertently added an output tunnel. Either delete the case and redo it or just click on the input tunnel and move it down enough to see and delete the unwired output tunnel.
    goldie

  • Make a subVI do something on first call

    Hello,
    I have a SubVI I made and I want it to do one thing the first time it's called and then as long as the program is running it should do another thing.  Right now I have a  "First Call" function wired to it, and that passes it a tru the first time my SubVI is ecounterd and a flase every other time... this works... but I was wondering if there is a way to do this from within the subVI itself?
    Thanks!
    Solved!
    Go to Solution.

    Why don't you place the "first call?" primitive inside the subVI?
    LabVIEW Champion . Do more with less code and in less time .

  • Re-seting "first call?" in sub VI

     I am trying to use the 'first call?" thinger in a sub-VI.  I thought it would re-set when the sub-VI was closed, but when it is called again, the "first call?" thing does not give me a true.  Is there any way of correcting this?

    The state has nothing to do with the visibility of the front panel, it will reset every time you newly start the toplevel VI.
    For any given run (not subVI call!), "first call?" will be true exactly once.
    If you want your case to be true every time the subVI is called, replace it with a TRUE boolean diagram constant Another option would be an initialized shift register. It really depends on the details of your code.
    LabVIEW Champion . Do more with less code and in less time .

  • I made my first call!

    So this is my 4th iPhone. I've owned all prior versions. Today I had to visit an Apple store because I had an issue with my computer. After taking a look and fixing the issue, the Genius said I could also call Apple Care. I told him I don't have a phone at home. At this time he glanced at my iPhone and said what about calling from it. I said, you can actually make calls from it? I thought it was a PDA device!
    So I went home afterwards and made my first call! I wish Apple would've advertised this as a phone too. I always see commercial for using apps.

    Modular747,
    Lately I am having allot of fun in this Forum, in the iPad Forum I found someone that was trying to insert a CD on the iPad 2 to play music, an he was complaining that the hole at the botton of the iPad was to small and asking if Apple would fix that for him.
    Now I find Someone that says that he already is in his 4th iPhone and post something like we can read above.
    meaning that he have being using all his iPhones as a PDA and never made a Call in one Before.
    I am curios to know what kind of problem he had with his computer.
    I need to believe that he is just making a joke, please this is better than going to a stand up comedy show.

  • Lync 2013 : two problems 1) quicked off from meeting when presenter change 2) Freeze when leaving first call of day

    Hello,
    I have two problems with Microsoft Lync 2013 (see level in screenshot). The first one appeared after May Windows updates and is so annoying that I decided myself to open a post in this forum, with the second one. The first problem is the most important for
    me (see why when reading) and the second one is the cherry on the cake if solved, but is minor.
    1) I'm kicked off from meetings when presenters change
    In an online meeting, when presenters change, I'm kick off since last May updates (very clear since it didn't happen before). I'm unable to specify if it occurs when I'm presenter or just attendee, but that could influence. I will try to report if/when I
    notice a difference.
    THIS IS REALLY IMPORTANT, Please help me solve this !
    2) Lync freezes for approx. 30' to 1min. when leaving first call of day
    I reboot my PC every day. I always notice that after leaving voice call from my first meeting of the day, Lync freezes (doesn't respond message) for 30' to 1min. This is when I leave audio, not meeting window. This never occurs again in the course of the
    day. Windows goes into hourglass, then it works again.
    Does anyone know about this ? Any action to help diagnose or solve this ?
    Again this is less important than first problem
    Thanks for help
    -Pierre

    The steps to remove the update:
    Open Control Panel, click Programs, and then, under Programs and Features, clicking View installed updates.
    Click the update that you want to remove, and then click Uninstall.
    For Lync 2013 May 2014 update, it is KB2880980.
    You can check the following website about the drivers:
    http://www.driverscape.com/download/plantronics-c320-m
    Note: Microsoft is providing this information as a convenience to you. The sites are not controlled by Microsoft. Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. Please make
    sure that you completely understand the risk before retrieving any suggestions from the above link.
    Lisa Zheng
    TechNet Community Support

  • IPhone 4s call waiting; how do I get back to the first call?

    When I'm on a call and a second call comes in I tap "hold current call and answer." I get connected to the second call and the first call is put on hold. But when I am done with the second call, how do I get back to the first call? I can't find any way to get back to the call that is on hold. I usually end up hanging up on both calls. Not good.
    Also, how do I switch back and forth between two calls? How do I put the second call on hold, go back to the first call to tell that person I must call them back, then return to the second call?

    http://support.apple.com/kb/TA38607?viewlocale=en_US
    Good Luck

  • How to quickly pick up a 2nd call and drop the first call

    If I am on a phone call, and then a second call comes in, then how can I quickly pick up the second call and DROP the first call?  I can do it if I put the first call on hold but then I have two calls going.  If I simply END the first call, then it takes 5 or 6 seconds for the second call to come in.  Several times I have lost the second call because it took too long to transition over. 

    never mind i did a direct chat with a skype rep and got my answer which is no.

  • Verizon's iPhone 4S is dropping the first call almost all the time?

    Hi.
    I have a verizon iPhone 4S.
    Everytime I make the first call to someone, I don't hear anything.
    When I end that call and try calling again, it works.
    This has been happening almost all the time.
    I tried letting the phone app turned on but it doesn't solve the problem.
    I'm not sure if other carrier's iPhones are having this problem.
    Does anyone know what the problem is to this?
    Thank you very much.

    I tried letting the phone app turned on but it doesn't solve the problem.
    What does that mean?
    Try a reset by pressing the home and sleep buttons until you see the Apple logo, ignoring the slider. Takes about 5-15 secs of button holding and you won't lose any data or settings.
    If still a problem, restore.
    If still a problem, take it in to Apple for a warranty replacement.
    IMO, you'll probably end up taking it in to Apple but the other steps are worth trying.

  • Cannot pick up calls on wait, Cannot make a second call holding the first call

    I have a really weird problem with my iPhone 5S. (iOS 7.1)
    1. When I am on a call, I am not able to pick up a second call that is on wait. I can see the second call, I can hear the beep sounds but as soon as I pick up, the call freezes in 00.00 time, and My first caller is still active, not on hold.
    2. When I am on a call, I am not able to make a second call placing the first call on hold. The second call disconnects immediately with 3 beeps.
    3. I am able to see the incoming calls on wait, when I am already on a call. I am able to hear the beeps coming in. SO it means the call waiting is on (Tried turning it on/off/on too.) But when I pick up the call, the above problem comes in.
    What have I tried to solve this: (None of them helped)
    1. I tried a hard reset of my iPhone (Holding Power and Home button)
    2. I tried toggling the Call waiting button
    3. I tried resetting network settings.
    4. I called my Operator for assistance. I am using Airtel, India. They told me to dial this code - *43# . I tried it and it gave me this screen. But the problem is not solved yet.
    Is there anybody here who is facing the same issue with your iPhone? I never had this problem with my iPhone 4.

    Make sure you do not have "Do Not Disturb" turned on. This feature will block the first call, but is someone calls right back it will be put through.
    On the iPhone, go to Settings/Do Not Disturb
    Make sure you do not have Do Not Disturb turned on manual or scheduled.

Maybe you are looking for

  • HDMI cables do not work on my AppleTV

    i tried connecting my apple tv to my Marantz projector via HDMI cable, and its not finding it. it just says "signal not found." my component cables work just fine on it, but no-go on HDMI. and i know the HDMI cable works fine because i've used it on

  • Table with fields containig more thn 300 characters

    Hello Friends, i want to create one ZTABLE and intht i want a field tht can store more thn 300 characters. i have used string data type for the same but while activating the table its giving me error saying : " Table contains more than 3 long string

  • Trying to open a TIF file in 32 bit PS, keeps opening in 64 bit

    I have tried changing file type associations in Windows, changing file type associations in Bridge, changing the registry, right clicking and selecting open with, and nothing works. The only way I can do it is to drag my file to the 32 bit PS icon. H

  • Mini-Disc Plug-i

    Hi,I have the X-Fi Card. I heard that you can record music from the computer to my Mini Disc Player using the Mini Disc Plug-in.Where is this mini disc plug in?I opened the MediaSource Organizer but it's nowhere to be found. I downloaded the plug-in

  • Force same character encoding in UNIX as in Windows

    My program reads a simple text file and outputs the same on the console. The file contains special characters like àéèéàöäül etc. The goal of this exercise is to make java recognize special characters both on the UNIX and on the Windows system in the