LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Refrigerator/Freezer Item Tracker System

Hello, my name is Ryan and I am working on a project that in essence keeps track of the items stored in a refrigerator and freezer. Here is how is works. First I have a file that holds some information about items saved as a text tab delimited file. Now when you press run continuously this file is loaded and placed in an array which I refer to as the universal item display. This stores all of the possible items that can be used, this array is designed to grow as a user buys different items as i will explain in a moment. First off the user will scan the barcode of a particular item and press input for either the fridge or freezer, if that item is in the universal or (products file) it will copy that data and store it in the current item array. If the barcode they scan is unknown, they are promped to enter the info. about the item and then it copies this data into the products file, thus this file grows and the software becomes more user friendly as time goes by. They can then use the same barcode scanner to remove the item from the current item array. Now, here is where I need help. First and foremost when the user is promped to enter info. about an item, it will enter it in the universal(product file) array but not into the current item array unless they scan the item a second time. (all you need is to enter the barcode by typing it in the box, if you don't have a scanner which i assume noone has just lying around.) In addition, I want this system to have a few more capabilities. I want to keep track of the item's current weight compared to its initial weight, then when its under say 25% of the initial weight, I want to warn the user. But there are some problems that I am facing, the plan is to have the user scan out the item when they use it, thus all info. in the current array will be removed, so upon rescanning the item back into the unit it is treated as a new item. I could have the user enter the initial weight of the item and save it in the product file, since the particular item barcode and weight will always be the same, but how can i link a current weight to a particular item. What if they have several of the same items, I can easily keep track of these by scanning them, for example if i scan three of the same item, it will put it in the current array 3 times, this is good, but I would like to distinquish between them by their current weight if i can. Then finally I would like to keep track of the expiration dates and warn the user when an item is approaching the date, this will be tough because items with the same barcode can have any expiration date, but it does fall along the lines of the current weight issue. These are some issues that I am having trouble with. Since I only had one small course in LabVIEW, I am not familiar with all of the power that LabVIEW has, like you guy/girls may be. I would be very greatful if anyone has any ideas/advice that could help me with the problems that I am facing. I really think this is a cool idea and I would love to see it work out. Thank you very much for your time.

 

I have attached the VI and the products (tab delimited) text file. 

Download All
0 Kudos
Message 1 of 3
(2,684 Views)

Two things you need to fix first.

 

1.  You are using local variables in a way that'll get you into trouble.  You are going to have race conditions (search the forums on this term).  It is probably why you need to do some things more than once to get you actions to stick.

 

2.  DON'T USE RUN CONTINUOUS button.  That is only there for debugging purposes.  You should have a master while loop around your code.  One problem with run continuous is that you are going to be constantly reloading the same file over and over again.

 

You should be using a state machine architecture.

 

I can't help anymore beyond that because you paragraph is too long and cluttered to read, and your LabVIEW code has no discernible architecture to it right now.

0 Kudos
Message 2 of 3
(2,678 Views)

sounds very similiar to the CLD exam requirements....i would use an array of clusters, each cluster will be your item and what ever information you want to bundle with it( item name, quantity, weight, barcode,etc....), then write to a file as you add or subtract from it, display the file/ array of clusters on front panel, front panel user interface to do your actions...

 

note: did not realize this is an old post, my bad... Smiley Surprised

0 Kudos
Message 3 of 3
(2,273 Views)