LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Create a tracer indicator to display actions

I cannot find a better definition. I try to explain what I need.

 

 

On a user interface I need an text indicator where I can display all the actions the machine is doing. It is like a log "on the fly". Something like the "printf" in C, where you can add one message after the other.

 

 

I did it with a string or a list box but I got the following issue:

 

1) I cannot attach just the new massage. Every time I have to update the indicator I must pass to the indicator the entire string or table. It is not a big issue, but If the string becomes longer and longer there could be some performance issue,

 

2) I would like to use different color or font for different type of action. In this case I should use a listbox, but I still have the issue #1. When I have to refresh the indicator I must refresh, values, color and font of each line using the active cell property. In this case I will have some performance issue for sure.

 

 

When I have to add a new message I should be able to "append" just the new msg setting the color and the font.

 

 

Thank you.

0 Kudos
Message 1 of 9
(2,761 Views)

I thought it would be harder, but i found a lean way. It requires a couple of property nodes, but will make a perfect Log-VI.

ColoredLog.png

 

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 2 of 9
(2,736 Views)

Thank you for your answer.

 

Actually I did in the same way and I cannot find any different solution. But it still have the issue I told you.

 

Every time in "ItemNames" you update the entire table. If it has hundreds of rows (or more), to add just one element you have to update hundreds rows.

 

I was just wondering if exist something like when you write in a file. You can open it, append all the single strings you want, then you close it.

 

By the way, thank you, yours is the best solution I have so far.

 

BR.

0 Kudos
Message 3 of 9
(2,722 Views)

Write to spreadsheet file with the information you want?

 

If you just want the general information (I'm updating the table vs I'm updating this row with this value), you can use a state machine and have an indicator on the FP that shows the current state you're in.

0 Kudos
Message 4 of 9
(2,720 Views)

Example_VI.png

UI Controls suite 2.0 installs a system string (Transparent)  That works perfect for these User displays.  Just prepend to the array.  The unbounded array size is an issue!  You may want to limit the array size to something managable and dump chunks to file for later access. 

 


"Should be" isn't "Is" -Jay
0 Kudos
Message 5 of 9
(2,713 Views)

Yes, of course I can use the file as I told in my previous message. But you know, having an indicator on the FP is better.

 

The application is a bit complex, there are several parallel threads which manage motors, instruments, remote PC, etc...

 

This is why I want to log all the actions, it can be helpful for debugging. One different color for each thread.

 

Thank you.

0 Kudos
Message 6 of 9
(2,711 Views)

@logatto wrote:

Thank you for your answer.

 

Actually I did in the same way and I cannot find any different solution. But it still have the issue I told you.

 

Every time in "ItemNames" you update the entire table. If it has hundreds of rows (or more), to add just one element you have to update hundreds rows.

 

I was just wondering if exist something like when you write in a file. You can open it, append all the single strings you want, then you close it.

 

By the way, thank you, yours is the best solution I have so far.

 

BR.


You can use a Get Array subset to trim the array and limit it to e.g. 1000 lines.

You have the same problem if you want to add something to the start of a file, then you have to read and rewrite all. 😉

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 7 of 9
(2,685 Views)

I went the easy way and display  action logs with the most recent on top

here is a quick one:

 

Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


0 Kudos
Message 8 of 9
(2,659 Views)

Thank you Henrik, nice example. It is a tough day....Smiley Happy

 

I know that I tedious but every time you append the new string and update the indicator with the entire data.

 

Mine was just curiosity, in several languages there is an equivalent of the "printf", where you can display what you want and you do not care what was written before. Just an instruction "printf("String");". I was wondering if there was something similar in LV.

 

I preferred to use a listbox in order to change color and font on the text.

 

Attached you can find a basic example.

 

BR.

 

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