LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

excel database

Hello everyone i am storing my data i obtained to excel. I am having a problem with the excel. sometime my data can be read, sometime no. even though i am saving in the format 97-2003 workbook. can somebody please help me
0 Kudos
Message 1 of 10
(2,743 Views)
0 Kudos
Message 2 of 10
(2,596 Views)

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?

0 Kudos
Message 3 of 10
(2,710 Views)

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.

Download All
0 Kudos
Message 4 of 10
(2,701 Views)

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.

0 Kudos
Message 5 of 10
(2,695 Views)

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

0 Kudos
Message 6 of 10
(2,685 Views)

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.

0 Kudos
Message 7 of 10
(2,678 Views)

okie sir,

thank you very much for your advice.

Will look into it

Thanks

0 Kudos
Message 8 of 10
(2,664 Views)

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

0 Kudos
Message 9 of 10
(2,650 Views)

I will try to go according to ur advice

thank u very much

I will look into it

0 Kudos
Message 10 of 10
(2,633 Views)