LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Fault message display using string indicator

Solved!
Go to solution

Hi Everybody,

 

My dilema this time is as follow:

 

I am working in a machine control application where I must provide a fault message display to show the machine opertor some text related to the fault. I am planning to use an array of strings and a logic that select the message to display accordingly to the fault using index string array to show the message in a string indicator. Now, one of the requirements is that if by any reason the machine have more than one fault, all the faults be shown in the HMI simultaneously, here is where my issues begin. I must show a message per row, so I plan to use the end of line constant with a string concatenate. I made some test with my idea, but the fault messaes get shown in a fixed row according to the input position of the concatenate, I need the fault messages to be displayed in the order that they occur.

 

If anyone have done something like this before, or have any idea of how to do it or if there is a better way to do this that the one that I have in mind (explained above), I will appreciate the help. Thanks!

Ferdinand Martinez
FMO Automation LLC
0 Kudos
Message 1 of 10
(3,355 Views)

Try a Listbox.  You can write an array of strings to the ItemNames property node.

 

If you make it an indicator, the operator attempting to click on the box has no effect.  You can also write value(s) to it to highlight certain items if you wish.

 

Look at the help for details.

 

Lynn

0 Kudos
Message 2 of 10
(3,352 Views)

There is probably more to this, for example should a message disappear once the fault is over or do you want to keep a running log where new messages are appended forever?

What is the maximum number of concurrent messages?

 

A string indicator is fine. Keep an array of current fault messages that you dynamically fill and format to the displayed string whenever it changes.

0 Kudos
Message 3 of 10
(3,348 Views)

Thanks guys,

 

Answering altenbach questions, the messages dissapears once the fault is over, and for the maximum number of concurrent messages, I would say no more than 5.

 

I am starting with LabVIEW, so, if you can give a little more details abut your recommendations, it would be great.

Ferdinand Martinez
FMO Automation LLC
0 Kudos
Message 4 of 10
(3,340 Views)

Can the same fault occur more than once and if so, do you need to show all occurences, or only the oldest, in the log window?

 

Here's a quick modification of something I wrote a while ago. You can generate 4 different faults by pressing buttons. See if it makes sense. There are many ways to do all this. 😉

 

 

0 Kudos
Message 5 of 10
(3,325 Views)

altenbach,

 

Thanks for your response, no, the same fault can not occur more than once. Your code do exactly what I need, I will be looking at it and trying to understand it so I can find the way to adapt it to the control that I have to do. Thanks a lot for your help guys, I will be in touch to let you know about the progress of this, and if I have any question about your code I will let you know. Thanks again, guys like you make this kind of forums excellent resources.

Ferdinand Martinez
FMO Automation LLC
0 Kudos
Message 6 of 10
(3,307 Views)

Hi guys,

 

After a while working in other tasks, I came back to work with the message display. I modify altenbach code a little bit to fit my needs. Initially everything looks working ok, but then I reaize than the dependencies doesn't work. I mean, if I have a fault that depend on the status of other faults, the display is going to show me the first one in the array. You guys have any idea of how to make this work. Attached is the code for your reference.

Ferdinand Martinez
FMO Automation LLC
0 Kudos
Message 7 of 10
(3,291 Views)

@nausfaratu wrote:

I mean, if I have a fault that depend on the status of other faults, the display is going to show me the first one in the array. 


Can you explain in what way faults depend on each other? Do you mean e.g. that Fault 4 should trigger if fault 1 OR fault 4 is triggered?

 

If more than one boolean can be true in the "changed" detector, you need to find all of them using a FOR loop with a shift register initialized with 0 for the start position of the search. After the first true has been found, repeat from after the found position until all positions have been found, creating an array of indices.

 

 

(Also, why do you need that little sequence frame on the left, that makes no sense)

 

(I agree that it is a serious problem if a robot is out of TP :D, but maybe I am not reading your code right)

0 Kudos
Message 8 of 10
(3,283 Views)
Solution
Accepted by topic author nausfaratu
0 Kudos
Message 9 of 10
(3,278 Views)

altenbach,

 

Thanks a lot for your support, and sorry for the nonsense code, but I am practically starting with LabVIEW and there are a lot of thing that I still do not understand very well. This is only my 3rd code in LabVIEW. Your attachment work perfectly, I really appreciate your help

Ferdinand Martinez
FMO Automation LLC
0 Kudos
Message 10 of 10
(3,267 Views)