12-15-2008 09:23 PM
Hi All,
Newbie is back
and I have a problem with my program.
Here is a brief introduction of what i'm trying to do.
I'm indicating a fault event of a system.
Based on every event, i will need to log the Fault description, the tag, the start fault time and also the duration.
All event informations will be displayed on the front panel table and this table will grow when new event occured.
For descriptions and tags - this is fixed based on which fault button pressed,respectively.
The issue that i am having is to capture the duration.
What i have in mind is to use the elapsed time to capture the start time and also duration.
Start time is no issue because once i press boolean = true, it gives the start time.
For duration, when i press boolean = false, it wil gives the total duration.
However, i have a problem as following:
1) To capture this one set of complete data (E.g Desc : Fault 1, Tag : A, Start Time : 12/16/2008 11:15:06 AM, Duration : 0 00:00:05) and passed it inside Fault Trap Table.
2) If the same fault occured, it will overwrite the last information. However, I need to maintain displaying both old and new event.
Please advise.
Opinions and suggestions are mosssssst welcome.
Solved! Go to Solution.
12-15-2008 10:09 PM
You need to use shift registers for your master array. That holds the information from one iteration of the loop to the next. If a fault occurs, then you append new data to the array in the shift register and feed it to the indicator.
You may want to use some other shift registers to maintain some boolean logic such as whether a given fault is new in which case you want to append the new data to the array, or false, just a continuation of the the previous fault in which case you may just want to update the elapsed time value by replacing that portion of the array.
12-15-2008 10:33 PM
Hi Ravens fan,
Thank you very much for the reply
Appreciate that a lot!!~
Actually i have tried to use the shift registers for the master table.
It does append new data in fact, it append the same data which is still counting.
E.g
Fault 1, Tag : A, Start Time : 12/16/2008 11:15:06 AM, Duration : 0 00:00:01
Fault 1, Tag : A, Start Time : 12/16/2008 11:15:06 AM, Duration : 0 00:00:02
Fault 1, Tag : A, Start Time : 12/16/2008 11:15:06 AM, Duration : 0 00:00:03
Fault 1, Tag : A, Start Time : 12/16/2008 11:15:06 AM, Duration : 0 00:00:04
.
.
.
.
Fault 1, Tag : A, Start Time : 12/16/2008 11:15:06 AM, Duration : 0 00:00:15
And this keep on appending until boolean = false. 
What i need to be display and to be append on the master table is just the final information of the Duration, not the information while it is still counting..
Any idea guyz?
12-16-2008 04:44 AM - edited 12-16-2008 04:45 AM
Hi Roziela,
Thanks for the post and I hope your well today.
You need to add some logic to detect the event change (No Fault to Fault) and produce one boolean output per 'raising' edge.
I have some code for this,
Let me know what you think,
12-16-2008 04:49 AM
Hi Hillman,
I'm very well today,thank you
.
Too bad I can't open the file coz I'm using version that is earlier than you, Its 8.0.
Is it possible for u to re-send again the VI for 8.0 version?
rgds.
12-16-2008 05:05 AM
12-16-2008 05:14 AM
Hi rgds,
Thanks for the reply.
Here it is in LV8 - sorry if its too late.
Im glad it works ! 😄