LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

iteration in data acquisition

Solved!
Go to solution

Hi all,

 

I have done a program to record the real time data of a weighing scale to excel file, and the data is getting recorded .

Now my query is use the same file and same sample for weighing again ie. in iterations (for eg. one week once) . i need to make this in column wise data in excel to go to the same sample name and update. is this possible in lab view ?

0 Kudos
Message 1 of 11
(2,429 Views)

Hi sanvish,

 


@sanvish wrote:

is this possible in lab view ?


Short answer: YES!

 

Longer answer: LabVIEW is a programming language and you can create (nearly) any program you like to…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 11
(2,424 Views)

Thanks Gred,

 

I am stuck here , in the program .. can you help me .. for the iteration in the data acquisition . i have attached my vi.

 

0 Kudos
Message 3 of 11
(2,411 Views)

Hi sanvish,

 


@sanvish wrote:

I am stuck here , in the program .. can you help me .. for the iteration in the data acquisition . i have attached my vi.


I could help - when I'm not on vacation...

 

What have you tried?

Where exactly are you stuck?

What are the exact requirements?

Why do you want to use the old samples when you want to repeat a measurement?

(Why do you want someone else do your job without paying for the work?)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 11
(2,404 Views)

 

 

The samples used are kept in certain conditioning process ,which is being weighed and manually recorded in log book ,so, i tried to convert this with lab view program .

 

I am not a certified professional in Lab view , i just a student and just begin to learn lab view environment , as self learner ..any ways sorry to disturb you.. 

 

 

Wish u happy vacation .Thanks  for the reply.

0 Kudos
Message 5 of 11
(2,399 Views)

Hi sanvish,

 


@sanvish wrote:

The samples used are kept in certain conditioning process ,which is being weighed and manually recorded in log book ,so, i tried to convert this with lab view program .


Right now your VI is reading some values from your scale and writes/appends them, with ElapsedTime and SampleNo, into a CSV file.

Is this what your VI is intended to do? What else is needed?

 


@sanvish wrote:

I am not a certified professional in Lab view , i just a student and just begin to learn lab view environment , as self learner ..any ways sorry to disturb you.. 

 

Wish u happy vacation .Thanks  for the reply.


No matter if you are a student or a professional: when programming you need to start with writing down the requirements.

So again: what are the exact requirements for your algorithm?

 

I also wish you a nice end-of-year week and a Happy New Year!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 11
(2,373 Views)

Some General comments about your VI:

 

  • a 50 second loop time is way too long! Because your controls only get read every 50 seconds so nothing will react to the user until the next iteration. For example, your "SAMPLE NO" control will get read as soon as the loop starts and if you enter a new value, that won't take effect until 50 seconds later. You can't even enter a value while the dialog popup is up.
  • Whatever file IO you are doing has nothing to do with "Excel"! All you are writing is delimited text. A file is a linear string of characters, so you can only appends new rows. (If you want to add a new column, virtually all data needs to be rewritten from scratch because columns are interlaced into the file data, requiring almost everything to be moved around)
  • "OK 4" is NOT a reasonable label for a "log data" control. Keep it consistent to avoid confusion.
  • There is no reason in the world to maximize your front panel to the screen.
  • What is the point of your tab controls? They are just glorified decorations at the moment. (only one tab used, tabs hidden).
  • Why is there no error handling? Should the loop really start if the instrument initialization fails?
  • Your dialog can only output a TRUE, so that wire is quite boring. Why is it even there? (use the error wire if you want to define execution order with a data dependency. AND'ing it with "OK 4" will just return "OK 4" unchanged. Pointless!
  • Your "sample time" control has the wrong representation.
  • I would recommend to refactor your code into a simple state machine that spins at a reasonable rate (e.g. 5Hz) and does certain things depending on the elapsed time and states of controls, for example.

See how far you get....

0 Kudos
Message 7 of 11
(2,371 Views)

Hi, 

 

Thanks for the inputs . i will check them and make my program better. 

 

0 Kudos
Message 8 of 11
(2,356 Views)

Hi Gred,

 

Thanks for the response , yes the program I made is appending the CSV file in Row wise , I need to make in column wise .that what i am trying..

ok will work out and get back..

 

Wish you Happy Year ahead.

0 Kudos
Message 9 of 11
(2,353 Views)
Solution
Accepted by topic author sanvish

As I already said, you cannot append columns without rewriting the entire file from scratch. Why not append rows, then transpose and rewrite once all data has been acquired, i.e. at the very end.

0 Kudos
Message 10 of 11
(2,317 Views)