yasmeen85 Posted January 25, 2008 Report Share Posted January 25, 2008 Hi everybody... I have a table like that in the picture below... The program has to read a certain value in the table for example the first cell (10/1/2008 in the picture above).. then compare this date with the date of computer so if they are the same, the program will run an order... and if not, the program will exit... so my question is how to make the program make this reading of table? Thanks Quote Link to comment
TobyD Posted January 25, 2008 Report Share Posted January 25, 2008 QUOTE(yasmeen85 @ Jan 24 2008, 09:16 AM) The program has to read a certain value in the table for example the first cell (10/1/2008 in the picture above)..then compare this date with the date of computer so if they are the same, the program will run an order... and if not, the program will exit... so my question is how to make the program make this reading of table? Thanks Read the data from your array and convert it to a timestamp (see attached example). Then you can compare that timestamp to a current system time. If you need to scan the array to find todays date then convert a system timestamp to a string that matches the format of your array data and scan through the array until you find the value you are looking for. Download File:post-8758-1201201946.vi Quote Link to comment
yasmeen85 Posted January 25, 2008 Author Report Share Posted January 25, 2008 QUOTE(TobyD @ Jan 24 2008, 11:15 PM) Read the data from your array and convert it to a timestamp (see attached example). Then you can compare that timestamp to a current system time.If you need to scan the array to find todays date then convert a system timestamp to a string that matches the format of your array data and scan through the array until you find the value you are looking for. Download File:post-8758-1201201946.vi Thanks for your replying... But I'm using Labview 8.0 so the file can't open... Can you please attach the example in version 8.0 or put the pictures of it.. Thanks again Quote Link to comment
TobyD Posted January 25, 2008 Report Share Posted January 25, 2008 QUOTE(yasmeen85 @ Jan 24 2008, 11:55 AM) Thanks for your replying...But I'm using Labview 8.0 so the file can't open... Can you please attach the example in version 8.0 or put the pictures of it.. Thanks again I just reformatted my system and only have 8.5 installed. The picture I already posted is the example. It just shows you how to convert the data from a string (pulled from your table) into a timestamp. Quote Link to comment
yasmeen85 Posted January 26, 2008 Author Report Share Posted January 26, 2008 QUOTE(TobyD @ Jan 25 2008, 01:25 AM) I just reformatted my system and only have 8.5 installed. The picture I already posted is the example. It just shows you how to convert the data from a string (pulled from your table) into a timestamp. Thanks again for your replying... But I don't have a problem in changing the timestamp to a string or vice versa... My question was is how to make the program to read the array, it will read the first cell in the array which is (date=10/1/2008) then compare this date with the date of system. If they are the same, the program will go to next cell which is (quantity=5) and run an order. then the next day the program will read the next cell in the date (22/1/2008) and repeat the procedure above... But if the date was not the same of the system, then program will exit... So can I do this by Labview?? I hope the idea is clear now and I'm waiting for your replying or any question... Thanks Quote Link to comment
robijn Posted January 26, 2008 Report Share Posted January 26, 2008 QUOTE(yasmeen85 @ Jan 25 2008, 12:59 PM) it will read the first cell in the array which is (date=10/1/2008) then compare this date with the date of system. If they are the same, the program will go to next cell which is (quantity=5) and run an order. You don't have to read per single cell. You can read the whole file at once, there are functions for that. After reading the whole file you can perform your described algorithmn on the data - which will have to be performed cell-by-cell. BTW reading from an Excel file is difficult, but there is a standard function to read from a CSV file or Tab separated file (also creatable with Excel). Joris Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.