Data finder maximum value
How can I force the Data Finder to index/calculate certain properties (like Maximum Value) so I can execute a query on this.
I would like to do this automatically for every channel, or should I run some script to get this?
Ton
Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas
LabVIEW, programming like it should be!
Thanks Brad,
I decided to keep ascii format for now because tdm file has double size. I would like to ask you if there is the possibility to generate TDM-files from ascii-files and save them in another place by using dataplugin VBscript. So I need to launch from diadem dataplugin a script like this:
Sub ReadStore(File)
Set ChannelGroup = Root.ChannelGroups.Add("test")
Call ASCIIConfigLoad(file, "pluginname", 0)
Call DataFileSave("C:\file.tdm","TDM")
end sub
I know that it's no possibile to use diadem commands in dataplugin. Are there some alternative solutions?
I tryed to create vbscript dataplugin that for every ascii file indexed writes a file path to access mdb database and by diadem macro loads ascii file from mbd_file and saves it in another folder. I don't think that is the best solution. Is very long.
Thanks,
Yustas
Similar Messages
-
Finding maximum value???
import java.io.*;
import java.util.*;
public class heatshield1
public static void main(String [] args) throws IOException
double theresholdTemp = 0, percentPass = 0;
int maxOfSample = 0;
String inputdata;
String s1,s2,s3;
InputStreamReader isr = new InputStreamReader (System.in);
FileReader file = new FileReader("inputdata.txt");
BufferedReader br = new BufferedReader(file);
inputdata = br.readLine();
StringTokenizer st = new StringTokenizer(inputdata);
s1 = st.nextToken();
s2 = st.nextToken();
s3 = st.nextToken();
theresholdTemp = Double.parseDouble(s1);
percentPass = Double.parseDouble(s2);
maxOfSample = Integer.parseInt(s3);
if (theresholdTemp <= 0 || percentPass< 0 || maxOfSample <= 0)
System.out.println("Program Halted and Error occured at Line 1");
System.exit(0);
sample_Input(br,theresholdTemp,percentPass,maxOfSample);
public static void sample_Input(BufferedReader br,double theresholdTemp,double percentFail,int maxOfSample) throws IOException
int totalOfPass = 0;
double temp[];
temp = new double[maxOfSample];
for ( int k=0; k < maxOfSample ; k++)
temp[k] =maxOfTemp(br);
if (temp[k] > theresholdTemp)
System.out.println("Sample "+(k+1)+" "+temp[k]+" passed");
totalOfPass = totalOfPass + 1;
else
System.out.println("Sample "+(k+1)+" "+temp[k]+" failed");
displayResult(totalOfPass,maxOfSample,percentFail);
public static double maxOfTemp(BufferedReader br) throws IOException
String inputdata;
inputdata = br.readLine();
StringTokenizer st = new StringTokenizer(inputdata);
int noOfreading = st.countTokens();
String s4;
double InputTemp[];
InputTemp = new double[noOfreading];
double maxOfTemp = 0;
maxOfTemp = InputTemp[0];
try
for ( int j =0; j < InputTemp.length ; j++)
if (maxOfTemp< InputTemp[j])
maxOfTemp = InputTemp[j];
s4 = st.nextToken();
InputTemp[j] = Double.parseDouble(s4);
if (InputTemp[j] < 0)
System.out.println("Program Halted and Error occured at Line "+(j+2));
System.exit(0);
catch (NumberFormatException n)
System.out.println("You must enter a number.");
System.exit(0);
finally
return maxOfTemp;
public static void displayResult(int totalOfPass,int maxOfSample,double percentPass)
double percentOfPass = 0;
percentOfPass = (((double)totalOfPass/(double)maxOfSample)*100);
if (percentOfPass > percentPass)
System.out.println("BATCHES Pass");
else
System.out.println("BATCHES Failure");
Te objective of this program to find the maximum value of the input data and use it compare to the threshold temperature.
There is no error when compiling but the program can detect the maximum value for the input data. Is it anything wrong with the code i used to find the maximum. Please help.
Thanks for ur addition information
but after i compling it using ur guideline
The result appear to be
start maxOfTemp=0.0 array size=3
j=0 InputTemp[j]=0.0
j=1 InputTemp[j]=0.0
j=2 InputTemp[j]=0.0
Sample 1 13.0 passed
start maxOfTemp=0.0 array size=3
j=0 InputTemp[j]=0.0
j=1 InputTemp[j]=0.0
j=2 InputTemp[j]=0.0
Sample 2 14.0 passed
start maxOfTemp=0.0 array size=4
j=0 InputTemp[j]=0.0
j=1 InputTemp[j]=0.0
j=2 InputTemp[j]=0.0
j=3 InputTemp[j]=0.0
Sample 3 70.0 failed
BATCHES Pass
There are no value for the maxOfTemp
and and the value fo InputTemp..
How to solve it ?? -
Finding maximum value from VARCHAR2
Hi all.
I am having Varchar2 values like this....
1.0.0.22
1.0.0.23
1.0.0.3
1.0.0.6
1.0.0.7
1.0.0.8
1.0.0.9
1.0.0.9
I want to find the highest value (in this case, it is 1.0.0.23). If i use MAX function, it is giving 1.0.0.9. Any help is appreciated.
Thanks in advance,
PalIn 10g, I would use regular expressions to "format" those version numbers. In my example, it would work for 3-digit version numbers, regardles on which position:
WITH t AS (SELECT '1.0.0.22' col1
FROM dual
UNION
SELECT '1.0.0.23'
FROM dual
UNION
SELECT '1.0.0.3'
FROM dual
UNION
SELECT '1.0.0.6'
FROM dual
UNION
SELECT '1.0.0.7'
FROM dual
UNION
SELECT '1.0.0.8'
FROM dual
UNION
SELECT '1.0.0.9'
FROM dual
SELECT col1
FROM (SELECT t.*
, ROW_NUMBER() OVER (ORDER BY REGEXP_REPLACE(REGEXP_REPLACE(t.col1,
'([0-9]+)(\.|$)',
'000\1\2'),
'([0-9]{3}(\.|$))|.',
'\1') DESC
) rn
FROM t
WHERE rn = 1
; C. -
How to find out the maximum value of one array
hi all..
I have one array that consists of some elements
so I want the maximum value of the list ...
if anyone knows this please help me..
thanks..>
If your array is already sorted, you can do a binary
search.
I think there are already methods to do that in
java.util.Arrays. (?)
If not, it's not hard to find an example on the net.
A binary search will be more efficient.1. If your array is already sorted, you do not need a binary search. Either check the value of arr[0] or arr[arr.length - 1] depending on the direction of sorting.
2. If your array is not sorted, try this:
int maxValue = arr[0];
for(int index = 1; index < arr.length; index++)
if(arr[index] > maxValue)
maxValue = arr[index];
} -
Hi,
I want to find data type from its value.
Ex- If value = 1234 then its data type is numeric.
If value = ABCD then its data type is char.
So is there any FM which can tell the data type from its value or any way to do it.
Moderator Message: Offering points is against forum RoE.
Regards,
Ashish Gupta
Message was edited by: Suhas SahaHai.
check this.
the five non-numeric types (text field (C), numeric text field (N), date field (D), time field (T), and hexadecimal field (X)), there are three numeric types, used in ABAP to display and calculate numbers. Data type N is not a numeric type. Type N objects can only contain numeric characters (0...9), but are not represented internally as numbers. Typical type N fields are account numbers and zip codes.
integers - type I
The value range of type I numbers is -2*31 to 2*31-1 and includes only whole numbers. Non-integer results of arithmetic operations (e.g. fractions) are rounded, not truncated.
You can use type I data for counters, numbers of items, indexes, time periods, and so on.
Packed numbers - type P
Type P data allows digits after the decimal point. The number of decimal places is generic, and is determined in the program. The value range of type P data depends on its size and the number of digits after the decimal point. The valid size can be any value from 1 to 16 bytes. Two decimal digits are packed into one byte, while the last byte contains one digit and the sign. Up to 14 digits are allowed after the decimal point. The initial value is zero. When working with type P data, it is a good idea to set the program attribute Fixed point arithmetic.Otherwise, type P numbers are treated as integers.
You can use type P data for such values as distances, weights, amounts of money, and so on.
Floating point numbers - type F
The value range of type F numbers is 1x10*-307 to 1x10*308 for positive and negative numbers, including 0 (zero). The accuracy range is approximately 15 decimals, depending on the floating point arithmetic of the hardware platform. Since type F data is internally converted to a binary system, rounding errors can occur. Although the ABAP processor tries to minimize these effects, you should not use type F data if high accuracy is required. Instead, use type P data.
You use type F fields when you need to cope with very large value ranges and rounding errors are not critical.
Using I and F fields for calculations is quicker than using P fields. Arithmetic operations using I and F fields are very similar to the actual machine code operations, while P fields require more support from the software. Nevertheless, you have to use type P data to meet accuracy or value range requirements.
C ---> character
D ---> date
P ---> packed
T ---> time
X ---> hexadecimal
I ---> integer.
N ---> Muneric.
Possible ABAP/4 data types:
C: Character.
D: Date, format YYYYMMDD.
F: Floating-point number in DOUBLE PRECISION (8 bytes).
I: Integer.
N: Numerical character string of arbitrary length.
P: Amount or counter field (packed; implementation depends on hardware platform).
S: Time stamp YYYYMMDDHHMMSS.
T: Time of day HHMMSS.
V: Character string of variable length, length is given in the first two bytes.
X: Hexadecimal (binary) storage.
regards.
sowjanya.b. -
How to find a value into a data block
There is a way to find a value into a data block, like finding
one into a record group
nullRafael Moreno (guest) wrote:
: There is a way to find a value into a data block, like finding
: one into a record group
Try something like this:
-- has to be in a when-button-pressed or key trigger
go_block('x_block');
first_record;
r_found:=false;
loop
if :x_block.search_field:=search_value then
r_found:=true;
exit;
end if;
down;
end loop;
if r_found=false then
first_record;
message('Value ' -
How to find out the maximum value in a Query
Dear all,
Im creating a Query on 0SD_C03 where i have to disply Maximum value of a material..
EX:
MATERIAL BILLED VALUE
x 1000
y 3000
z 2500
in a analyser i have to display only Y and 3000
We are using BW 7.0 version
Can any one help me out in this
Thxs in Advance
VenuHi Venu,
You may wish to refer the link below:
http://help.sap.com/saphelp_nw04/helpdata/en/17/82853c2dc5c505e10000000a11405a/content.htm
Assign points if this is helpful.
Regards,
Anil -
How to find out the maximum value in a Query within single material
Dear all,
Im creating a Query on 0SD_C03 where i have to disply Maximum value of a material which is having more that one transaction..
EX:
MATERIAL BILLED VALUE
x with BILLED VALUE 100
x with BILLED VALUE120
y with BILLED VALUE 50
y with BILLED VALUE 80
z with BILLED VALUE 50
z with BILLED VALUE 60
in a analyser i have to display X with billed value 120 that is max in X material and
Y with billed value 80 that is max in Y material and
Z with billed value 60 that is max in Z material
In a query all the values are summing up. I.e for X its 220 and Y its 130 and Z its110 but we dont want to get total sum value we want individual values and the maximim of those values..........
We are using BW 7.0 version
Can any one help me out in this
Thxs in Advance
VenuVenu,
In your query try creating a formula, with the value of each record as the key figure in the formula.
In the aggregation tab select maximum in the exception aggregation dropdown and then select material as the reference characteristic
then when you include material in the rows it will only display the maximum value.
cheers
mark -
How to find out the maximum value
Dear all,
i have one query where in i have to calculate Excise Duty based on the maximum sales qantity of all materials with the corresponding sales value... i mean i wil get the maximum value of a individual material no matter how many sales has done.i wil pick up the maximum sales qty and the correspondig sales value....
This im able to solve by taking the condition as TOP 1..
Now my question is if the same material qty is sold with differnt value then i have to pick up the Max value and as usual the sales qty..... plz help me out
Material Sales Qty sales value
3000 10 kl 1000INR
3200 15 kl 1100 INR
4000 20 kl 1000INR
in this case my query is picking up the max qty of 20 and the value 1000 INR as i had taken TOP 1 on Sales qty ....
<b>
But In the below example for the same material i have to pick up the 3 rd row where the sales value is maximum and the corresponding sales qty 10 kl</b>
EX Material Sales Qty sales value
3000 10 kl 1000INR
3000 10 kl 1100 INR
3000 10 kl 1500INRHi,
U can use the restrict option fo the Material characteristics for sales value just drag and drop on columns >right click Properties> U have the option Calculated Result as Summation, Maximum, Minimum etc..just choose Maximum for ur case. -
Finding minimum value in each row using dynamic query
need to find the minimum and maximum value from each row using dynamic query
[from curr] will be given as input
TukyDECLARE @t TABLE(a INT,b INT,c INT);
INSERT @t VALUES(1,2,3),(9,8,7),(4,6,5);
SELECT *
, ( SELECT MAX(val)
FROM (VALUES (a)
, (b)
, (c)
) AS value(val)
) AS MaxVal
, ( SELECT MIN(val)
FROM (VALUES (a)
, (b)
, (c)
) AS value(val)
) AS MinVal
FROM @t;
Best Regards,Uri Dimant SQL Server MVP,
http://sqlblog.com/blogs/uri_dimant/
MS SQL optimization: MS SQL Development and Optimization
MS SQL Consulting:
Large scale of database and data cleansing
Remote DBA Services:
Improves MS SQL Database Performance
SQL Server Integration Services:
Business Intelligence -
Calculate maximum value of subarray while creating it using a case structure and shift registers
I have two 1D arrays that contain cyclical information (kind of like a sine wave). One that contains information on position in degrees and another that contains torque. I would like to calculate the maximum torque value each time the position is within a certain range (e.g. from 30-80 degrees). The ranges are repeated - that's why it is cyclical. I use the "in range" function, a case structure and shift registers to build a new array with values that fall within the range I specify - this was the easy part (see VI attached). I'm struggling with a way to calculate a maximum value for each subarray formed when values are "in range". Your help is much appreciated.
Solved!
Go to Solution.
Attachments:
Simple Calculate between anatomical position range.vi 16 KBIt's not really noise - it's more inconsistency. So a position output can run: 20, 30, 40, 50, 60 etc. OR, it could run: 21, 24, 32, 41, 44, 51, 59 etc. But, it is always cyclical.
Attached you will find a .csv file with the data arrays - I'm using POS (ANAT) degrees column (column D if you open in excel). There you also see torque in ft-lbs along with some other information.
Attachments:
025C.csv 224 KB -
How to find default value of a column ?
hi , alok again,
i have to find default value of a column.
Acutally i have found , column's max width, its nullability, precision, scale, type, but NOT default value.
I will have to use the default value and nullability while validating user's input.
ResultSetMetaData doesnot contain any method any such method...
Pls help,
how can i do so.
Any idea will be highly appreciated.
Thanks in adv.
AlokHi,
After you get the resultset from DatabaseMetaData.getColumns() as shown by sudha_mp you can use the following columns names to retrieve metadata information:
Each column description has the following columns:
TABLE_CAT String => table catalog (may be null)
TABLE_SCHEM String => table schema (may be null)
TABLE_NAME String => table name
COLUMN_NAME String => column name
DATA_TYPE int => SQL type from java.sql.Types
TYPE_NAME String => Data source dependent type name, for a UDT the type name is fully qualified
COLUMN_SIZE int => column size. For char or date types this is the maximum number of characters, for numeric or decimal types this is precision.
BUFFER_LENGTH is not used.
DECIMAL_DIGITS int => the number of fractional digits
NUM_PREC_RADIX int => Radix (typically either 10 or 2)
NULLABLE int => is NULL allowed.
columnNoNulls - might not allow NULL values
columnNullable - definitely allows NULL values
columnNullableUnknown - nullability unknown
REMARKS String => comment describing column (may be null)
COLUMN_DEF String => default value (may be null)
SQL_DATA_TYPE int => unused
SQL_DATETIME_SUB int => unused
CHAR_OCTET_LENGTH int => for char types the maximum number of bytes in the column
ORDINAL_POSITION int => index of column in table (starting at 1)
IS_NULLABLE String => "NO" means column definitely does not allow NULL values; "YES" means the column might allow NULL values. An empty string means nobody knows.
SCOPE_CATLOG String => catalog of table that is the scope of a reference attribute (null if DATA_TYPE isn't REF)
SCOPE_SCHEMA String => schema of table that is the scope of a reference attribute (null if the DATA_TYPE isn't REF)
SCOPE_TABLE String => table name that this the scope of a reference attribure (null if the DATA_TYPE isn't REF)
SOURCE_DATA_TYPE short => source type of a distinct type or user-generated Ref type, SQL type from java.sql.Types (null if DATA_TYPE isn't DISTINCT or user-generated REF)
Regards,
bazooka -
How to define in the optional the clause, the maximum value of a colum
Hi!
I'm using select data block from database toolset.
I want to use optional clause wiring to import only the maximum value of the column 2.
E.g. to import only the values greater than 1 you have to wire a string like this col2>1. But i don't know which string i have to wire to iport the maximum value of this column.
Thank you in advance.
LarsonHi Larson
To select row n you either need a certain value (e.g. an index or something you know is unique in row n) or you select all values and extract one row in LV.
So the first statement would be "SELECT * (* means all columns, you could also specify the columns as well) FROM data WHERE [a value = another value]. This would give you just the rows where the where-clause is correct. The other way is to select all data and just extract row n from the array you get from the recordset.
There might be other ways, but these are two solutions I just had in mind.
Manuals - just google the internet for SQL (Structured Query Language) and you will find lots of websites providing this information.
Hope this helps.
Thomas
Using LV8.0
Don't be afraid to rate a good answer... -
Console spam: "com.apple.time: Interval maximum value"
Hi, everyone —
Getting a little obsessed about cleaning out unnecessary Console messages and I'm finding that ~50% of my messages is this exact line:
com.apple.time: Interval maximum value is 946100000 seconds (specified value: 9223372036854775807).
I get this line about once a minute, and at the top of the hour get it almost a hundred times, ie:
6/6/13 8:59:59.991 AM com.apple.time[161]: Interval maximum value is 946100000 seconds (specified value: 9223372036854775807).
6/6/13 8:59:59.994 AM com.apple.time[161]: Interval maximum value is 946100000 seconds (specified value: 9223372036854775807).
6/6/13 8:59:59.996 AM com.apple.time[161]: Interval maximum value is 946100000 seconds (specified value: 9223372036854775807).
6/6/13 8:59:59.998 AM com.apple.time[161]: Interval maximum value is 946100000 seconds (specified value: 9223372036854775807).
6/6/13 9:00:00.001 AM com.apple.time[161]: Interval maximum value is 946100000 seconds (specified value: 9223372036854775807).
6/6/13 9:00:42.568 AM com.apple.time[161]: Interval maximum value is 946100000 seconds (specified value: 9223372036854775807).
6/6/13 9:01:33.575 AM com.apple.time[161]: Interval maximum value is 946100000 seconds (specified value: 9223372036854775807).
Anyone know how to clean this up?Ok, after digging a bit, I've found what cause this warning: the DOT @ the end of the NTP server name... I thing it is used to specify the interval from the GUI, but without a value (i.e. Apple, Europe, (time.euro.apple.com.)) it probably fall to the maximum signed int64 value.
If you trim that dot or specify a value after the dot, the warning goes away.
Moreno
Edit: I now have these console errors... sandbox...:
07/08/14 10:06:33,415 sandboxd[158]: ([196]) ntpd(196) deny file-read-data /private/var/run/resolv.conf
07/08/14 10:06:33,419 sandboxd[158]: ([196]) ntpd(196) deny file-read-data /private/var/run/resolv.conf
07/08/14 10:08:35,827 sandboxd[158]: ([196]) ntpd(196) deny file-read-data /private/var/run/resolv.conf
07/08/14 10:08:35,831 sandboxd[158]: ([196]) ntpd(196) deny file-read-data /private/var/run/resolv.conf
07/08/14 10:12:37,845 sandboxd[158]: ([196]) ntpd(196) deny file-read-data /private/var/run/resolv.conf
07/08/14 10:12:37,849 sandboxd[158]: ([196]) ntpd(196) deny file-read-data /private/var/run/resolv.conf -
Maximum Value Field not appeared in Maintaining License
Hi All
Please observe the screen short where I am trying to create a License Value Based. When I am saving it, it showing the message which we should enter the Maximum value granted by the Government Department. But the problem is I am no where finding that field to maintain the Value or Quantity also ( in other scenario).
Please help me in this reg, if there is any lacking of technical settings in Defining License types or any other.....
Thanking you
SrikanthYes, I got the Value Attribute left side within the ''Maintain Export License'' Screen.
Thank you All for your valuable inputs.
Now I have obtained a License in the GTS system and when I am trying to Assing to the Sales document I gone to path....Under Legal contraol data section------ Maintain Legal Control Data----- Here I have mentioned Ref: Doc number after going inside I am not able to find my License which I have Created in GTS not even External or Internal License also. Is this the correct path I have reached? or any other path should i go? Please help me.
Thanking you
Srikanth
Maybe you are looking for
-
What does it mean when its say itune.exe cannot locat MSVCR80.dll? How can I re-install itunes.
-
Inbound XML validation failed against schema
Hi Experts, we are getting mapping exception at the time of Inbound XML validation but in the trace it is not displaying like which fields are not validating. I have gone through the Interface mapping in that we are using 2 mapping programs one is im
-
How do I save an iWeb page on an usb 'thumb' drive?
My children ate creating pages in iWeb at home and want to continue their development at school. Can they 'save' or 'publish' their pages at home to the removable drive and then upload and work on another computer? If so, what are the files they need
-
Trouble with modify/edit in illustrator 4
So, I'm building my first site in Catalyst. I designed my site in Illustrator 4 and imported it into Catalyst. I had all my states/transitions built and everything seemed to be working fine. I then went back to edit a pice of placeholder text by clic
-
It has been downloaded, but when I try to install, it tells me it's already busy installing. It's been a few hours!