How to convert substring to waveform
hi,
i have a input file with lots of numbers which need to be convert to waveform. i have use the match pattern vi to extract the data which i need to be plot out. those data can be seen from 'before substring' but i do not know how to convert that data to waveform. Can anyone help? i have attached the input file and the the vi as well. thanks
Solved!
Go to Solution.
Attachments:
Untitled 2.vi 13 KB
Try using Read from Spreadsheet File.vi. It will convert a tab-delimited text file into an array of numbers in one step.
Lynn
Similar Messages
-
How to convert substring(date) as the format i need...
Hi to everyone...
actually i got a field (datetime) in this format: yyyy/mm/dd
throught a function, i turned it in ex: 16/12/2012 (italian).
the issue comes when i have to concat 2 dates as:
min(date) || max (date)
(range of the week)
to do that, i have to use a CAST function as char (to allow me to use the Substring function)...
but when i do that, format change automatically in dd/MMM...
WHY??????
10/DEC - 16/DEC
(weeks n° 50)
how can i turn the month DEC in DIC?or more simple in number as --> 10/12 - 16/12???
at the beginning, i thought to the replace function, but i should to make a Replace nasted... or some kind of case when...
have u a way more fast to figure out from this problem????
many thanks guy!!!
PS. OBIEE 11g
Edited by: Barticchia on 17-dic-2012 5.52
Edited by: Barticchia on 17-dic-2012 5.55
Edited by: Barticchia on 17-dic-2012 5.57Can you try using Concat()?
-
How to convert cluster to waveform?
I'm having trouble building a waveform properly. I have a relativeX, an Xincrement, and a 1D array of data (what is returned from a 5114 scope). But the 'build waveform' function wants t0 to be a timestamp. This isn't what I want....
I don't mind just using the cluster for showing it on a waveform graph because it works and it's not a problem. However, there are a lot of waveform functions for writing waveforms to files that I would like to take advantage of....how can I do this?
thanks,
-ZI think I am with you and the answer is probably not. You can work with both datatypes but if you want to use waveform datatype then there is a little more work to get the graphs looking the same with a negative x0
Let me know you labview version and I will post the above vi for you to study.
David
Message Edited by David Crawford on 10-25-2006 09:20 AM
Attachments:
Waveform Graph - Cluster or Waveform Data Type.jpg 24 KB -
Convert a rpm waveform to digital/analog tach signal. Sound & Vibration
Hello,
my question is: How to convert a rpm waveform to
digital/analog tach signal for use with SV application?
Or is it possible to modify the SV - VIs for the use of
a rpm waveform or a speed signal?
Thanks a lot for coming answers.
Thomas NudingTypically an RPM waveform is the analog view of a tachometer, such as a proximity probe over a key or keyway, or an index pulse from an electric motor. In most rotor dynamics applications, the phase of the tachometer waveform is compared to the phase of other waveforms, such as vibration, to determine the angular position of the shaft when the other waveform occurs.
The sound and vibration tools have a function for calculating RPM from an analog tachometer waveform. The order analysis toolset go further to add a counter as an tachometer input. The OAT tools also allow for selection of rising edge or falling edge and voltage level for the "trigger". A time instance is recorded when the edge occurs. This time instance is used for phase measurements and for resampling the other waveforms into the angular domain, ie. 360 measurements per revolution.
Preston Johnson
Principal Sales Engineer
Condition Monitoring Systems
Vibration Analyst III - www.vibinst.org, www.mobiusinstitute.com
National Instruments
[email protected]
www.ni.com/mcm
www.ni.com/soundandvibration
www.ni.com/biganalogdata
512-683-5444 -
Convert a rpm waveform to digital/an​alog tach signal. Sound & Vibration
Hello,
my question is: How to convert a rpm waveform to digital/analog tach signal for use with SV application?
Or is it possible to modify the SV - VIs for the use of a rpm waveform or a speed signal?
Thanks a lot for coming answers.
Thomas Nudingduplicate post
-
How to convert a waveform signal into array of complex numbers
How to convert a waveform signal into array of complex numbers.
Hi Chaks,
try this:
(Get Waveform components, convert to complex DBL)
Message Edited by GerdW on 01-28-2008 09:23 AM
Best regards,
GerdW
CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
Kudos are welcome
Attachments:
ToCDB.png 1 KB -
How to convert waveform into complex number
Hi,
I need to convert the acquired voltage and current waveform through DAQ card into complex numbers in order to find the phase relationship
between the waveform.Can u tell me is there any method to convert the acquired waveform into complex number array
or is there any other method to find the phase??
please help me in this
Regards
MeenatchiDear Meenatchi,
I am attaching two sample VI s for the issue you are facing. Hope this helps.
The waveform in array format.vi gives you the values of the waveform obtained from your DAQ card in an array directly. You can choose this mode by selecting it from the options available on the DAQmx read vi. But if you still want to extract the array from the waveform data type please navigate to programming >> waveform >> get waveform components and extract the array component.
The phase of the complex number created.vi gives you and array of the phases. Please specify the number of iterations of the for loop that determines the size of the array.
If you need any further assistance, please feel free to contact us.
Regards,
Pavan Ramesh
Applications Engineer
NI India
Attachments:
Waveform array issue.zip 10 KB -
How to convert hex into a string value
hei evryone!
can anyone please help me on how to convert a hex value into a string suppose.. Example i want to convert 4275646479 which is a hex value, into a string "BUDDY"? how will i do that???
Any suggestion, tutorial site would be appreciated?
Thx!something like this will convert string to byte[]
e.g.
you want to convert following.
656667 => ABC
String toConvert = "656667";
byte[] returnVal = String2byteArr (toConvert );
String FinalStr = new String(returnVal);
public static byte[] String2byteArr(String Result)
byte[] byteRet = new byte[Result.length()/2];
int k=0;
for (int j=0; j<(Result.length()); j+=2)
try
Integer I = new Integer (0);
I = I.decode ("0x"+Result.substring(j, j+2));
int i = I.intValue ();
if (i > 127)
i = i - 256;
byteRet[k++] = new Integer(i).byteValue();
catch(Exception e)
System.err.println(e);
return byteRet;
}// String2byteArr
Hope this will help you, So that i can get 3$ (:-)
Avi -
How to convert date format in XI? Help!
Hi Experts,
PIP is the input for XI.
The PIP has date as : <DateTimeStamp>20030515T000000.000Z</DateTimeStamp>.
How to convert it into MM/DD/YYYY format in XI?
Thanks
Gopalhi,
use two standard functions:
<b>substring </b>(to take first 8 chars from this field)
<b>DateTrans</b> to change 20030515 to MM/DD/YYYY
http://help.sap.com/saphelp_nw04/helpdata/en/43/c4cdfc334824478090739c04c4a249/content.htm
that's all you need to do very simple
Regards,
michal
<a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions"><b>XI / PI FAQ - Frequently Asked Questions</b></a> -
How to convert xslt file into string
i'm writting a java program to use xslt to transform the xml file. i'm encountering the problem when i try to convert the xslt file into string. i've defined my utility class called 'XmlUtil' to carry out the operation of transform xml file through xslt. but in my main java program i need to convert both xml and xslt file into a string in order to input them in my function argument. my function argument is as follows:
String htmlString = XmlUtil.applyXsltString(xmlContent, xsltString);
i've already converted xmlcontent into string by using:
xmlContent = xmlContentBuffer.toString();
but i don't know how to convert 'xsltString' now ? i've searched the google for an hour but i cannot find the solution. anyone can help ?
detail of my souce code is as follow:
import java.io.*;
import java.net.*;
import java.lang.*;
import java.io.StringReader;
import java.lang.reflect.Array;
import java.util.Properties;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.sax.SAXResult;
import javax.xml.transform.sax.SAXSource;
import javax.xml.transform.sax.SAXTransformerFactory;
import javax.xml.transform.sax.TransformerHandler;
import javax.xml.transform.stream.StreamSource;
import org.apache.xml.serializer.OutputPropertiesFactory;
import org.apache.xml.serializer.Serializer;
import org.apache.xml.serializer.SerializerFactory;
import org.w3c.dom.Document;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import org.xml.sax.InputSource;
import org.xml.sax.XMLReader;
import org.xml.sax.helpers.XMLReaderFactory;
import XmlUtil;
public class FileDownload {
public static void download(String address, String localFileName){
OutputStream out = null;
URLConnection conn = null;
InputStream in = null;
StringBuffer xmlContentBuffer = new StringBuffer();
String temp = new String();
String xmlContent;
try {
URL url = new URL(address);
out = new BufferedOutputStream(
new FileOutputStream(localFileName));
conn = url.openConnection();
in = conn.getInputStream();
byte[] buffer = new byte[1024];
int numRead;
long numWritten = 0;
System.out.println (in.toString ());
while ((numRead = in.read(buffer)) != -1) {
out.write(buffer, 0, numRead);
numWritten += numRead;
temp = new String(buffer);
xmlContentBuffer.append(temp);
System.out.println(localFileName + "\t" + numWritten);
xmlContent = xmlContentBuffer.toString();
String htmlString = XmlUtil.applyXsltString(xmlContent, xsltString);
} catch (Exception exception) {
exception.printStackTrace();
} finally {
try {
if (in != null) {
in.close();
if (out != null) {
out.close();
} catch (IOException ioe) {
public static void download(String address) {
int lastSlashIndex = address.lastIndexOf('/');
if (lastSlashIndex >= 0 &&
lastSlashIndex < address.length() - 1) {
download(address, address.substring(lastSlashIndex + 1));
} else {
System.err.println("Could not figure out local file name for " + address);
public static void main(String[] args) {
for (int i = 0; i < args.length; i++) {
download(args);
}I don't understand why you need load the XML and XLS files into a String. A Transformer can be constructed from a Source and there is a StreamSouce which can be constructed from an InputStream. The transform() method can take a Source as input and can produce a Result. There is no need to go near a String representation of either the input.
-
How to convert BLOB data into string format.
Hi,
I have problem while converting blob data into string format.
for example,
Select dbms_lob.substr(c.shape.Get_wkb(),4000,1) from geotable c
will get me the first 4000 byte of BLOB .
When i using SQL as i did above,the max length is 4000, but i can get 32K using plsql as below:
declare
my_var CLOB;
BEGIN
for x in (Select X from T)
loop
my_var:=dbms_lob.substr(x.X,32767,1)
end loop
return my_var;
I comfortably convert 32k BLOB field to string.
My problem is how to convert blob to varchar having size more than 32K.
Please help me to resolve this,
Thanx in advance for the support,
NileshNilesh,
. . . .The result of get_wkb() will not be human readable (all values are encoded into some binary format).
SELECT utl_raw.cast_to_varchar2(tbl.geometry.get_wkt()) from FeatureTable tbl;
-- resulting string:
☺AW(⌂özßHAA
Å\(÷. . . .You may also want to have a look at { dbms_lob | http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14258/d_lob.htm#i1015792 } "The DBMS_LOB package provides subprograms to operate on BLOBs, CLOBs, NCLOBs, BFILEs, and temporary LOBs."
Regards,
Noel -
Hi,
Can any one tell me how to convert a CLOB into BLOB? In Oracle 10g there is a function which is converttoblob(). But in Oracle 9i there is no function as such. If i am using Hextoraw() function still then its giving some pointer error. please let me know the solution.FUNCTION c2b( c IN CLOB ) RETURN BLOB
-- typecasts CLOB to BLOB (binary conversion)
IS
pos PLS_INTEGER := 1;
buffer RAW( 32767 );
res BLOB;
lob_len PLS_INTEGER := DBMS_LOB.getLength( c );
BEGIN
DBMS_LOB.createTemporary( res, TRUE );
DBMS_LOB.OPEN( res, DBMS_LOB.LOB_ReadWrite );
LOOP
buffer := UTL_RAW.cast_to_raw( DBMS_LOB.SUBSTR( c, 16000, pos ) );
IF UTL_RAW.LENGTH( buffer ) > 0 THEN
DBMS_LOB.writeAppend( res, UTL_RAW.LENGTH( buffer ), buffer );
END IF;
pos := pos + 16000;
EXIT WHEN pos > lob_len;
END LOOP;
RETURN res; -- res is OPEN here
END c2b; -
[Oracle 8i] How to convert a string (time stamp) into a date?
I'm having difficulty figuring out how to convert a time stamp string into a date (or possibly a number).
The time stamp is 20 positions, character (NOT NULL, CHAR(20))
in the format: YYYYMMDDHHMMSSUUUUUU
where Y = Year, M = Month, D = Day, M = Minutes, S = Seconds, and U = Microseconds
The reason I want to convert this is so that I can compare one time stamp to another (i.e. I want to be able to find the MIN(timestamp), MAX(timestamp), and do inequality comparisons).
Is this at all possible?
Thanks in advance for help on this!Hi,
As Damorgan said, if all you want to do is find which is the earliest or latest, then you can just compare the strings: they happen to be in a format where that works.
If you need to do other things, such as compare them to today's date, or see the difference between two of your rows in days, then you have to convert them to DATEs. (There's no point in converting them to NUMBERs).
A new data type, TIMESTAMP, which handles fractions of a second, was introduced in Oracle 9.
Since you're using Oracle 8 (according to your subject line), you either have to
(1) ignore the microseconds, or
(2) use a separate NUMBER column for the microseconds.
Either way, use TO_DATE to convert the first 14 characters to a DATE:
TO_DATE ( SUBSTR (txt, 1, 14)
, 'YYYYMMDDHH24MISS'
)where txt is your CHAR column.
To convert the microseconds to a number (between 0 and 999999):
TO_NUMBER (SUBSTR (txt, 15)) -
How to convert date to ccyymm format
Hi,
How to convert date to ccyymm format.
Thanksdadivela wrote:
Re: How to convert date from ccyymm format to mmddyyI didn't inderstand. Date doesn't have any format. If you have a string in CCYYMM format, you would have to extract the YYMM from the string.
SQL> SELECT SYSDATE,
2 TO_CHAR (SYSDATE, 'ccyymm') Date_Fm,
3 SUBSTR (TO_CHAR (SYSDATE, 'ccyymm'), 3) YYMM
4 FROM DUAL
5 /
SYSDATE DATE_F YYMM
08-JUN-09 210906 0906You can use this string to convert it to date. Note that since DD part of your date was not their in the resultan string, the converted date will fall back to first of the month specified.
SQL> SELECT SYSDATE,
2 TO_CHAR (SYSDATE, 'ccyymm') Date_Fm,
3 SUBSTR (TO_CHAR (SYSDATE, 'ccyymm'), 3) YYMM,
4 TO_DATE (SUBSTR (TO_CHAR (SYSDATE, 'ccyymm'), 3), 'YYMM') conv_Dat
e
5 FROM DUAL
6 /
SYSDATE DATE_F YYMM CONV_DATE
08-JUN-09 210906 0906 01-JUN-09
SQL>Then convert the date into the required format using TO_CHAR Function
SQL> SELECT SYSDATE,
2 TO_CHAR (SYSDATE, 'ccyymm') Date_Fm,
3 SUBSTR (TO_CHAR (SYSDATE, 'ccyymm'), 3) YYMM,
4 TO_DATE (SUBSTR (TO_CHAR (SYSDATE, 'ccyymm'), 3),
5 'YYMM') conv_Date,
6 TO_CHAR(TO_DATE(SUBSTR(TO_CHAR (SYSDATE, 'ccyymm'),3),
7 'YYMM'), 'MMDDYY') New_Format
8 FROM DUAL
9 /
SYSDATE DATE_F YYMM CONV_DATE NEW_FO
08-JUN-09 210906 0906 01-JUN-09 060109
SQL>Hope this helps.
Regarads,
Jo -
How to Convert DateTime to Date ?
This sounds easy, but I'm not progressing as I should.
element MyDate : Date;
MyDate = contract.ValidityPeriod.TimePointPeriod.StartTimePoint.DateTime. ;
The above complains about "Assignment of type DateTime to type Date is not possible".
I've looked into DateTime functions, but am not getting anywhere.
Any tips on how to convert a DateTime field to Date field ?Afaik, AP.Common.GDT.DateTime does not have a ConvertToGlobalDateTime method, furthermore retrieving the date from the globalDateTime could give you the wrong local date since it does do not consider time zones.
I would use the similar to the following (no guarantee about correctness):
import ABSL;
import AP.Common.GDT;
var In = contract.ValidityPeriod.TimePointPeriod.StartTimePoint.DateTime;
// convert To GlobalDateTime
var timeGlobal = GlobalDateTime.ParseFromString(In.content.ToString()); // not sure whether this is correct -> please verify yourself
// convert to LOCAL_DateTime using timeZone
var timeZone = In.timeZoneCode;
var localDateTime = timeGlobal.ConvertToLocalDateTime(timeZone);
var localDateTimeStr = localDateTime.ToString();
// cut off time suffix (starts with "T")
var localDateStr = localDateTimeStr.Substring(0, localDateTimeStr.Find("T"));
var date = ABSL:Date.ParseFromString(localDateStr);
Best regards,
Ludger
Maybe you are looking for
-
Hi APO Gurus... I want to know how to use Drill_Up and Drill_ Down macros in batch jobs. they work beautifully in interactive mode, but when processed in batch jobs they drill up only for the particular CVC's at the aggregated level specified in the
-
Can anyone help? Below is my program and I am getting 1error message when compiling and I can't figure it out. * WeatherForecast.java * Created on November 7, 2006, 9:38 AM * To change this template, choose Tools | Template Manager * and open the tem
-
Drag and drop videos onto iphone
Basically, I can't for some reason drag and drop videos onto my iphone 4. I manually manage my music and vids, songs I can drag and drop, but when it comes to videos, nothing happens. I have converted my videos to mp4 h264 format as required and stil
-
IWeb quitted and lost all my sites data
My iWeb quitted unexpectedly - when I reopened, it was empty, none of my sites were there. Fortunately I saved the sites to a folder, too, so the data is there. BUT I couldn't re-import the data as I found no function for importing, Dragging is not a
-
Facebook Update all contacts not working
Ever since updating to ios8 on my iPhone and iPad, as well as even on my Mac with Yosemite , I can no longer update my contacts with Facebook profile pictures. Any suggestions please