LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Needs help on this problem

Hello,

 

I am new to NI Labview. My co-worker just recently retire and left me with this code. What is wrong with it and why is the data being transpose into one long column? I would be very appreciative.

 

Thank you,

 

Jon

0 Kudos
Message 1 of 4
(2,364 Views)

You did not post code.  You attached a word file with a picture in it.  It is generally easier to help if you post the actual code (the VIs) or snippets which are images with executable code embedded in it.

 

If you are new to LabVIEW checkout some of these free training link:

 

NI Learning Center

NI Getting Started

-Hardware Basics

-MyRIO Project Essentials Guide (lots of good simple circuits with links to youtube demonstrations)

-LabVEW Basics

-DAQ Application Tutorials

-cRIO Developer's Guide

 

Learn NI Training Resource Videos

3 Hour LabVIEW Introduction (Alternate Google Drive)

6 Hour LabVIEW Introduction (Google Drive)
Self Paced training for students
Self Paced training beginner to advanced, SSP Required

 

There are some inefficiencies for sure but without knowiwng more about the data, it is hard to make suggestions.  I suggest probing around and seeing what values are where and then look at the log to see if the data you expect to be there is in the right place.

0 Kudos
Message 2 of 4
(2,335 Views)

The two TDMS writes for each section (temps) and (#1) is wrong. You need to figure out how to write both the time stamp and data with one write, IE making the time stamp the first element in both the arrays. You should be writing a one dimensional array into the TDMS, not two dimensional arrays (the double line wires).

0 Kudos
Message 3 of 4
(2,324 Views)

We need to see the VI. Also tell us how you are operating it and what kind of values are in all controls. This seems to be a subVI, so we also need to see how you are calling it.

 

There are plenty of things wrong with this code and the symptoms you are seeing are probably just the tip of the iceberg. Did it ever run correctly? Did you change anything? Have you tried contacting your retired coworker?

 

  1. Your loop only spins once then stops (TRUE wired to the stop condition). Are you perhaps running this is "continuous run" mode? Is this a subVI called from a toplevel VI?
  2. Why is the file name a path datatype instead of a string?
  3. Apparently, you coworker does not know that "index array" is resizeable. Either he is inexperienced or he stopped programming 20 years ago when it was not resizeable. Either way, I would not trust most of the code.
  4. I see more than "one long column" in the outputs, so please clarify exactly what you see and what you expect to see instead.

It typically really helps to give a post a reasonable and specific subject line. Most people posting here need "help" with a "problem".

Message 4 of 4
(2,321 Views)