How to get the max P2P avlue of a signal
Hello!
I'm very new to the whole LabView program, and have some issues with very basic need I have to apply to my program.
I need to measure the max P2P of a signal and preform some analysis on that, the problem is that the Amplitude and measurments VI gives me the P2P at every given sample. Is there any way for doing this right?
Thank you
Solved!
Go to Solution.
You can store it in a shift register.
A shift register is one of those basic elements of LabVIEW that you must become familiar with. Have you taken any of the tutorials?
Message Edited by Dennis Knutson on 02-03-2010 10:52 PM
Attachments:
Keep Max.PNG 3 KB
Similar Messages
-
How to get the max(level)?
Hi,
The below query returns level and other selected columns.
I need to get the max(level) 2nd column value in the below example.How to modify the query?
Ex
Level max(level) id
1 5 101
1 5 102
1 5 103
2 5 104
2 5 105
3 5 107
4 5 120
5 5 134
5 5 280
SELECT DISTINCT level lvl
,form_frms.emp_id
,form_frms.ing_emp_id
,form_frms.prve_id
,CASE
WHEN (select div_dn
from epm_prod epm
where epm.emp_id= form_frms.ing_emp_id) ='Y' THEN DIV_DN
WHEN NVL((select distinct 'N'
from emp_pro_version prvv
where prvv.is_py='Y' and
prvv.IS_VERSION ='N' and
prvv.emp_id=form_frms.ing_emp_id) ,'Y')='N'
THEN 'Y'
WHEN NVL((select distinct 'Y'
from employee epm
where emp.emp_id=form_frms.ing_emp_id
and epm.status<>'NEW') ,'N') ='Y'
THEN 'Y'
ELSE 'N'
END
ELSE 'N'
END UN_KNOWN_ID
FROM (SELECT empvv1.prvv_id
FROM emp_view_version empvv1
WHERE empvv1.is_version = 'Y'
) form_frms
START WITH form_frms.emp_id = :lv_emp_id
CONNECT BY PRIOR form_frms.ing_emp_id = form_frms.emp_id
ORDER BY level DESC, form_frms.emp_id,UNKNOWN_ID ASC;
Edited by: shivasha on Feb 9, 2013 12:24 AMMaybe
select lvl,
max(lvl) over (order by null rows between unbounded preceding and unbounded following) max_level,
emp_id,
unknown_id
from (SELECT DISTINCT
level lvl,
form_frms.emp_id,
form_frms.ing_emp_id,
form_frms.prve_id,
CASE WHEN (select div_dn
from epm_prod epm
where epm.emp_id = form_frms.ing_emp_id
) = 'Y'
THEN DIV_DN
WHEN NVL((select distinct 'N'
from emp_pro_version prvv
where prvv.is_py = 'Y'
and prvv.IS_VERSION = 'N'
and prvv.emp_id=form_frms.ing_emp_id
),'Y'
) = 'N'
THEN 'Y'
WHEN NVL((select distinct 'Y'
from employee epm
where emp.emp_id = form_frms.ing_emp_id
and epm.status != 'NEW'
),'N'
) = 'Y'
THEN 'Y'
ELSE 'N'
END UNKNOWN_ID
FROM (SELECT empvv1.prvv_id
FROM emp_view_version empvv1
WHERE empvv1.is_version = 'Y'
) form_frms
START WITH form_frms.emp_id = :lv_emp_id
CONNECT BY PRIOR form_frms.ing_emp_id = form_frms.emp_id
ORDER BY lvl DESC,emp_id,UNKNOWN_IDRegards
Etbin -
how to get the record with the max sequence no
table as
seq student mark
1 A 10
2 A 15
1 B 20
2 B 10
1 C 30
here is what i need
seq student mark
2 A 15
2 B 10
1 C 30i have used your query + some decode
With t As
Select 'A' st, 'X' Type, 1 seq, 001 marker_no, 10 mark From dual Union All
Select 'A', 'X', 2, 001, 12 From dual Union All
Select 'B', 'X', 1, 002, 10 From dual Union All
Select 'B', 'X', 2, 003, 12 From dual Union All
Select 'B', 'X', 3, 003, 15 From dual Union All
Select 'C', 'X', 1, 001, 10 From dual Union All
Select 'C', 'X', 2, 002, 15 From dual Union All
Select 'C', 'Y', 3, 001, 20 From dual Union All
Select 'C', 'Y', 4, 001, 10 From dual
Select st,
Sum (x_cnt) x_cnt,
Max (x_seq) Keep (dense_rank Last Order By x_seq) x_seq,
max(x_marker_no) keep(dense_rank last order by x_seq) x_marker_no,
max(x_mark) keep(dense_rank last order by x_seq) x_mark,
sum(y_cnt) y_cnt,
max(y_seq) keep(dense_rank last order by y_seq) y_seq,
max(y_marker_no) keep(dense_rank last order by y_seq) y_marker_no,
max(y_mark) keep(dense_rank last order by y_seq) y_mark
from
(Select st,
decode(Type ,'X',1,0) x_cnt,
decode(type ,'X',seq,0) x_seq,
decode(Type ,'X',marker_no,0) x_marker_no,
decode(Type ,'X',mark,0) x_mark,
decode(Type ,'Y',1,0) y_cnt,
decode(Type ,'Y',seq,0) y_seq,
decode(Type ,'Y',marker_no,0) y_marker_no,
decode(Type ,'Y',mark,0) y_mark
From t
Group By st;
/*this is the output
st X_cnt X_seq X_marker_no X_mark Y_cnt Y_seq Y_marker_no Y_mark
A 2 2 001 12 0 null null null
B 3 3 003 15 0 null null null
C 2 2 002 15 2 4 001 10
ST X_CNT X_SEQ X_MARKER_NO X_MARK Y_CNT Y_SEQ Y_MARKER_NO Y_MARK
A 2 2 1 12 0 0 0 0
B 3 3 3 15 0 0 0 0
C 2 2 2 15 2 4 1 10 -
How to get the max value of a set of percentage values?
Hi,
I've tried to get the max and min value of a set of calculated percentage values. Such as
Jan Feb March Apr May Jun Min Average Max
0,5 0,8 1,1 0,4 1 0,6 0,4 0,7 1,1
The average value works fine. But with "min" and "max" I have a problem.
I've tried to get the value with the following ways:
- Create a new calc. keyfigure and make a sum of all values: (Jan + Feb + ...) and set the calculation in key figure properties to Min/Max.
- Create a new calc. keyfigure and make a sum of all values and set the aggregation to Min/Max
- Create a selected keyfigure with a filter to the necessary periods and set a calculation to Min (Aggregation is not possible here)
- Create a new cal. keyfigure with all periods and the function Min. e.g. min(Jan, (min Feb, (min (....)
None of this solutions provides the right min and max value. When I use an amount value (e.g. Euro) instead of these percentage values the keyfigure with the min and max function works. The others all provide wrong values.
Is there a solution to get the right min and max value???
It would be a great help when you have any hints.
Thanks
ClaudiaHi Aduri,
thanks for your answer but your solution doesn't work.
The problem is that the periods are defined in a structure with offsets such as
- period-11
- period-10
- period
in this structure elements there is also the keyfigure "netvalue" defined.
In the rows of the report there is another characteristic such as company code.
Is there a solution to find the max and min values of the period values for each company code? Or must I change the data model e.g. copy the keyfigure and make a new keyfigure with another aggregation level?
Thanks for any hints!
Claudia -
How to get the max value in the query??
Plant calday(mm.dd.yyyy) Soldout.Qty
0001 01.01.2005 10
0001 01.02.2005 20
0001 01.03.2005 05
0001 01.04.2005 16
0001 01.05.2005 10
0001 01.06.2005 14
From the above values , how can i findout Max(Soldout.Qty)(i.e 20) for the above week...Suppose present aggregation = summation...How can i findout the value in the Query??don't want to do changes to design...Hi Bhanu,
I tried the calculation results as...Maximum,..
But that will pick the maximum value among the avialable values..like
plant1 max 10
plant2 max 20
plant3 max 30
then it will show as..
plant1 max 30
plant2 max 30
...like this...but my case is
plant1 calday1 10
plant1 calday2 05
plan1 calday7 08
plant2 calday1 10
plant2 calday2 05
plan2 calday7 20
so for each set it need to bring the maximum value... -
How to get the Max value of elements of type datetime
Hi All ,
I wanted to get the latest timestamp value ( datatype as datetime) from node list. I have following xml. In this xml, i want to get the modifydate element which has latest timestamp through xquery/xpath, it should return me following result 2011-09-29T17:21:17+10:00
<CustomerList>
<CustomerDetails>
<name> Test 1</name>
<status>active</status>
<modifyDate>2011-08-20T17:21:17+10:00</modifyDate>
</CustomerDetails>
<CustomerDetails>
<name> Test 2</name>
<status>cancel</status>
<modifyDate>2011-08-29T17:21:17+10:00</modifyDate>
</CustomerDetails>
<CustomerDetails>
<name> Test 3</name>
<status>active</status>
<modifyDate>2011-09-29T17:21:17+10:00</modifyDate>
</CustomerDetails>
</CustomerList>
i tried to use the
//CustomerList/CustomerDetails/modifyDate[not(. <=../preceding-sibling::CustomerList/CustomerDetails/modifyDate) and not(. <=../following-sibling::CustomerList/CustomerDetails/modifyDate)]
But it is not working on datetime datatype.
Any help in this regard is much appreciated.
Regards
Edited by: user6736659 on Sep 5, 2011 6:15 AMHi,
The following XQuery should give you what you want :
max(
for $i in /CustomerList/CustomerDetails/modifyDate
return xs:dateTime($i)
)For instance, using Oracle SQL :
SQL> var xmldoc varchar2(4000)
SQL> begin
2 :xmldoc := '<CustomerList>
3 <CustomerDetails>
4 <name> Test 1</name>
5 <status>active</status>
6 <modifyDate>2011-08-20T17:21:17+10:00</modifyDate>
7 </CustomerDetails>
8
9 <CustomerDetails>
10 <name> Test 2</name>
11 <status>cancel</status>
12 <modifyDate>2011-08-29T17:21:17+10:00</modifyDate>
13 </CustomerDetails>
14
15 <CustomerDetails>
16 <name> Test 3</name>
17 <status>active</status>
18 <modifyDate>2011-09-29T17:21:17+10:00</modifyDate>
19 </CustomerDetails>
20 </CustomerList>';
21 end;
22 /
PL/SQL procedure successfully completed
SQL> select xmlquery('max(
2 for $i in /CustomerList/CustomerDetails/modifyDate
3 return xs:dateTime($i)
4 )'
5 passing xmltype(:xmldoc)
6 returning content
7 )
8 from dual
9 ;
XMLQUERY('MAX(FOR$IIN/CUSTOMER
2011-09-29T17:21:17.000000+10:00 -
How to get the max total sale by date on every store
I am trying to write a query in Oracle which will return both the store_id and the maximum total sale by date
Hi,
Whenever you have a question, please post a little sample data (CREATE TABLE and INSERT statements, relevant columns only) for all the tables involved, and the results you want from that data.
Explain, using specific examples, how you get those results from that data.
Always say what version of Oracle you're using (e.g. 11.2.0.2.0).
See the forum FAQ: https://forums.oracle.com/message/9362002#9362002
Hjava wrote:
I am trying to write a query in Oracle which will return both the store_id and the maximum total sale by date
Do you mean you want to see the store_id that had the maximum total sale?
In general, this can be done with a Top-N Query, using an analytic function such as RANK. For an example, see http://forums.oracle.com/forums/thread.jspa?messageID=3739610
If you only want the date, the maximum total from that date, and 1 column from the same row with the maximum (e.g. store_id), then you might be able to use the aggregate LAST function instead.
What results do you want in case of a tie? (That is, if 2 or mote store_ids have the same total sale on a given date, and no other store_id has a higher total.) -
How to get the max. and min. of a selection-option?
hi experters
I wonder if there is any way can fetch the max value and minimum value from a select-option?
please hint, many thanks
wanlei.suna®s wrote:
> Try this way
>
>
> SELECT-OPTIONS S_WERKS FOR T001W-WERKS.
>
> START-OF-SELECTION.
> SELECT * FROM T001W INTO IT_T001W
> WHERE WERKS IN S_WERKS.
>
> SORT IT_T001W BY WERKS ASCENDING.
> READ TABLE IT_T001W INDEX 1.
> MOVE IT_T001W-WERKS TO V_WERKS_MIN. " MIN Value
>
> SORT IT_T001W BY WERKS DESCENDING.
> READ TABLE IT_T001W INDEX 1.
> MOVE IT_T001W-WERKS TO V_WERKS_MAX. " MAx Value
>
>
> a®s
Please try this.
TABLES : t001w.
SELECT-OPTIONS S_WERKS FOR T001W-WERKS.
data: lv_min type T001W-WERKS,
lv_max type T001W-WERKS,
lv_count type i.
START-OF-SELECTION.
sort s_werks by low.
describe TABLE s_werks LINES lv_count.
if lv_count = 1.
lv_min = s_werks-low.
lv_max = s_werks-high.
elseif lv_count > 1.
read TABLE s_werks index 1.
lv_min = s_werks-low.
if not s_werks-high is INITIAL.
lv_max = s_werks-high.
endif.
READ TABLE s_werks INDEX lv_count.
if lv_max is INITIAL.
lv_max = s_werks-low.
else.
if lv_max < s_werks-low.
lv_max = s_werks-low.
endif.
endif.
endif.
write :/ lv_min,
lv_max. -
How to get the MAX,MIN from the below table...
Hi,
Database is SQL2012 R2 Express and I have a table and would like to dig out the MAX,MIN value of a specifiied date (e.g 2014-11-03)
ThanksNope... It still output more than 1 value on the same date...
DL-01-BAT 13.00753 13.00753 10/10/2014
DL-01-BAT 13.01342 13.01342 10/10/2014
DL-01-BAT 13.02706 13.02706 10/10/2014
DL-01-BAT 13.03485 13.03485 10/10/2014
Raw data is
DL-01-BAT 13.00753 13.00753 10/10/2014 20:00
DL-01-BAT 13.01342 13.01342 10/10/2014 21:00
DL-01-BAT 13.02706 13.02706 10/10/2014 22:00
DL-01-BAT 13.03485 13.03485 10/10/2014 23:00
You mean after applying my suggestion?
I dont think so
See illustration below
declare @t table
Item VARCHAR(10), Reading VarChar(50),DateTimeReading DATETIME)
INSERT @t
VALUES
('DL-01-BAT', 13.00753,'10/10/2014 20:00'),
('DL-01-BAT', 13.01342,'10/10/2014 21:00'),
('DL-01-BAT', 13.02706,'10/10/2014 22:00'),
('DL-01-BAT', 13.03485,'10/10/2014 23:00')
DECLARE @Date datetime = '20141010'
SELECT Item,
MAX(Reading) AS [Max],
MIN(Reading) AS [Min],
DATEADD(dd,DATEDIFF(dd,0,DateTimeReading),0) AS [Date]
FROM @t
WHERE DateTimeReading >= @Date
AND DateTimeReading < DATEADD(dd,1,@Date)
GROUP BY Item, DATEADD(dd,DATEDIFF(dd,0,DateTimeReading),0)
Please Mark This As Answer if it solved your issue
Please Mark This As Helpful if it helps to solve your issue
Visakh
My MSDN Page
My Personal Blog
My Facebook Page -
Hi all,
i got in the cube this example
client Max reveneu
A 5
A 4
A 1
B 2
B 2
B 2
The report show this
A 10
B 6
I want that the report show
A 5
B 2
How can i do it? i have been trying with the atributes and doesnt do it , please helphi,
You can do it in 2 ways-
1.In key figure properties,Aggregation tab->select exception aggregation as MAXIMUM and ref.Char say client.
2.Create CKF in query designer ->Drag and drop revenue KF,in aggregation tab select Maximum and ref.Char say client.
Rajendra -
How to retreive the max data length of a column
Hello All,
I know how to do a select to get the max data length of a column it is this :
SELECT MAX(LENGTH(COLUMN_NAME) FROM table.
However, I need this information combined with my SQL that returns the Data_type and length from the USER_TAB_COLUMNS. So taking the emp example if the ename column was 50 as VARCHAR2 but the max data entered in it was just 20 I want the information like this:
SELECT COLUMN_NAME, DATA_LENGTH, and the Max length of 20
FROM USER_TAB_COLUMNS WHERE TABLE_NAME='EMP';
I don't know how to get the Max Length of the Column in this table. Can anyone suggest me a hint? An Inline view maybe?
ThanksStill not sure about your requirements, but how about this
SQL> CREATE OR REPLACE FUNCTION get_max_length(p_table in varchar2, p_col in varchar2) return pls_integer
2 is
3 v_cnt pls_integer;
4 begin
5 execute immediate 'select max(length('||p_col||')) from '||p_table into v_cnt;
6 return v_cnt;
7 end get_max_length;
8 /
Function created.
SQL>
SQL> SELECT COLUMN_NAME,
2 DATA_LENGTH,
3 get_max_length(TABLE_NAME, COLUMN_NAME) max_length
4 FROM USER_TAB_COLUMNS
5 WHERE TABLE_NAME='EMP'
6 AND DATA_TYPE like '%CHAR%'
7 ;
COLUMN_NAME DATA_LENGTH MAX_LENGTH
ENAME 10 6
JOB 9 9
SQL> -
How can i get the max rpm from cpu fan??
how can i get the max rpm from my cpu cooler regarding that i don't have a speed controller attached to the cpu fan ,,, ?? please make things clear for me
thanksif you have not reduced it by using a speed controller either hardware or software or by the 7v mod its already going as fast as it will at 12 v dc you cannot speed it up only slow it down
need more air get a different cooler/fan -
How do i get the max width and height?
Hey
I want to get the max width and height, so my desktoppanes size can be set automatically.
I know i should use getBounds but i cant find a concrete example on goole, on how to use it.
Can someone point me in the right direction, with an example?Ok, assuming you want to get the screen resolution, i.e. 1024 x 768.
You will need these imports:
import java.awt.Dimension;
import java.awt.Toolkit;and this line of code:
Dimension myScreen = Toolkit.getDefaultToolkit().getScreenSize() ;You can now use myScreen.width and myScreen.height to access the height and width of your screen's resolution. (width = 1024, height = 768 in my case)
Hope this helps,
Stern
Edited by: Stern on Apr 13, 2008 6:49 AM -
How to get the data in a table in horizontal order
when i execute the command "select empno from emp" i would get the output in vertical order
How to get the output in horizontal orderDid you search in the forum before posting your question? Every week similar question like yours is being posted. Anyway find below the query.
SELECT LTRIM(MAX(SYS_CONNECT_BY_PATH(EMPNO,';')),';')
FROM
SELECT EMPNO,ROW_NUMBER() OVER(PARTITION BY 1 ORDER BY 1) CURR,ROW_NUMBER() OVER(PARTITION BY 1 ORDER BY 1)+1 NEXXT
FROM EMP
START WITH CURR=1
CONNECT BY CURR = PRIOR NEXXT
Regards,
Mohana -
How to get the username in a custom password change routine / procedure / form when a user's password has expired and is redirected automatically to this custom program?
We use the 2nd parameter in LOGIN_URL column in WWSSO_LS_CONFIGURATION_INFO$ table to get to this custom change-password proc.OK !
Use that maybe good :
select USERID into v_user from sys.aud$
where ntimestamp#=(
select max(ntimestamp#)
from sys.aud$ );
Maybe you are looking for
-
HT1212 i need to restore this i pod touch my daughter forgot her passcode
i need to restore my daughter s i pod touch she has forgotten it
-
Driver for infrared control remote on windows 8
Hello, since I upgrade windows 7 to 8 version, my remote control doesn't work. Thanks your help.
-
@ HR_ESS_GET_SETTINGS
Can anyone please brief me the functionality of the above FM?
-
Error installing elements 12 - installing shared technologies
I am trying to load our new software - Adobe Photoshop Elements 12 - Everytime I try to load it I get a message - The Installation process has encountered an error while installing shared technologies. Please restart your system and try again. I ha
-
Mac version publish .exe
I'm currently using Flash 8 on Windows and am thinking about upgrading to CS3 and switching to Mac as that's where I have Photoshop and Illustrator. I still need to be able to publish Windows executables. I can't find any info pertaining to this on t