07-15-2009 03:20 PM
yes I did this modification
thank you very much this question has bugged me a bit, I didn't think I was too far with my first VI.
07-15-2009 03:24 PM
the delta-t has to be the same from current time to expiration time
so if I say the current time is 3:41 and the expiration time is 5:41 it has to be able to keep the 2 hour delta-t
07-15-2009 03:31 PM
07-15-2009 03:39 PM
so there is no way to update the delta-t because my issue is this:
if I hit submit:
current time: expiration time:
7/15/09 3:00:00 7/17/09 3:00:00
and than I hit submit an hour later to add another current and expiration time:
current time: expiration time:
7/15/09 4:00:00 7/17/09 5:00:00
7/15/09 4:00:00 7/16/09 6:00:00
07-15-2009 04:14 PM
You're either adding requirements or not explaining them adequately. The key for working on everything is defining your requirements clearly before you start working. Mod4 is based on the mish-mash of requirements you had listed to date.
If you hit submit the first time, you must have had a 2 day time for the expiration. Now you want to change the first row's expiration time to 2 day + 1 hour but the second row to 1 day + 2 hours? That is a different delta T while in message 22 you said "the delta-t has to be the same from current time to expiration time". There is no logic to what you are trying to do to each element of this array.
All the pieces of the puzzle are there. You just need to figure out what you want your puzzle to look like. Sit down, think about what you are trying to do. Write it down. Create a flow chart of how the data changes and how to step through each element of the array to modify it the way you want. Once you have a flowchart or some pseudocode, you should then be able to translate that to LabVIEW code.
07-15-2009 04:22 PM - edited 07-15-2009 04:31 PM
I have done all these things my I have already done the last MOD but my problem is it every index of the array has to update so that if I say this has a 2 hour expiration than it stays a 2 hour expiration. so pretty much the arrays have to stay in ramge the delta-t can not change (it must be 2 hours).
so pretty much how you had MOD3 but it is not a constant array I can still add to the array.
07-15-2009 06:07 PM
each array index has to change according to thier expiration day so that it keeps the expiration day within the days you specify on the numeric controls.
07-17-2009 02:02 AM
ok I think this will explain my problem best I have added a picture that explains the program and my problem and also included the program so anyone can see for themselves
thank you,
07-17-2009 04:13 PM
Good Afternoon Harold,
Would an Insert Into Array work better in this case? I attached an example of what I am thinking.
07-17-2009 04:36 PM
yes but like I said in the post before the time must update the delta-t
it you look at the program and submit two types or more of medicines you will notice that the delta-t for the first index (index 0) will not update to the correct delta-t instead it will grow closer and closer to being even in time (or delta-t = 0).
exp:
I type in qwerty as the fist medicine after that I type in another medicine asdfgh
qwerty 7/17/09 5:28 7/18/09 5:28 // so it has a one day epiration this is the error because it is now 5:30 not 5:28 so qwerty
// has a 23 hour 58 mins expiration which is incorrect becuase it should be a 1 day expiration.
asdfgh 7/17/09 5:30 7/18/09 7:30 // so it has a 1 day and 1 hour expiration.
what it should say is this:
qwerty 7/17/09 5:30 7/18/09 5:30 // so qwerty stays at a 1 day expiration
asdfgh 7/17/09 5:30 7/18/09 7:30