LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

How to generate an excel file?

Solved!
Go to solution

Hello touha

I'm happy you have solved your problem Smiley Happy

 

Regarding your new problem, it is generally better to open a new thread in case a question is not strictly related to original one, as in this case. Anyway, you could save your max and min values (as well as any other permanent value you want to resuse in the program) in a single file that is updated on program close and read back on program start. You can manage this file with standard file I/O functions or better with the IniFile instrument, that permits you to handle files in .INI format, which is quite common in Windows environment. I suggest you to look at that instrument, which can be found in <CVIfolder>\toolslib\toolbox\inifile.fp. There is also an example program that shows its features and this instrument has been discussed several times on the forums.



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 31 of 38
(1,412 Views)
Hi all; Honestly, i never worked on ini. files, and i've not enough time to look for it :( i tried something like this: //function main temp=fopen(fichier, "a"); fclose(temp); //function save_data ............. int FILEs[]; ............ temp=fopen(fichier, "r"); // open the file tor ead it fscanf(temp, "%d", &FILEs); //read the values already stored in the file fclose(temp); .................. FILEs[1]=0; FILEs[2]++; //need to increment that one ............... temp=fopen(fichier, "w"); fprintf(temp, "%d", FILEs); // write the updated values into the file fclose(temp); But, unfortunately, that doesn't work, i add something that let me to see the value of FILEs[2] avary time but it still tthe same.... Really, need your support; Kindest regards 🙂
0 Kudos
Message 32 of 38
(1,386 Views)

Without deeping into the structure of your program, if FILES is an array you cannot save it and read it back with a single "%d"

 

Try with

  fprintf (temp, "%d; %d", FILES[0], FILES[1]);

and the corresponding modified fscanf.



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 33 of 38
(1,370 Views)

Hi Roberto;;

9547854785 thanks for all ur supports, life is pink now 😛

Now, all is good, i've to try my famous application on the board and look if there's some bugs , hope no because it's OK by only the RS232 which input & output are related toe ach other;

Have a nice day, and may be i'll be back 🙂

0 Kudos
Message 34 of 38
(1,357 Views)

Hi all;

How to kill a processus with labwindosw?

Many thanks 🙂

0 Kudos
Message 35 of 38
(1,337 Views)

Hi;

Need reply ASAP pls;

🙂

0 Kudos
Message 36 of 38
(1,329 Views)

your post has very little to do with the initial subject of the thread (how to generate an excel file), so you should better start a new one

Message 37 of 38
(1,327 Views)

Hi touha,

 

LabWindows/CVI is a C environment, so you can use normal C commands to kill the process. I have included links below to a very comprehensive article about how to kill a process given a name, as well as a method of killing a child process by the parent process.

 

As Wolfgang mentioned, it is a good idea to create a new thread when you have a new question. It helps others find and contribute or learn from the thread.

 

How to kill a child process by the parent process: http://stackoverflow.com/questions/6501522/how-to-kill-a-child-process-by-the-parent-process

 

How to kill a process given a name: http://www.codeproject.com/Articles/3374/How-to-kill-a-process-given-a-name

 

Regards,

 

Jason D

Applications Engineer

National Instruments

0 Kudos
Message 38 of 38
(1,301 Views)