Initialization problem

Hello

This is my code:

int main (int argc, char * argv [])
{
error int = 0;

/ * initialize and load resources * /.
nullChk (InitCVIRTE (0, argv, 0));
errChk (panelHandle = LoadPanel (0, "CVI GUI.uir", Panel));

/ * display of the control panel and run the user interface * /.
errChk (DisplayPanel (panelHandle));
errChk (RunUserInterface ());

initialize everything
if(cycle == 0) initialize (Panel);
else ResetTextBox (Panel, tabPanel1_tbxSystemMessage_A, "not initialized");

Error:
/ * Cleanup * /.
If (panelHandle > 0)
DiscardPanel (panelHandle);
return 0;
}

Sub Initialize (int Panel)
{

srand (time (NULL));

now activate timer
SetCtrlAttribute (Panel, tabPanel1_tmrTIMER, ATTR_ENABLED, TRUE);

} //END Initialize()

I met 2 problems that I can't fix right now.  I use global variable 'cycle' as my number of cycles, with the initial value of 0.  'cycle' is incremented by 1 each time that ticks of the timer.  In the Main() code, when it is zero, I call my function Initialize().  However:

1. the Inifitialize() function is never called.  The timer is never activated.

2. the object referencing a problem.  This line:

ResetTextBox (Panel, tabPanel1_tbxSystemMessage_A, "not initialized");

has a problem with 'Panel' (a global object).  I try again with 'panelHandle', and always he fouls out.  Same thing with this line:

SetCtrlAttribute (Panel, tabPanel1_tmrTIMER, ATTR_ENABLED, TRUE);

The "jury" passed is incorrect if the timer is never activated, but I don't know what is right for him.  Anyone has an idea on how to fix it?

I think I found the root of the problem.  These two lines:

errChk (DisplayPanel (panelHandle));
errChk (RunUserInterface ());

bring up the user interface and the thread goes in.  Anything done on the user interface written after these two lines are not executed until the thread leaves the user interface.  The Timer object exists only in the UI thread.  Thus, anything done to the "jury" and the timer object must be within the UI thread.  I changed my code to get concrete results.  in any case, thank you so much Wolfgang.

Tags: NI Software

Similar Questions

  • Codec initialization problem!

    Hello

    I'm trying to use Adobe Media Encoder CS6 to convert a mov file to size 3072 by 768 resolution f4v to the same attributes.

    However, I get the error Codec initialization problem!.

    I can convert f4v 1920 x 1080 or other lower resolutions.

    Help, please.
    Thank you

    I am able to export 3072 x 768 to F4V, if I set the profile: high and level: 5.1

  • Testo 176 - Serial initialization problem

    I'm trying to get the 176P 1 talk with labview Testo 2011.

    I downloaded the TestoToolbox and also got an update for German help with an installer of Toolbox2.exe.

    In any case I can't pass the initialization process with the tcddka.dll of the Testo (V1.2).

    I have a simple question: this device name feed to the Init procedure?

    (1) the name, you can see in devicemanager?  in my case "testo 175-176-2010"--> Exception occurred in tcddka: invalid DeviceName in testo init.vi series

    (2) give but: 'testo175-176-2010'--> me ' Exception occurred in tcddka: the device does not respond in the series init.vi testo ".

    (3) or the general "testo175-177" translates by "Exception occurred in tcddka: the device does not respond in the series init.vi testo".

    Seems that I put the COM port correctly!

    + testo software is able to connect with the device without problem.

    earliers messages on a Testo gas detector, I have seen characters added and changes made to the comsoft.cat file...?

    All suggestions are welcome!

    I managed to get this 'base software comfort' currently running on a computer at home and changed the mode of operation of 'Connect' to the "extent", see below the image

    This cannot be given with the Lee Version 5 software, you have V4 that I found on the Web site, but has received assistance in Germany.

    This solves the problem and now I can acquire the data of the device with the highest vi attached!

  • initialization problem multiple serial

    Hello all

    I have attached a vi that gives me a problem I cannot solve and would appreciate any help.

    The vi is supposed to intialise up to 7 ports series (only using 5 at the moment), and I guess that's a plausible way to do initialization (maybe wrong). The serial ports are connected to a pc via a usb hub. The windows XP operating system recognizes the Device Manager ports.

    The problem is that when the vi is executed, the following error is reported as shown in the word document attached.

    I compared the port settings in the properties in Device Manager for each port to the vi settings, and they match. What can we do?

    If anyone has a configuration with several serial ports could try the vi and see if it works for them?

    Thank you and best regards

    Ray

    It has nothing to do with several serial ports.  This has to do with an invalid parameter, you are trying to use it to configure one of the serial ports.

    Look at the information in the error message.  Point 4 of the property node to configure Serial Port VI is the setting of Stop Bits.  I see a point of stress goes in this VI, then that tells me the type of data in performing connections does not quite.

    You have an array of values of I32 and your values are made up of 1.  Disconnect this table and right-click on the terminal to configure Serial Port VI and choose Create Constant.  You'll see you get a data type of ring.  It's a U16.  But if you look at the items in there, you will see that the stop bits 1.0 has a value of 10.  1.5 has a value of 15, 2.0 has a value of 20.  If the value of 1 has no meaning to this property node and you get an error.  You should be wiring in a value of 10.

    Delete this table.  Create a table of constants in the ring.  Turn it into a control, and then choose the value of the correct ring for each item in your table.

    You have several other points of constraint.  They may not cause problems, but I consider disconnect them, create a constant of the correct data type and that using the table that you wire to configure Subvi.

    I have modified your VI and attached to it.  See if it works for you.

  • EJB initialization problem

    Hi all

    I've migrated EJB 2.1, EJB 3 in my JSF project and facing a few problems during initialization by annotations.


    My JSF Managed Bean 1
    @ManagedBean(name = "mybean1")
    @RequestScoped
    public class MyBean1 { 
         public MyBean1 () { 
              super(); 
         }
    
         private String defaultTab = "";
         
            @EJB(name = "MyEJB") 
            private MyEJB myEJB;
    
         @javax.annotation.PostConstruct 
         public void init() {
              defaultTab = myEJB.retrieveDefaultOption(); 
         }
         
         public String loadDetail() {
              System.out.println("defaultTab::"+defaultTab);
              return "detail";
         }
    }
    My JSF Managed Bean 2
    @ManagedBean(name = "mybean2")
    @SessionScoped
    public class MyBean2 { 
         public MyBean2 () { 
              super(); 
         }
    
         public String showDetailForTracking() {
              MyBean1 myBean1 = new MyBean1();
              myBean1.loadDetail(); // Always prints defaultTab::     
              return null;
         }
    }
    When the loadDetail at 1 bean method is called bean 2 as shown in the snippet above, the default tab value is always "' as the EJB is not being built.

    Is there a way to solve this problem. Any suspicion on this would be much appreciated.

    Thank you.

    Think about it: you build MyBean instance yourself. Why do you want that the container to inject magically reference EJB in it then?

    Good mechanics JSF allows to inject the instance MyBean1 MyBean2! JSF 2 any book or article would have told you how. You can use the ManagedProperty JSF annotation:

      @ManagedProperty(value="#{mybean1}")
      private MyBean1 myBean1;
    

    or if you're on a JEE 6 container you can invest time in research on how to use the Commission for not only one model standardized injection.

    And a final tip: you make your life unnecessarily difficult by substituting the names of the default bean.

  • Satellite A45 initialize problem

    I had a problem with my plug and play then tried to reinstall them to my XP CD (big mistake)! Everything goes well until he had almost finished. Now, then everything happens is when I boot, I get a full page message telling me to choose either choose - Safe Mode, Safe Mode with network, Safe Mode with command prompt, called last good Configuration, or start Windows normally.
    But who ever I choose the machine just goes in the same loop.

    I have the drive to restore but if I use it I lose all my information it makes the machine to 'factory settings '.
    Can anyone help, please.

    Hello

    My Tip:
    Remove the HARD drive. Put it in the USB external enclosure. Connect it to another computer. Secure all your important files form the external HARD drive to the second computer HARD drive. Replace laptop HARD drive in Toshiba unit. Recover the operating system from the Toshiba Recovery CD

  • ACER Aspire E1-571 initialize problem.

    Hi everyone, I recently bought a new hard drive for my acer Aspire E1-571 gor because the old one (500 GB hitachi) "crushed". Then I did today, it's a WD scorpio blue 2.5 "320 GB. I have installed the new drive, run an installation of windows 7 x 64 ultimate edition of windows install I divided on 2 partitions, formatted and installed the system disk. Installation is completely normal and fast but the laptop keep coming at startup screen ACER logo then restarts after the instalator finished and did the final restart before you run the Windows for the first time and again and again and again to infinity so I reinstall windows once more and it's the same thing. After that, I got the new drive from the laptop and put it in another laptop of mine an Asus and windows proceeded to the desktop without any problem. So my question is what is the case, do I need a disk for acer hitachi because no other brand will not work with it or what? or maybe its a sort of Matherboard problem with the disk?
    Thanks for the help!

    Hmm, how about uefi? After a few readings in a thread, it seems that bios is one of messing around.

    see this link; http://community.Acer.com/T5/notebooks-netbooks/Windows-7-UEFI-install-on-aspire-E1-571/TD-p/50201

    or perhaps this, simple and could be much more useful, http://community.acer.com/t5/Notebooks-Netbooks/Installing-Windows-7-on-acer-aspire-E1-571G/td-p/930...

    some posts here might be useful (as I browse some of them, some say install win7 on GPT with active uefi)

  • Table initialization problem.

    Hello

    I am new to Java, so I ran into a little problem.
    import java.util.Scanner;
    
    class Inventory{
    public static void main(String [] args){
    Scanner scan = new Scanner(System.in);
    System.out.println("How many items do you want to store?");
    final int length = scan.nextInt();
    String items[] = new String[length];
    System.out.println("You can store "+items.length+" items:");
    
    for(int i=0;i<items.length;i++){
    items[i] = scan.nextLine();
    }
    System.out.println("\nYou have stored:");
               
    for(String s:items){
    System.out.println(s);
    }
    
    }
    }
    If basically as you can judge by the code, this little program is supposed to ask the user for input on the number of items it wants to store in the table. And then on the user input value, the size of the array will be defined so that it will ask you to store as many elements he needed.

    The problem is, if I want to store 5 items for example, I type in 5 and I can store only 4 points. I thought that the paintings were supposed to start with an index of 0, so if I put 5 be stored 5 items (from 0 to 4), but instead it stores only 4... What could be the problem? First I thought it was the loop and published as "I < = items.length" but there was an OutOfBounds exception or something.

    I would appreciate your help, I need a detailed explanation that I want to understand how things work once and for all.
    Thank you

    Published by: 884351 on Sep 9, 2011 13:38

    Published by: 884351 on Sep 9, 2011 13:39

    I'm sorry I'm new here and don't know the code tags. However, the problem is that if I enter 5 as the size of the array it stores only 4 elements of what I noticed, is if I use
    scan.next()
    Instead of
    scan.nextLine()
    for inputs of the element of analysis, it works fine. So would it be possible that after I have the size of the input array and press the
    scan.nextLine
    takes the value of the input and stores it in the index 0 points [0]?

    Published by: 884351 on Sep 9, 2011 15:01

    884351 wrote:
    The problem is, if I want to store 5 items for example, I type in 5 and I can store only 4 points.

    No it's only your support.

    I thought that the paintings were supposed to start with an index of 0, so if I put 5 it must store 5 items (from 0 to 4),

    Yes your quite right.

    but instead, it stores only 4... What could be the problem? First I thought it was the loop and edited like

    No problem in the loop, he works in the way you run it. I say give Sysout loop and check, why he doesn't want input first.

    I will say that it is how you use the scanner.

    takes the value of the input and stores it in the index 0 points [0]?

    Yes, it looks that you have thought about it.
    I suggest you to use the code to read the length below.
    final int length = Integer.parseInt (scan.nextLine ());

  • Performance of OBIEE report initialization problem

    Hi all:

    Thanks for reading this first, please forgive a few appropriate words, I'm not good in English...

    I encountered a problem on the production, when the report is selected, it appears very slow even I made a few adjustments of performance on this report. And after I checked the session, when the report is selected, it works again with some WHAT SQL with each guest has value and it doesn't show any results in the present report.

    So, my question is, is it possible to not run this SQL or y at - it another way to better performance on this report?

    Thanks for answering that.

    I certainly have a lot of suggestions. But to really help, I need a little more detail.

    How different measures do you have in the pivot table? You have all time series analytics in there (as there is or far)? Approximately how many records are displayed in the PivotTable (100, 1,000,100,000)?

    More important still, you followed its use is enabled? If this isn't the case, please turn it on. Blog of John Minkjan here can help you activate it. [http://obiee101.blogspot.com/2008/08/obiee-setting-up-usage-tracking.html]

    If you manage to turn on tracking usage, we can see how much time is spent in the database compared to OBIEE. If it turns out that the bottleneck is the database, then you will need to work with your DBA to set up the database.

    -Joe

  • M15x initialize problem

    I bought a M15x in 2010, and recently, I have been see bad sectors on the hard disk that came with it. CHKDSK was able to extend the life a bit, but today it is eventually died. I bought a 480 GB SSD Crucial in anticipation of this, and I'm having some problems with getting my Win7 disc to install the OS on the new drive.

    The first question I have is "is the alienware Win7 bootable DVD?"  Otherwise, the rest of the post is probably not so important.  Technical support Alienware told me it was on the phone, but since my purchase was more than 4 years, I'm not sure that the person knows for sure.  If it helps, the following text is printed on the cover of the DVD:

    "Alienware Microsoft Windows 7 Home Premium 64-Bit.
    "This DVD is not for the resettlement of the programs or drivers."
    "The software included on this DVD-ROM recovery was preinstalled on your hard drive at the factory and cannot be used for backup and restoration of your Alienware computer system."
    "P/N DRGYF.

    If the DVD is bootable, then I'm not sure of the question-

    With the drive to factory installed, I can't see the splash screen "starting windows." It will boot past the bios "alienware head" on the screen and then just sitting there with a bright, blank screen for a while, and do nothing. I hear the hard drive basically to turn down and stop working. I know that the drive is still recognized, as if I go into the BIOS Setup, I can see it listed. If I have access to the diagnostics menu, I get a 'error Code 2000-0146', which I think is a note that the hard drive has bad sectors.

    When I put the new drive (a Crucial M500), I also put my bootable Win7 (I think, anyway) DVD, and turning, I get an error that says: PXE - E61: Media Test Failure, Check Cable and then "OS not found." It's just going to sit there. If I hit a key on the keyboard, it will wait a few seconds and display the same text again. I know that the DVD is ok, as other computers can be read. The new HDD is also listed in the BIOS, it seems to be seated correctly (even if I tried to reinstall it once or twice).  What I've read, this error occurs if the laptop computer is trying to boot from a network and is not configured for this.  This is what makes me think that maybe the DVD is not bootable, a startup from a network is after he tried the DVD drive.

    I also went back to my hard drive to the factory just to be sure I don't get the same error PXE, and I did not. I'm kinda at a loss here.

    A few other odd pieces of info-
    (1) with the new hard drive installed, when I run the diagnostic in the start menu, it will happen to the "do you see color bars (y/n)? And if I hit it, the test stops, and I have to restart the computer.
    (2) with the old drive, if I hit delete when the bios screen flashes, it will take me to a screen that allows me to choose Win7 or tool memory Windows. This seems to suggest that the hard disk is at least very readable.

    Is it a motherboard problem? I'd have to install myself in a laptop, but be would appreciate any help.

    Thank you
    Joe

    So I think that the DVD is bad or not bootable.  I tried to use it on a computer that I know has a good DVD player and the DVD does not start on this PC.  Just to be clear, this is the DVD I am referring to:

    The DVD reads very well when I'm actually in Windows.  He just seems not to want to start.  I will either try to find a bootable DVD that is well known to see if my cell phone is going to recognize that, or create a bootable USB key.

  • Equium L40-156 initialize problem

    I have an Equium L40-156. When I press the power button the power led lights up, but there seems to be no hard disk activity. I manually turn off by pressing the power button for several seconds, leave it for a few seconds and then press the power again button once it starts normally.

    Any ideas please?

    Hi mate,
    Have you recently updated your BIOS, installed a few more RAM / another HARD drive or software? Perhaps some update driver?

    Since when the error pops up? And you have always guaranteed on this subject?
    So, if so, then bring your machine to an authorized partner and let check your machine. Would be the best...

    Greetings

  • R61i initialize &amp; problems deleting files

    I am trying to repair a Lenovo R61i laptop is my daughter's computer. The computer has Type 8932-CTO on the bottom. It was a Vista machine which has been changed to XP factory.

    It does not start. Only, it displays the first page of Lenovo and goes to a black screen. Also, he's stuck on a dark screen setting. Fn + beginning of selection does not change. In a dark room, I see the screen well enough. It also has a battery that fails to load.

    I ran a test after using the rescue and recovery CD and it doesn't have the following:

    1. Motherboard: Port USB Test
    2. SMBIOS: Standards test
    3. CPU: Test multi-core - misconfigured

    Download a live linux cd you will boot from the cd then you can use usb to retrieve the files from the hard drive will appear in the envorment of linux by double clicking it, you can get the files

  • DesignJet 4000 ink system initialization problem


    If the printer requires installation of heads and then it was concluded the utility "purge tubes of ink.  There is no way to stop the process, it should be run.  Setup print heads are just empty resevoirs which are necessary to purge air from the lines of ink tube.  Once the tubes are purged with air, then you will be directed to remove the printheads of installation and install the regular print heads.   You will need to order a set of these heads of configuration to perform this procedure.

  • Menu initialization problem

    I have a menu with several buttons. If I click on one of the buttons as the site loads, I get the error object not initialized. If I call the menuClickHandler function in the Application creationComplete, then the menu will work only once.

    What is the best way to bring up the menu works only, after the needed objects are ready? What should I check if (myObject! = null) for every object? Should I use a timer to delay calling the function? What is the standard way to encode the menu so that it works correctly?

    -Laxmidi

    Bring up the menu disabled initially and then everywhere where in your code, you know all that the menu needs is ready, press the menu button.

    If this post has answered your question or helped, please mark it as such.

  • Re: Equium A300D - 13 X - boot problem

    Hello

    I can't initialize problem. Powers of phone on ok, with a few flashes of HARD drive as it tries to start. But no sounds other than the kick, fans have tried all the usual things like FN/F8 to enter safe mode, also cold start battery and network opens. Power button down for an all black screen minute etc etc, but still no screen or emits a signal. I suspect a power supply problem and have tried with different loader but no effect. Laptop is a 4 year old Toshiba Equium A300D - 13 X everything worked fine but I recently renewed keyboard, screen bezel, Mo media Ribbon, power/Ribbon button, Mo.

    I thought I might have left some cable detached so all reopened and checked, but everything is correctly fixed I think.

    Any help would be greatly appreciated.

    Thanks Bob.

    Hello Bob

    It is not easy to be objective with this problem. On one side you have disassembled your laptop on your own and we don t know if everything was done correctly. I m also not technician and each laptop disassembly has been a success.

    I put t really know what to say. Try to talk with someone who can help you with this and check if everything is OK. Small error as causing electrical circuit can damage the electrical components of the motherboard. Try to check the display cable connection.

    Have you tried to connect the laptop to the TV and check if all come to this?

Maybe you are looking for