RS232 data to digital chart

Hi!
I past the last night trying to display a digital square wave en Labview...
I using Labview 7.1.1, in Windows XP SP2.
To adquire the data, i use a visa read function, after configurate the serial port.
In the hardware side, i have a PIC microntroller sending "1" and "0",
accord to the state of a digital signal in one of their inputs.
I correctly receive this data in string format, and i have no idea on how to convert this to
appropiate data for show in a digital waveform chart control.
I try scan from string, string to array, build array, build waveform, array to digital waveform...
Any help would be greatly appreciated
Best Regards,
Diego

I'm not sure if this is what you need. Could you post some data?? This is in 7.0 format.
Attachments:
string to digital waveform.vi ‏22 KB

Similar Messages

  • Display Data on waveform chart or XY graph over a long period of time

    Display Data on waveform chart or XY graph over a long period of time
    Can anyone help?
    I am acquiring data from an Ni DAQ card with the following parameters - sample rate = 12800, number of samples = 4096. I want to extract order information so as to track changes in the amplitudes of certain frequency harmonics. So I use the sound and vibration toolkit to extract this information as shown in the attached Vi.  I will like to plot the resulting amplitudes against real-time starting at the time the Vi was run.  I really want the display to show these changes over long periods (eg. days, months and even years).
    Problem.
    I have tried to plot the Y component of the resulting magnitude for a given order on a waveform chart. My choice of the waveform chart is because I also want to display  alarm limits (using the mask and limit vi) (I can't have these lines displayed on an XY graph plot).  I tried adjusting the scale offset using the property node and setting the offset to current time. However, the display on the X-axis can only show a span of  2 minutes as will be seen when you run the attached vi. I want the time display on the x-axis to be over a period of  days, months  and even years.  Is there a way to set the maximum scale on the x-axis to be say a year or so in future.
    I really want the display to be like the one in in the second attachment.
    Attached is a sample VI created using an Ni USB 9234 DAQ card. Any card will do but I am only getting the signal from one channel for this example
    I will appreciate any help that can be given to me.
    Thanks
    Attachments:
    Real-Time Graph Display.vi ‏170 KB
    Sampe screen1.doc ‏37 KB

    Long term testing can be tricky- and we'l get into that later.  Lets start with the basics that you have wrong.
    The vi as you have constructed it has only one memory element, the chart history length (default is 1024.)
    You can change the number of points the Chart will remember by Right-clicking the chart an select Chart History Length from the menu.
    But for a long term test - and one where you want to REMEMBER the first value you need a memeory element that is independant of the application.  Your PC WILL loose power or need to be rebooted eventually.  Heck it might even need to be replaced! you really need to store your data in a file. Preferablly in a file that is backed-up on a regular basis so you don't lose every point of data if the PC dies.  It realy hurts when you have to restart a 2yr test because you've lost the 18months of data you collected.
    For an application like this I would seperate my "collection" and "Evaluation" operations. 
    Have one vi that takes the reading and writes it to a file at a configurable rate  You may want 1reading  per minute for seveal days then 1 per hour for a few weeks- then maybe only once or twice a week for the next couple of years since you are looking for LONG TERM stability.  having too much data to evaluate can take a lot of digging to find the few things that interest you (but always take more that you think you need)
    Have another utility that COPIES the files, reads them and displays the data you are interested in that day.  The data you want to look at won't change over time HOWEVER, you WILL want to analize it in different ways depending on what the data trends look like.  Having seperate routines for collection and display allows you to update the display style and analisys without even stopping the collection vi (much less editing the vi)
    Jeff

  • Data web bean (chart) using a dynamic view object

    Please I want a quick help. I read all forums concerning this subject but I still couldn't do it.
    - I create a view object which takes a proameter using the ? style parameter.
    - I passed the parameter from an html page and execute the query
    of the view as follows:
    <%
    String deptno = request.getParameter("deptno");
    if(deptno != null) {
    oracle.jbo.html.jsp.JSPApplicationRegistry.registerApplicationFromPropertyFile(session , "MyProject21_package3_Package3Module");
    oracle.jbo.ViewObject v = oracle.jbo.html.jsp.JSPApplicationRegistry.getInstance()
    .getAppModuleInstance("MyProject21_package3_Package3Module",request,session)
    .findViewObject("View1");
    v.setWhereClauseParam(0,deptno);
    v.executeQuery();
    %>
    - And then I used the data web bean chart as follows:
    <jsp:useBean class="oracle.jbo.html.databeans.ChartRenderer" id="ch" scope="request" >
    <%
    ch.setReleaseApplicationResources(false);
    ch.initialize(application,session, request,response,out,"MyProject21_package3_Package3Module.View1");
    ch.setCommonScriptName("/webapp/jsp/chart_common.jsp");
    ch.getChart().setGraphType(ch.PIE);
    ch.setSeriesLabelColumnName("DeptNo");
    ch.setDisplayAttributes("CountEmplNo");
    ch.getChart().setPieFeelerTextDisplay(0);
    ch.getChart().setPieTilt(10);
    ch.getChart().setPieRotate(0);
    ch.getChart().setLegendDisplay(true);
    ch.getChart().setLegendMarkerPosition(0);
    ch.getChart().setTitleString("Title");
    ch.getChart().setSubtitleString("Subtitle");
    ch.getChart().setFootnoteString("Footnote");
    ch.setImageWidth(400);
    ch.setImageHeight(400);
    ch.render();
    %>
    - I tried to use the View1 as a view name, and the v as a view name
    but both of them get the same result
    SQL Statement error and the sql statement is displayed with the ? in it which means that he didn't replace it by the parameter.
    Please I need quick help.
    Thanks.
    </jsp:useBean>
    Remark : please send me the reply at "[email protected]"

    Hi Rishab,
    I'm running into the exact same problem, in the same situation. Did you solve this problem and can you tell me how?
    Thanks in advance,
    Paskal

  • How do I convert a 1-D array of cluster of 5 elements into a 2-D array of numbers? (history data from a chart)

    Hello,
    in my vi I have a chart with 5 Plots displaying measurement data.
    The user should be able to save all the history data from the chart at anytime. (e.g. the user watches the chart and some event happens, then he presses a "save"-button)
    I know, that I can read out the history data with a property node. That is not the problem. The problem is, how do I handle the data? The type of the history data is a 1-D array of cluster of 5 elements.
    I have to convert that data somehow into a 2 D-array of numbers or strings, so that I can easily save it in a text-file.
    How do I convert a 1-D array of cluster of 5 elements into a 2-D array of numbers?
    I use LabVIEW 7.1
    Johannes
    Greetings Johannes
    Using LabVIEW 7.1 and 2009 recently
    Solved!
    Go to Solution.

    Gerd,
    thank you for the quick response and the easy solution.
    Look what I did in the meantime. I solved the problem too, but muuuch more complicate :-)
    And I have converted the numbers to strings, so that I can easily write them into a spreasheet file.
    Johannes
    Message Edited by johanneshoer on 04-28-2009 10:39 AM
    Greetings Johannes
    Using LabVIEW 7.1 and 2009 recently
    Attachments:
    SaveChartHistory.JPG ‏57 KB
    SaveChartHistory.JPG ‏57 KB

  • In numbers, can i hide rows of data in a chart and still have that data show up in my graph?

    In numbers, can i hide rows of data in a chart and still have that data show up in my graph?

    yes.
    To hide rows (or columns), select the rows (or columns), then right click in the row (or column) tab to expose the contextual menu.  Select the menu item "Hide ..."

  • How do I update Date Time Digitized to match an updated Capture Time for a DNG file?

    I am updating capture time based on GPS Time (a bit OCD, I know) but when I change Capture Time the Date Time Digitized value does not change. This in in LR 4.3 and is not affected by whether on not the Catalog is set to 'Write date or time changes into proprietary raw files'. Maybe this is a problem for DNG files only.

    GreSep wrote: I saw another LR discussion that said that with LR 4.3 updating Capture Time would also update Date Time Digitized but it does not do so for me on my DNGs (and as of last month ALL my images were converted to DNGs).
    One or two intermediate versions of LR 3 (perhaps Lr 3.6) set DateTimeDigitized when you gave the Metadata > Edit Capture Time command. But for people managing scans in which the capture time of the original image was different than the scan time, this behavior overwrote their scan times, so Adobe backed out of that change.  Before and since those versions, the Metadata > Edit Capture Time command just changes the EXIF:DateTimeOriginal and related fields in XMP and IPTC.

  • Display last 12 months data in column chart

    Hi All,
    I have one  dashbord  requirement in list box i have (example:):  "oct-11" i need to display previous 12 mnth data in column chart anybody help in excel formula how to display last 12 mnths based on list box selection.
    example:  if i select oct-11 from list box i need to display in chart like
    nov-10 dec-10 nov-10...................................oct-11
    please provide how to write in logic in excel

    Hi Shankar,
    Try this formula in excel : DATE(YEAR(A1),MONTH(A1)-1,DAY(A1))
    A1 will be your cell which is the destination of your List box. & then drag it till 12 months.
    If you are not having day from your list box then manually enter 1 in any cell and map that cell in place of A1 for day.
    HTH.
    Neeraj..

  • External XML data for more charts in a single page

    I am using a plot chart which gets data from an external XML file through <mx:HTTPService>
    I create another chart in the same page which also gets data from another XML file.
    How can i provide data to this chart through the HTTP Service ?
    - Sen

    I hope i've understood well what you want to do.
    Easily you could define 2 different httpservice with different url and bind them to chart.
    hope this help!
    bye!

  • JSObject returns wrong date. How can I extract correct date from digital signature?

    I'm trying to extract name and date from digital signatures by using JSObject in Excel VBA, but JSObject returns wrong date. Year, month, hour and minute are correct, but only day is incorrect.
    Here is my code. I'm using Acrobat 8.1.3.
    Please tell me what's wrong with this code and how I can extract correct date from digital signatures.
    Public Sub sbTest()
    Dim oApp As Acrobat.acroApp
    Dim oPDDoc As Acrobat.AcroPDDoc
    Dim jso As Object
    Dim f As Object
    Dim sig As Object
    Dim strFileName As String
    Set oApp = CreateObject("AcroExch.App")
    Set oPDDoc = CreateObject("AcroExch.PDDoc")
    strFileName = "C:\Test.pdf"
    If (oPDDoc.Open(strFileName)) Then
    Set jso = oPDDoc.GetJSObject
    Set f = jso.getField("Signature1.0")
    Set sig = f.signatureInfo()
    Debug.Print sig.Name
    Debug.Print sig.Date
    End If
    Call oPDDoc.Close
    Call oApp.Exit
    End Sub

    Hi
    You can use TDMS file format to save the data. I have attached a reference Vi.
    On button click you can log the data or remove the case structure and continuous log the complete acquisition data.
    Thanks and Regards
    Himanshu Goyal
    Thanks and Regards
    Himanshu Goyal | LabVIEW Engineer- Power System Automation
    Values that steer us ahead: Passion | Innovation | Ambition | Diligence | Teamwork
    It Only gets BETTER!!!
    Attachments:
    Data Save in File.vi ‏35 KB

  • How to extract the data from the chart. Data were not saved

    Hi everyone. Beginners question, but could not find an answer to it
    How can I get the numerical data from the chart. Chart is already on the screen and data vere not saved into file during VI run. All I have - just chart, but I need numbers       
    Thanks
    Message Edited by olka on 07-18-2007 09:41 AM

    You can still do it, the process just changes a bit...
    Copy the control to a new VI as before, and change it into a control.
    Create the diagram shown in the attached screen shot.
    Run the new VI. You will get two arrays: one of x-axis values and one of y-axis values.
    Mike...
    Message Edited by mikeporter on 07-18-2007 12:21 PM
    Certified Professional Instructor
    Certified LabVIEW Architect
    LabVIEW Champion
    "... after all, He's not a tame lion..."
    Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps
    Attachments:
    extracting xy data.JPG ‏5 KB

  • Multithrea​ding and RS232 data too slow processed

    Hello,
    Hope someone could help with this issue.  I have simple application which process ASCII data coma separated from serial port at speed of 115.2kbps. There is 6 columns  of unsigned short data .  I set-up COM call back function to receive data and I created separate thread function to plot data  on a 6 graphs - PlotWaveform() used.  Plots roll-over from beginning every time it receives more then 3000 samples. There is couple of more command buttons to set-up serial port, save data to a file, and exit application.
    What is problem?  Application runs as intended but more and more slow with each received data sample. It is visible how graph plotting slows down. Apart from this,  all command buttons do not respond on cliks. (I need to click few minutes on them to get attention.)
    Thanks
    Solved!
    Go to Solution.

    Thanks Roberto,
    a) I continiously receive RS232 data from external device without request. I install  COM callback func.
    InstallComCallback (comport, eventMask, notifyCount,eventChar, ComCallback, NULL);  where is:
    static int eventChar =13;   
    static int notifyCount =115;
    Call back functions where I process data and store them into 6 arrays of 3000 elements:
    void CVICALLBACK ComCallback(int portNo, int eventMask,void *datax);
    b)  I assume ComCallback is called every notifyCount samples.
    c)  Second thread what I installed plots only 6 received data arrays in the ComCallback(). 
    static int CVICALLBACK PlotingThreadFunc (void *functionData)
      while(1)
                      if(plotFLAG == TRUE)
                                        plotFLAG = FALSE;
                                        //Plot Array1
                                        PlotWaveform (panelHandle, PANEL_GRAPH, CapMeasureArrayData1,
                                                      ​                                          u16_DataIndexC, VAL_UNSIGNED_SHORT_INTEGER, 1.0, 0.0,
                                                      ​                                          0.0, 1.0, VAL_FAT_LINE, VAL_EMPTY_SQUARE, VAL_SOLID, 1,
                                                      ​                                          VAL_RED);
                                             to ..........
                                        //Plot Array6
                                        PlotWaveform (panelHandle, PANEL_GRAPH_CAP6,
                                                      ​                                          CapMeasureArrayData6, u16_DataIndexT,
                                                      ​                                          VAL_UNSIGNED_SHORT_INTEGER, 1.0, 0.0, 0.0, 1.0,
                                                      ​                                          VAL_FAT_LINE, VAL_EMPTY_SQUARE, VAL_SOLID, 1,
                                                      ​                                          VAL_RED);
     return 0;
    The plotFLAG is set in the ComCallback() when data is received.
    d)  I plot as above, whoole data arrays when data is received.
    e)  “Plots Roll-Over”  I meant: Plots are window into data steram and when it is plotted max. number of elements (3000) then arrays are erased and start new data plot from beginning.

  • Data movement of Chart of Account from one instance to other

    We are doing data movement of Chart of account tables(FND_FLEX tables) from one instance(oracle 10.7)to another instance(Oracle 11.0.3).
    Some of the columns of flex value tables are obsoleted in Oracle 11.0.3. like description in fnd_flex_values is obsoleted and description is used from fnd_flex_values_tl.
    My question is, Is it necessary to do the data movement of fnd_flex_values_tl table to get the description or just the data movement for fnd_flex_values table will serve the purpose.
    Thanks in advance.

    Hi
    When upgrading you need to populate both the fnd_flex_values and the fnd_flex_value_tl table. Please note applications will not function properly when you dont populate this table.
    I am not sure how you are populating this table, if using the oracle upgrade process then Oracle takes care of this else please ensure that you populate all the _tl tables
    Thanks
    Bharat

  • Date format in charts

    Hello,
    is it possible to change the date format in a chart?? Example: From 'dd.mm.YYYY' to 'dd'
    Edited by: Gerrit Lober on Jun 25, 2008 2:21 PM

    Hi
    No it is not possible to change the date format in Chart
    Bcos the chart displays the values or the date from the report.
    If you need to change the display in chart then Display in the report should be changed.
    Regards
    M.A

  • Most efficient way to constantly read, queue and parse multi-size​d RS232 data (multi-thr​eaded)

    I've tried tackling this problem a few different ways, and figured it was time to get some others' advice.  My system essentially works, although it looks like a hackjob and not entirely confident.
    My RS-232 connection has the following properties/constraints:
    -Will be getting unsolicited data at a high data rate.  (ya thats subjective, but assume near constant at whatever baud rate its set at up to 115200)
    -Different segment lengths of data receiving
    -Two stop bytes (0x10 0x03), while start byte is 0x10.  (Byte stuffing/packing implemented)
    -There is a size byte within a packet (3rd one in), however currently relying on stop bytes only.
    I have tried the ComCallback within CVI only to find that it is VERY slow at processing events compared to implementing it manually in its own thread.  In addition, it can only trigger 1 stop bit, not 2.  Triggering on size is sometimes okay, but I found that it was possible it would get triggered on only part of the data, the when its called the qlength be larger, and then sometimes I would only read part of a data packet, and half of my segment was still in the queue.  And sometimes, I would get semaphore locks and lots of waiting, and ya it was a mess (hence you will see lots of CMT locks commented out)
    I tried implementing a FIFO type queue (copied below), but I have very little experience in doing this, and may not be very efficient in the way I implemented and could definately use some advice in this area.  Also perhaps in how thread safe I have everything.
    I thought about a circular buffer, but since data can be different segment lengths, it kind of makes it difficult to cleanly wrap around and read.  I think its still possible, just may require additional checks which I haven't seen done anywhere when google searching. (and made me think a FIFO queue was better).
    So if anyone has any good suggestions or examples, that would be great.  Using Labwindows 2010.
    //in Main before GUI loaded
    programRunning = 1;
    CmtScheduleThreadPoolFunction (DEFAULT_THREAD_POOL_HANDLE, ComCallback, NULL, &funcID);
    /* Function Used to parse Com data */
    static int ComCallback (void *callbackData)
    static int bufLen = 0;
    int strLen,qLen=0;
    unsigned char tempBuf[1024];
    int packet_length = 0;
    char temp_string[250];
    unsigned char *start_ptr;
    int i;
    int start_offset;
    while(programRunning) {
    //First lets copy all data from com port to output buffer
    if( com_open) qLen = GetInQLen (comPort);
    if( qLen <= 0 ) {
    ProcessSystemEvents();
    } else {
    if( qLen > 1024) qLen = 1024-bufLen; //set max length to read
    strLen = ComRd (comPort, tempBuf, qLen);
    //CmtGetLock(lock);
    memcpy(readBuf+bufLen,tempBuf,strLen);
    bufLen += strLen;
    //CmtReleaseLock(lock);
    //Try to read until we hit stop bytes, or until we think we have at least 1 or 2 packets to process
    if(tempBuf[strLen-2] != 0x10 && tempBuf[strLen-1] != 0x03 && bufLen < 100 ) )
    goto skip;
    //ensure start pointer is at beginning command (0x10 0xAA) (in event we just started reading in middle of packet???)
    i = 0;
    while ( (readBuf[i] != 0x10) && (readBuf[i+1] != 0xAA) && (i < strLen) )
    //start_ptr++;
    i++;
    start_offset = i;
    parse_some_more:
    start_ptr = readBuf + start_offset;
    //lets try to do one packet at a time.
    for(i = start_offset; i < bufLen-start_offset-1; i++)
    if(readBuf[i] == 0x10)
    if(readBuf[i+1] == 0x03)
    i += 2;
    break;
    //trial of unpacking/unstuffing byte buffer
    else if( readBuf[i+1] == 0x10 ) //two tens in a row, remove it
    memmove( &readBuf[i],&readBuf[i+1],bufLen-i);
    bufLen--;
    //at this point, we should have a full packet. What if we don't....???
    packet_length = i - start_offset;
    //CmtGetLock(lock);
    ParseResponse(start_ptr,packet_length);
    PostPacketToOutputBuffer(start_ptr,packet_length);
    if(start_ptr[start_offset] == 0x10 && start_ptr[start_offset+1] == 0xAA )
    com_Send_Acknowledge(comPort);
    start_offset = packet_length + start_offset;
    if(start_offset < bufLen-1)
    goto parse_some_more;
    //For now, assume everything else we don't care about in buffer, however, probably shouldn't. Should it be bufLen -=start_offset; if so, need to handle partial data better; timeout??
    bufLen = 0;
    //CmtReleaseLock(lock);
    skip:
    return 0;
    Thanks!

    Hi ngay528,
    I think there is a great example for you to use that comes with CVI which can be found by clicking Find Examples on the splash screen or Help >> Find Examples in your project. From there, click into Optimizing Applications >> Multithreading. In that folder there is a project that is called BuffNoDataLoss that shows how to create a thread safe queue and setup a producer/consumer type program. In this example the data is a random sine wave but could be adapted to your RS232 data. If you have any questions concerning this example please let me know but this should be a great starting point.
    Patrick H | National Instruments | Software Engineer

  • Rs232 data input

    Hello,
    I am trying to read data into dasylab via Rs232, but I am new to dasylab and havent worked reading in rs232 data before.
    I managed to get dasylab to communicate with my device, but I am having trouble parsing the data effectively.
    In the rs 232 monitor, without sending any commands, I get a set of data in the format
    DA 0 00 20.8 21.5 0.0 0.0<CR><LF>
    I've been searching the forums and think this has a very simple solution, I'm just having trouble finding the correct command to put in the "measurement data format" box for each channel
    Thanks for the help.

    Ok, there are a couple of ways to do this
    DA 0 00 20.8 21.5 0.0 0.0<CR><LF>
    If the first three groups are constant, then use them as a search string to anchor the first data point.
    Channel 0 will be
    "DA 0 00 "a\x20
    the \x20 is the trailing space, and delimits the data point.
    Channel 1 will be
    a\x20
    If that's all you want, then the rest of the line is ignored, while it searches for the "DA 0 00 " for the next Channel 0 value.
    - cj
    Measurement Computing (MCC) has free technical support. Visit www.mccdaq.com and click on the "Support" tab for all support options, including DASYLab.

Maybe you are looking for