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: 

String in Array

Solved!
Go to solution

Hi.

I want to convert a string into an array in my first loop and after the "Get Queue Status" function either in 1D or 2D, it does not matter.
I save data in a table to send them to a queue. The goal is to see this data displayed in real time in an array, the last 5 values only. That is to say that every second, a new value will be added in my array, but I want to see only the last 5 that were recorded. That's why I need to turn the string into a table.

If you know how to display a limited number of value, I am also taker of any ideas.

0 Kudos
Message 1 of 8
(3,345 Views)

hi jeremie.d

 

i noticed, that you have a Boolean Wire between your two loops,

that is not what you want, bc of this your loops will not run in parallel,

but in sequence (first your producer, then your consumer).

remove the wire and handle the stopping of the loop in a different manner.


If Tetris has taught me anything, it's errors pile up and accomplishments disappear.
0 Kudos
Message 2 of 8
(3,339 Views)

jwscs a écrit :

i noticed, that you have a Boolean Wire between your two loops,

remove the wire and handle the stopping of the loop in a different manner.


Ok thank you for your answer.

Did you have an idea for change string in array ?

0 Kudos
Message 3 of 8
(3,326 Views)
Solution
Accepted by topic author Jeremie.D

yes


If Tetris has taught me anything, it's errors pile up and accomplishments disappear.
Message 4 of 8
(3,319 Views)

jwscs a écrit :

yes


Thank you jwscs.

 

 
Now, if I have input thermocouples, I can not display my values in columns for each thermocouples, and I can no longer limit my number of values in the table. It seems that the 2D data hinders the management of the table.
Thank you for your answer.
0 Kudos
Message 5 of 8
(3,291 Views)

two wait functions in one loop is overkill

 

you have to extend the 1D array in the consumer loop to 2D


If Tetris has taught me anything, it's errors pile up and accomplishments disappear.
0 Kudos
Message 6 of 8
(3,288 Views)

Hi,

I have a questions about arrays.

 

As shown in "Save array.PNG",

1) I need to save the item name and value inside 1st row when "Save ASCII" button is pressed.

2) Save the item name and value inside 2nd row when "Save Hexadecimal" button is pressed. (hex input will be converted to ASCII format before saving in array).

Will keep continue to save into the array when new input is entered.

 

Then i need to make this array to become control so that i can choose it like in combo box as shown in "Combo box.PNG".

 

The VI is attached below.

 

Anyone can please help me to solve this? Thanks.

Download All
0 Kudos
Message 7 of 8
(2,795 Views)

hi oliver,

please don't hijack old posts with new questions, open up a new thread instead.

 

to get the values into the Table (you have it as control, but it might be better to have it as indicator), either put it directly in the "Save ASCII" case and wire a 2D array to it (comprised of the values you want in it) or use a property node and it's Value property in the same fashion.

 

regards


If Tetris has taught me anything, it's errors pile up and accomplishments disappear.
0 Kudos
Message 8 of 8
(2,777 Views)