From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Use a 1D array to store data to logfile

Hi,

I am working on a project where I want to read the digital inputs to measure the inputs and detect if a pin is set to high (except for pin 7, 9, 11 and 13 which are the opposite). It works as it is done now, but I am using a 2D array in order to write to a text file except that I actually only need 1D array for my purpose. The first part of the design instantiates the array with all 23 rows set to OK. Then it enters the while loop and when a high  pin is detected, the OK row for the corresponding index is replaced with an error string.

 

My question is how I can achieve the same thing by only initializing a 1D array and then replace the the row as the while loop is executed?

I am new to the LabVIEW world, so please be nice 🙂 Thanks.

 

0 Kudos
Message 1 of 6
(2,642 Views)

I don't know what a ".gvi" file is but simply changing the extension to ".vi" LabVIEW still can't open it.

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 2 of 6
(2,565 Views)

gvi is probably NXG.

 

mcduff

0 Kudos
Message 3 of 6
(2,563 Views)

Hi sallo_93,

 

Its good to see you using NXG!

 

I've just looked at your code and have quickly made a more simple version of it. (although may need some changing) The reason being just to show easier ways to initialise an array ect.

 

I am still not quite sure what you are looking for. However I have used 1D arrays in my code. Let me know if this is what you were looking for.

0 Kudos
Message 4 of 6
(2,550 Views)

@RTSLVU wrote:

I don't know what a ".gvi" file is but simply changing the extension to ".vi" LabVIEW still can't open it.


Hint: There is a "LabVIEW NXG" tag directly below the name in the first post.  Expect to see more of those over the years.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 5 of 6
(2,546 Views)

NXG should have it's own board as now we have two incompatible programming languages sharing one board. 

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 6 of 6
(2,534 Views)