キャンセル
次の結果を表示 
次の代わりに検索 
もしかして: 

Max/Min Display

Hello,

I have some thermocouple, current and voltage signals and I just want to display the max and min on my front panel and can't seem to do it.  With the statistics VI, it recalculates the max and min each time, but I want it to hold the max value until a higher value comes along.  Plus I don't really understand how the max/min VI works.  Is there another VI I should use for this?

 

Any help would be great.

 

Thanks,

Richard

Carleton U

0 件の賞賛
メッセージ1/31
9,031件の閲覧回数
You have to save the older min/max values in a shift register and compare them to the current value. If the current value is less than the older min value so show them and save in the shift register for the next comparison.
0 件の賞賛
メッセージ2/31
9,026件の閲覧回数

Thanks.  I'm playing with this and trying to get it to work, but am running into more trouble.  Could you please have a look at the attached screenshot and tell me where I'm going wrong?  I tried to initialize the shift registers with constants, but I guess that is a different data type and it causes some wires to become broken.  They will have to be initialized though.

 

Thanks,

Richard

0 件の賞賛
メッセージ3/31
9,007件の閲覧回数
I can't tell exactly what kind of datatypes you're working with but if you right click on the input shift register and select create constant it should create a constant that works for that datatype.
0 件の賞賛
メッセージ4/31
8,989件の閲覧回数

Right now I'm just using simulated data signals to test the program.  When I run it now that I've added this while loop with shift registers, the loop starts flashing with a red and blue line around the outside and nothing happens.  I don't know whether I can't just send a wire from outside the loop to inside or if I'm using the shift registers incorrectly.  This is my first crack at Labview, so I don't really have the concepts down all that well yet.  Also, the wires still break when I right click and add a constant.

 

I appreciate the help.  Keep it coming.

 

Richard

0 件の賞賛
メッセージ5/31
8,980件の閲覧回数

Search the functions pallette for the convert dynamic data vi. This will give you a double data type which you can use to do your comparisons. To initialize your array use convert to dynamic data vi. Also you only need one statistics express vi for both your max and min. Just click on the express vi and select (check) both the max and min.

 Hope this helps.

Now Using LabVIEW 2019SP1 and TestStand 2019
0 件の賞賛
メッセージ6/31
8,979件の閲覧回数

Converting the constant to a dynamic data type did solve the problem of the breaking wires, but it is still not working properly.  Also, I think I do need 2 statistics VIs because I need to send a high initial value for the minimum and a low initial value for the maximum.  If there is any way around this, let me know.

 

The program has delay times to account for the delay of the gas analyzer as well as a time averaging VI.  I tried removing these, thinking that the statistics VIs may not like comparing something to nothing.   Didn't seem to be the problem.  I've attached a screenshot of what I have now.  Any more ideas would be more than welcome.

 

Also, I'm having another problem.  See screenshot 2 and notice that my time axes are inconsistent and the formats are different.  I tried changing the formats all to a simple hh/mm/ss format, but as soon as I run it, they change back to how they were.  They are not synchronized, sometimes start at strange numbers like 3,000,000 and will not stay the same format.   Any ideas for this would be great too.

 

Thanks,

Richard

すべてをダウンロード
0 件の賞賛
メッセージ7/31
8,940件の閲覧回数

The red border means you have set a breakpoink. Right click on it and select Clear Breadkpoint.

 

Your image really does not show very much. The problem with the timestamps may be because of conversions and the use of DBL data. Converting DBL to dynamic does not create a time value set to the current time. If you convert from dynamic data to DBL and back to dynamic, you loose the timestamp during the conversion to DBL. Posting the actual VI will help to see where the problem is.

メッセージ8/31
8,915件の閲覧回数

Here is the VI.  If you remove the while loop with the shift registers, turn the data acquisition button on and run the VI, it works ok.   Sorry, it's kind of a mess right now.

Thanks,

Richard

0 件の賞賛
メッセージ9/31
8,896件の閲覧回数

Hi rmichels,

 

It looks like you have a breakpoint set in your while loop. Try this - with your mouse on the block diagram, hold Shift and right-click and select the tool that looks like a small red stop sign. Then, click the white space within your while loop to remove the breakpoint. Let us know if that helps.

 

Thanks,

 

Dan Richards

Dan Richards
Certified LabVIEW Developer
0 件の賞賛
メッセージ10/31
8,877件の閲覧回数