06-07-2014 02:26 AM
06-07-2014 07:24 AM
Try this
06-07-2014 10:23 AM
Sometimes something works, sometimes it doesn't. Something to do with Excel.
You need to provide a whole lot more information than that if you want to get any help.
When it doesn't work, do you get an error message? What is happening when it doesn't work?
Perhaps, dare I suggest it, even attach your VI so we can see what it is you are trying to do?
06-07-2014 11:38 AM
Hello sir,
This is my VI. when i try to put a new pathway of excel and scan my barcode and QR code, it is not storing in the excel. This is my problem.
06-07-2014 12:55 PM - edited 06-07-2014 12:57 PM
I can't follow what you are trying to do in your VI.
But I can comment on one thing. You are not doing anything with Excel. You are reading and writing to text files using the Read and Write Spreadsheet File functions. Even though you are giving some of them .xls extensions, they are not true Excel files. I would recommend giving them some other extension besides .xls because it is just confusing to give a text file the same extensions that an Excel file would have.
I'd recommend using the debugging tools that LabVIEW provides to figure out why your VI isn't behaving like you want it to. That includes Highlight Executiong and probes.
06-07-2014 02:38 PM
Okay sir
i will try this.
But i have to store in the.xls form.
Still when i recheck it is not working
any other solution apart from rechecking with probes
06-07-2014 03:07 PM - edited 06-07-2014 03:20 PM
If you want to save it as an .xls file, then you need to use ActiveX to be able to work with Excel files.
No other solutions. Just put in some honest debugging. I think your overall architecture is complicated and doesn't help in what you are trying to do. The parallel case structures where you do something if true and do nothing if false don't look right to me. It looks like it lacks structure. There are a lot of feedback nodes whose only purpose seems to delay the data on the wire by one iteration.
In the one case structure, you unbundle a lot of items, and rebundle most of them without changes, only changing the one value. You don't need to rebundle the stuff that is unchanged. It will maintain the value by way of the cluster going into the Bundle by Name function.
It seems like your architecture should have an event structure to handle the actions of hitting the different buttons.
06-07-2014 05:13 PM
okie sir,
thank you very much for your advice.
Will look into it
Thanks
06-07-2014 07:39 PM
Other discussion on this topic is found there. Let's use this therad only.
Look into the Producer/Consumer (Events) arrchitecture. It is a much cleaner way of dealing with user interaction.
Consider creating subVIs for duplicated code. The search functions in the TP Number and Search Button cases are identical except for the data. Also, you do not need to seach the same data twice. Use of conditional indexing will simplify that code considerably. I have attached a Search VI.
Get rid of the sequence structures. Use dataflow. One error wire from the Display Message to User VI to the Vision Acquisition VI is all that is needed to eliminate the sequence structure.
You could have a race condition in the writing and reading of the sss.xls file. The case structures where that file is written and read have no data dependency. You could be working from the wrong data.
A state machine architecture would eliminate that possibility, would make the code much more robust, would make it easier to debug, and make it easier to modify or extend. The state machine would be implemented in the Consumer loop.
The VI does not use the results of the searches. Is that what you intend?
Lynn
06-08-2014 03:19 AM
I will try to go according to ur advice
thank u very much
I will look into it