LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

EXCEL

Hi all : Please attach see file, run application stam.vi :  This will create automatically directory c:\temp\currentdate\data.csvThe application will save data every time I run it … what I want in I same insert serial No , massage box will be appeared on screen that tell user " this serial Number exist " then this serial number would not saved in file , if not " serial No not exists " it will saved it   What I mean . I want to application to run over column 3 and check if serial no exist or not " such kind of data base"  Can any one help me with this issue
Download All
0 Kudos
Message 1 of 2
(2,161 Views)

Well, clearly you need to keep track of the serial numbers. Something like a shift register. It's not clear how your "stam" VI is supposed to be used. I see no loop. I hope you're not using the "Run Continuously" button on the toolbar.

 

Code comments:

  • There is no point in having a for-loop that runs just once.
  • Is there a reason why you're using the core file write functions instead of the Write to Spreadsheet File?
  • You should not use strings for path constants and string functions to create paths. Use path constants and the Build Path function. This will make the code more portable.
  • Instead of comparing a string to an empty string use the Empty String/Path? function.
  • In the "NewWFRDeviceMassage" VI you are handling the "String:Key Down?" event, but the way it's being done doesn't make much sense. You are repeating the check you've already done with the case selector. It would seem to me that all you need to do is use a few of the functions in the Comparison palette, such as Decimal Digit?, Printable?, White Space? etc., depending on what restrictions you have on the characters.
0 Kudos
Message 2 of 2
(2,153 Views)