Scan of timestamp string

Hi all

A minor question about the timestamps and analysis of the chain. I needed to convert a string to a timestamp and found the solution I needed to this post: link

I wanted to do a bit more stripped and noticed that when I assembled the formatted string it would not recognize the output Assembly in the form of stamp - it comes out a double. The inputs of channels are identical. The double precision output converted into a Timestamp to give the correct value - so I have a work around.

I was just curious to know if it is a minor issue with LabVIEW or is it an element of intent? Or y at - there some step I'm missing to force my output in a Timestamp.

Thank you

Dave

When you wire up a string of digitization of the string constant, the function can self-enroll ' adapt to the entrance and you get the appropriate automatically output.   With a string of format generated programmatically, you use the default entry (the circle with the dot) by default, DBL.  Wire just a constant Timestamp, or at the present time, this entry.

Tags: NI Software

Similar Questions

  • Strange "Scan chain" Timestamp error

    Hello

    I try to analyze my time string in a timestamp with 'Analysis of the chain' but I have some Error (1) strange.

    Code:

    The error:

    can anyone confirm? have I not a mistake in my string parser?

    It may be due to this Bug

    461196

    Scan chain VI returns 1 error with '%t' as the input format string

    http://www.NI.com/product-documentation/52151/en/

    This should be fixed?

    my version of labview is

    LV 2014 SP1 - Version 14.0.1 (32 bit)

    with the addon in real time (but the code in question was not executed on RT)

    Thanks for your time.

    Why do you have the square brackets around the string format string analysis? They aren't there when you generate the timestamp string if it fails when you try to convert as soon as they are supposed to be there.

  • How do I add time to the timestamp string

    Hello

    I have a problem with the addition of time to a timestamp string that is shown on the image below.

    What I need is to add some time for example. 1 hour, but if this change happens between 23:00 and 00:00, I need to change the date.

    Wanted for example results:

    14:53, 22.4.2015. --> 15:53, 22.4.2015.

    23:33, 22.4.2015. --> 00:33, 23.4.2015.

    Help, please

    Use the time to get based on seconds to get the time, use this form to add and subtract the time (to add an hour, simply add 60 * 60 seconds), use the entry timestamp in the Format Date/time function when you want an implementation of the chain.

    Bob Schor

  • date/time timestamp string

    Hello

    I want to convert DateTime in the format string to timestamp (using Labview 7.0) format. For this that I m using scan tool chain and cable of the format string, but its not able to connect the output. I have attached the vi.

    Kindly help me to fix the error

    Kind regards

    Ratna


  • chain number by "scan value" format string "%.3f" doesn'work

    I had a little problem.

    "To convert a string to a number, I use the function"scan value"with '%.3f' for the ' format string"connector. I would get a 3 digit number. But this doesn't work with the parameter "%.3f.

    Thank you.

    Please check the syntax of using LV Format specifier. There is a table that describes the purpose of each specifier. When you read in the description "when you use a function in shape", the specifier is applied to the number-> string, when you read "when you use a sweep feature", the specifier applies to the String-> number. The syntax of width element applies to both situations, the. Element of syntax accuracy does not work.

  • LV RT - string double conversion

    Hello

    I want to convert a string to double on my camera in time real (PXI-8101. When I use the 'scan value' or "String Fract/Exp to function of number" VI the digits after the decimal point disappear. This does not happen on the host (PC).

    So, for example on the host vi, the string "2121,3" gives the number 2121,3. If I do the same thing on real time, the string "2121,3" returns the number 2121.

    How can I fix?

    Thanks in advance,

    Kind regards
    Dries

    I changed to the '%, %f' format string and now it works. Thanks for the help.

    Best regards
    Dries

  • Scan chain with TRUE FALSE and the comma as separator

    Produced cabling 'REAL FAKE' entry as '%s %s' format as false to scan string constants

    the two binary values you want, corresponding to the input string.

    Whereas "TRUE, FALSE" as entry and "%s, %s" format leads to an error.

    I lost a lot of time to understand that the error has its origin in the incompatible separator and not in the way I use this function.

    Wouldn't be possible (ask nicely) to place a note in the online help for this function, you need to use only spaces or tabs as separators
    with chains binary when you use this function?

    It was not clear to me why I should not use the comma as a separator.

    Now, my solution is to replace all the commas with spaces before you wire the input string to scan from a string.

    Is there another workaround solution or someone can provide a deeper understanding of why comma does not work?

    My guess is that he was mistaken for a decimal separator and implies not being part of a binary value.

    Use ' % [^,], %s ' as your specifier.  ' % [^,] "will result in a string up to the next comma.

  • timestamp XY-graph question

    Hi all

    I'm sure that it's simple, but I can't understand what is wrong with my xy-graph. I read a timestamp string to a waveform data file and convert it into a timestamp format. I then traced data vs. time.

    The timestamps look OK, but the plot is all out of whack. I have attached a simple example. Can someone help me and see what I'm doing wrong?

    Thank you!

    Hi Kevin,.

    I think that the plot it correct because there is no data for almost 1 month IE 06/09/2012-09-7 - 2012.Please check again.

    Kind regards

    SrikrishnaNF

  • How can I ignore the differences between databases when reading data from a database?

    My boss wants me to create a text parser that analyzes the sentence below and executes a SQL query.

    "' get the table field1, field2, field3,..., Manyfield [where to SQL conditional statements].

    This corresponds to "select Field1, Field2, field3,..., table Manyfield where blahblah".

    Since different DBMS have different timestamp formats, this sentence should be changed for each DBMS.

    Ignore the differences is to do anlayzer that converts a certain type of timestamp string to one that adapts to each DBMS complex a text.

    But it seems ridiculous to adopt this solution when there might be an elegant solution.

    LabVIEW Toolkit of DB is not able to hide the differences.

    Does anyone have a better idea that I do?

    I remember having a problem like this when you are working with an older version of an Oracle server. I was able to change the session by setting the 'NLS_TIMESTAMP_FORMAT '.

    This page might be of interest; I found this, when searching for "NLS_TIMESTAMP_FORMAT".

    Database portability: Date and Timestamp columns

    (PS String Format and channel Scan functions work well with the correct date format specifiers. See the link below in my signature for the ISO 8601 timestamp/string conversions)

  • analysis of the chain of the serial port to retrieve data

    Hi all

    It is a problem of beginner. I have two sensors sending data to a same wireless serial port. In order to distinguish which is which. I coded each sensor to send data with a unique address UoL 000 X, then followed by two values, I want to read. These two values are in the float with format fixed impression (decimal fixed after the third bit). The format string of the first sensor should looks like UoL 0001 123,45678 876.54321. I use the Scan of the String function, unfortunately, it doesn't work that way. Could you please check the VI for me? Or a better solution for this application. Thank you very much.

    S.G

    It does not because what you have set is not different from what you have joined earlier.  Have you tried something?

    See this amendment attached to your VI.  The format strings work with the examples you gave, and sends the data to the appropriate indicator.

    Also, I cleaned up the mess that the inner loop where you were waiting for 1 or more bytes.  Which means most of the time that you would probably get an incomplete message.

  • Conversion from data type "float".

    In a wireless data logger I collect analog data with a 8-bit microcontroller and sending it as a UDP datagram. The data received in the LV application looks like this:

    \r\n020.43\s002.14\s000.00\s000.02\s ("------" "" display codes)

    0D0A 3032 302F 3433 2030 3032 2E31 3420 3030 3030 2030 3030 2E30 3220 (display Hex) 302F

    020.43 002.14 000.02 000.00 (normal display)

    I want to undress and show values 20.43, 2.14,0.0 and 0.02 in my application of LV.  Try with "Scan of the String" and "Decimal number to the string" but without much success. Maybe I can 'building' my data of the hexagon?

    Any idea is welcome. Thank you.

    Channel scan works very well for me.

  • Device requires two characters of endpoint to complete the "READ" command

    Hello, I'm the Labview programming, an application to receive data from a device series. One of the problems is that the unit always displays CR + LF after each measurement. However, in Labview, it seems that a single character is allowed. This causes problems for me, because when I choose LF as the stop character and I'm scanning the reading string, it contains the other termination character, who is sent to my data table, file and waveform, and it also fails to plot the data in the table of waveform, since the digital channel is not pure numbers.

    Is there a way to get around this? Thanks for any help.

    Define LF as your character to terminate employment.  Search for the string of the CR function and return the data before the CR.

  • Select the project of the serial port data

    Hello world

    The project aims to use labview to receive data from a serial port wireless. The serial port will receive two values (X 1 and X 2) every 10 minutes. I want to use these two values as inputs to my formula. How to make the selection? Thank you very much.

    Baicy

    Scan from a String.

    Using the first option and put numbers for zeros so that it shows some kind of significant result.

  • Problem sending Mails with attachment binary BlackBerry 4.5

    Hallo,

    my code well testet, sending binary content as an attachment no longer works on 4.5.0:

    ------------------------

    settings specified in the signature of mtehod
    String url = "blackberry20@test";
    Byte [] requestdata / /... of the binary data (really!)

    create new message
    final Message message = New Message();

    define the recipient (as it appears in the url)
    message.addRecipients (Message.RecipientType.TO,
    new address [] {new address (url, url)});
           
    String msgID = (DeviceInfo.getDeviceId () + "_" + System.currentTimeMillis ()) .toUpperCase ();
    message.setSubject (msgID);

    create the body... empty text
    Several multipart part = new Multipart();
    TextBodyPart txtBody = new TextBodyPart (multipart);
    txtBody.setContent("");
    multipart.addBodyPart (txtBody);

    create attachments and add
    AttachmentPart SupportedAttachmentPart = new SupportedAttachmentPart (multipart);
    attachmentPart.setContentType("application/octet-stream");
    attachmentPart.setFilename (msgID);
    attachmentPart.setContent (requestData);

    multipart.addBodyPart (attachmentPart);
    message.setContent (multipart);

    Send mail in own thread
    Thread thread = new Thread ('Send Mail Thread') {}

    public void run() {}
    try {}
    Transport.Send (message);
    } catch (Throwable e) {}
    System.Err.println ("error sending message" + e.getClass () .getName () + "/" + e.getMessage ());
    }
    }
    };
    thread. Start();

    ------------------------

    This code has been compiled with JDE 4.0 and worked fine on 4.0, 4.1, 4.2

    It works on my 4.5.0.55 _not_ shrimp (BES 4.1.4) and on a "BOLD" customer (4.6.0.X/BES > = 4.1.4)

    It seems to be an attachment API on 4.5.0, of the major changes that are not compatible with older versions.

    -Are there workarounds?
    -Are there examples how to do work on > = 4.5?
    -How to be always compatible backword for 4.0, 4.1, 4.2?
    -What impact have the BES/BIS-platform on these issues?
    -Are there serious documentation out there how to set the ContentType, Filename, etc.?

    Would be great if some have had a (customers get angry response

    Thanx, Jens Kinzel

    Hello Mark,

    I tried the example excatly you mentioned: If the content was about 60Bytes.

    The following code does NOT work on > = 4.5:
    ---------------------
    public static sendHTMLMailRIMExample (String address) Sub throws {MessagingException}

    create a multipart
    Multipart MP = new Multipart();

    data for the content of the file
    FileData = string"just a simple test";
    String messageData = "Mail attachment Demo";

    create the file
    SAP SupportedAttachmentPart = new SupportedAttachmentPart (mp, "text/html", "upploadare", fileData.getBytes ());

    The PTB TextBodyPart = new TextBodyPart (mp, messageData);

    Add the file to the multipart
    mp.addBodyPart (BSC);
    mp.addBodyPart (sap);

    create a message in the sent items folder
    Folder folders [] is Session.getDefaultInstance () .getStore () .list (Folder.SENT);.

    Message message = new Message(folders[0]);

    Add recipients to the message and send it

    Address = new address (address, address);
    [ToAdds] address = new address [1];
    toAdds [0] = n;
    message.addRecipients (Message.RecipientType.TO, toAdds);
    message.setContent (mp);

    Transport.Send (message);
    }
    --------------------

    I found that the problem is a combination of Firmware and BES. Here are the relevant areas of the BES-Logfile:

    Example 1: Mail is rejected
    --------------
    MAGT-Log:
    [40000] (12/17 13:58:31.943): {0x14C8} [BENNETT] received datagram, Tag = 64192
    [40700] (12/17 13:58:31.943): {0 x 1534} {[email protected]} received device package, size is 199, TransactionId = 1152541538, Tag = 64192, content type = CMIME, cmd = 0 x 3
    [20212] (12/17 13:58:31.943): {0 x 1534} {[email protected]} StreamToMessage() failed, Tag = 64192
    [40275] (12/17 13:58:31.943): {0 x 1534} {[email protected]} error in transaction of sending to the device for the transaction 1152541538, size = 40, TransactionId = 920681772, Tag = 140390
    [40279] (12/17 13:58:31.943): {0 x 1534} {[email protected]} SubmitToRelaySendQ, Tag = 140390
    [40000] (12/17 13:58:31.943): {0x14D0} [BENNETT] send data, Tag = 140390
    [40279] (12/17 13:58:31.943): {0 x 1534} {[email protected]} SubmitToRelaySendQ, Tag = 64192
    [40000] (12/17 13:58:31.943): {0x14D0} [BENNETT] send status DATA_ACCEPTED, Tag = 64192
    [40000] (12/17 13:58:32.896): {0x14C8} [BENNETT] received State DELIVERED, Tag = 140390

    DISP-Log
    [30222] (12/17 13:58:31.943): {0 x 1104} {myBlackBerry} MFH: contentType = CMIME, sizeOTA = 172, sizeOTW = 162, TransactionId = 1152541538, Tag = 1705182
    [30308] (12/17 13:58:31.943): {0 x 1104} [BIPPa] {myBlackBerry} transfer data to BES Agent (S10096620_001), size = 199, intTag = 64192, Tag = 1705182
    [30311] (12/17 13:58:31.943): {0x110C} {myBlackBerry} Forwarding status of relay, intTag = 64192, Tag = 1705182, Status = 1
    [30368] (12/17 13:58:32.896): {0 x 1110} {myBlackBerry} package was delivered to the device, Tag = 233560
    [30388] (12/17 13:58:32.896): {0 x 1110} [BIPPa] {myBlackBerry} status transfer to BES Agent (S10096620_001), intTag = 140390, extTag = 233560

    ALRT-Log
    [30000] (12/17 13:58:31.990): {0x5F4} EventLog::ThreadProc: received notification, treatment...
    [30000] (12/17 13:58:31.990): {0x5F4} [Alarm::ActivateAlarm] alarm Queuing: | BlackBerry messaging Agent Agent of S-05-005 1 (S-05-005 applications event log). 2008-12-17 13:58:31 (AFFF4EF4)-> {[email protected]} StreamToMessage() failed, Tag = 64192
    [30000] (12/17 13:58:31.990): {0x5C0} Alarm::ThreadProc: received an alarm message
    ------------------

    Example 2: The mail is sent
    ------------------
    MAGT-Log
    [40000] (12/17 14:11:33.109): {0x14C8} [BENNETT] received datagram, Tag = 64209
    [40700] (12/17 14:11:33.109): {0 x 1540} {[email protected]} received device package, size is 243, TransactionId = 201738721, = 64209, content type Tag = CMIME, cmd = 0 x 3
    [30112] (12/17 14:11:33.125): {0 x 1540} {[email protected]} receipt message to the device, RefId = 1323541580, Tag 64209, TransactionId = 201738721 =
    [40292] (12/17 14:11:33.687): {0 x 1540} {[email protected]} E-mail message sent to device, Tag = 64209
    [40279] (12/17 14:11:33.687): {0 x 1540} {[email protected]} SubmitToRelaySendQ, Tag = 64209
    [40000] (12/17 14:11:33.687): {0x14D0} [BENNETT] send status DATA_ACCEPTED, Tag = 64209
    -------------------------

    After fiddling around with the structure of the MIME multipart-message Types, I found a solution that works for me:

    -------------------------
    ' Private Sub sendRequest (String url, byte [] requestData) get {MessagingException}

    create new message
    final Message message = New Message();

    define the recipient (as it appears in the url)
    message.addRecipients (Message.RecipientType.TO,
    new address [] {new address (url, url)});

    create topic: device over the current timestamp
    String msgID = ("DATA"_System.currentTimeMillis ()) .toUpperCase ();
    message.setSubject (msgID);

    create the body... a text
    Several multipart part = new Multipart();
    TextBodyPart txtBody = new TextBodyPart (multipart);
    txtBody.setContent (msgID);
    multipart.addBodyPart (txtBody);

    create attachments and add
    AttachmentPart SupportedAttachmentPart = new SupportedAttachmentPart (multipart);
    attachmentPart.setContentType("text/xml");

    attachmentPart.setContent (requestData);
    attachmentPart.setFilename (msgID + ".xml");
    multipart.addBodyPart (attachmentPart);
    message.setContent (multipart);
       
    Transport.Send (message);
    }
    ------------------------

    Let me say thank you for your ideas a Council. From my side, the problem is closed so far-
    even though im not sure if it will work for all environments.

    I'm not shure where the initial problem was (Firmware / BES - combination?) or something else.

    Thank you

    Jens Kinzel
    LÍNEAS Informationstechnik GmbH
    D-38122 Braunschweig, Germany

  • E-mail Info curve8310 using Java BlackBerry GPS

    Here is the code for blackberry GPS information sent to an e-mail address. The code uses sleep to send information at intervals.

    My problem is that when once that the GPS goes out of scope the application stops sending emails and no exception is thrown.

    If (lp! = null)

    {code}

    Sleep (65000);

    But it did not work for me.

    ////////

    public void run() {}
    While (! _stop) {}
    Address one;
    Store is Session.getDefaultInstance () .getStore ();.
    Records file [] = store.list (Folder.SENT);
    Folder sentfolder = files [0];
    Message m = new Message (sentfolder);
    SimpleDateFormat sdf;
                  
    try {}
    LP LocationProvider = LocationProvider.getInstance (null);
    If (lp! = null) {}
    Location = lp.getLocation (60);
    Coordinates of c = l.getQualifiedCoordinates (); get the GPS coordinates
                           
    If (c! = null) {}
    Lat string = Double.toString (c.getLatitude ()); Latitude
    LNG chain = Double.toString (c.getLongitude ()); Longitude
    String alt = Float.toString (c.getAltitude ()); altitude
    Tim string = Long.toString (l.getTimestamp ()); timestamp
    String spd = Float.toString (l.getSpeed ()); Speed
                               
    String orgstr = "0449953853", + tim + ',' + lat + ',' lng + ',' + ', ' + alt;
    String googmap =http://maps.google.com/maps?q= "+ lat + ',' + LNG;
    String finalstr = orgstr + "\n" + googmap;
    a = new address ("[email protected]", "Aditya Tuli";)
    Address address [] = {a};
    m.addRecipients (Message.RecipientType.TO, addresses);
    m.setContent (finalstr);
    m.setSubject ("GPS Position";)
    Transport.Send (m);
    }
    } sleep (65000); moved to re - run the thread
    } catch (Exception e) {}
    System.Err.println ("an error occurred" + try ());
    System.Exit (0);
    }
    }
    }

    ///////

    Please suggest.

    Thanks in advance.

    Concerning

    I think we have agreed that the problem is that it is there no LocationProvider or the getLocation is not a place, so to determine which of them seems to be the best place to start.  As you test on the device, you must debug on the device, you can connect by USB, starting the JDE, using the Debug/Attach To / Pocket PC, then select USB connected device.

    From there, you should be able to use the JDE debug, but according to levels, this sometimes does not work so well for me.  So I would like to add three statements of System.out.println (...), one at the beginning of the loop and the others inside each of the ' if.  This load on the device, then, once debugging started, simply wait for the missing output for each loop!

    Who help me?

Maybe you are looking for