04-26-2006 08:48 AM
04-26-2006 09:52 AM
1) It may be that when the data is flowing to the STDIO, that it is so intensive it is taking all the CPU time and not allowing for other servicing. You may want to look into spawning a thread (CMTSchedulethread) to make this time share more.
2) If you made your program a DOS type application and this is what created your window, then when you kill it, you kill your program. I think I put out IO to a window also and closing that window closes your program. It may be because it is part of your executable so when you kill part, you kill all. Just don't close the STDIO window.
3) to distribute an executable(in CVI8.0 paralnce), go under Build-Distributions-Manage distributions to create a distribution file. You can then go to Build-distributions-Build xxx (where xxx is the name of your project). This will build a directory called cvidistkit which will contain a directory called build1 (and maybe build2....buildN depending on size). Copy the files in build1 onto a CD, memory stick, or any media and you can take that to any other computer (running proper OS) and run the Setup.exe file that is in the build1 directory. this installs everything you need onto the target computer. Any ancilliary files (input files, password files, etc.) will need to be managed when you do the "manage distribution" function.
04-26-2006 01:24 PM
I looked at the sample code you posted here: http://forums.ni.com/attachments/ni/180/22741/1/headtracker1.txt. There is a way to capture windows events to prevent the stdio window from closing your application, but I can not remember what it is at the moment. Have you considered putting numeric indicators on your panel and using them to display the bird_data information. This brings the data display into the cvi environment and eliminates the much slower stdio output along with the related issues.
What you would do is simply replace the printf with SetCtrlAttribute(panel, control, ATTR_CTRL_VAL, pos[0])... etc. where control is the ID for each of the numeric indicators you create on the user interface. You would create one for each value you wish to display. This also opens up a number of other options to display the position and angles on a graph or image format.
As scomack pointed out, you will create a distribution kit to install your application on PCs that do not have CVI installed. Once this has been run the first time, the CVI runtime library will have been installed along with your application. At this point when you need to make updates you can change just the .exe/uir file, or issue a new distribution kit, your choice. Uir files can also be embedded within the exe, so only the exe has to be updated. Distributing only an exe (and not the entire runtime) can be usefull when distributing applications where small distribution size is important.
Good Luck.
05-30-2006 08:34 PM
05-31-2006 04:47 AM