Draw a waveform of a string

Hi everyone, I have to draw a waverform of a string (like this: + 1.328546E-13A,-003.1000,+6.898991E-14A,-003.0000,+4.529815E-14A,-002.9000,...) and then save the data in a file.txt.

The second value(-003.1000,-003.0000,-002.9000...) must be the first one(+1.328546E-13A,+6.898991E-14A,...) the y-axis and the x-axis.

The chain just a picoammeter and I'm using a serial connection.

I work with labview to 2012.

Could someone help me?

Thank you for the help

Here is my solution maybe someone could it need

Tags: NI Software

Similar Questions

  • I want to draw a waveform where I have a constant slope (defined by me) and new data are plotted on the graph with the slope defined already in the background.

    I want my table to have a constant slope already mapped out before she continues start tracing data in real-time... so that I can compare my new data point to point with the ideal slope that I already have in the background

    Hi raza,.

    as I said: it is not a problem to have two plots on a graph. But you need to use a graphic instead of a chart!

    Like this:

    have a constant ground created before the loop and a variable field created in the loop!

  • How to draw 2 strings one after another?

    Hello

    I have this code, and I would like to know how can I draw the right of the string 's2' after the first string "s1" on this Panel, so that what is behind her while they move you?

    Also, how can I do some of the channels drawn clickable (for example links) so that when I press on them some actions are performed?

    Thank you very much.
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    
    
    public class VertMovingTextPanel extends JPanel implements ActionListener {
        
        Timer t = new Timer(5,this);
        int x = 10 , y = 0 ;
        public VertMovingTextPanel() 
        {}
        
        public void paintComponent (Graphics g){
            super.paintComponent(g);
            String s1 = "Alert number 1";
            String s2 = "Alert number 2";
            g.drawString(s1, x, y);
            //g.drawString(s2, x, y);
            t.start();
            
        }
           
        
        
        public void actionPerformed (ActionEvent e)
        {
            if (y < 0 || y > 600 )
            {
                y = 0;
            }
            y ++;
            repaint();
            
        }
        
        public static void main(String[] args) {
          JFrame frame = new JFrame("Alerts");
          VertMovingTextPanel vp = new VertMovingTextPanel();
          frame.add(vp);
          frame.setVisible(true);
          frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
          frame.setSize(600,600);
        }
    }

    Use g.getFontMetrics () .getHeight () and adapt there.

  • reading photoplethysmograph waveform with serial port on PC using Labview

    Hello world

    I'm gaining time real Photoplethysmography waveform of serial port using Labview.I have managed to acquire data from serial port by using the following features:

    -Baud rate: 38400

    -data bits: 8

    -stopbit: 1

     

    -No parity bit

    -Time delay before reading the serial port: 10 ms (according to what was written in the manual that every 10 ms there is a frame in serial port)

    After the reading string will be converted to byte array to be able to extract the bytes associated with waveform (1 & 2 bytes in a frame) even for SOP2 (6 & 7)

    (what is read in serial port is in decimal and must be converted to hexadecimal based on what made the software of prodeuct for some result.that in the waveform properties, I chose the hexadecimal representation)

    Then, as mentioned in the manual, I associate these two values to draw the waveform.

    Although I used the filter band digital waveform of pulse but not significant pass that was seen (cutofffrequeny:10 high low cut-off frequency: 0.5).

    I have attached my program and result in front of Panel and manual for the sensor. The result is still far from what is supposed to be. I was wondering if you could help me and let me know your opinion on the program and the protocol used. I have to get the result as soon as possible. Please let me know if you need more information.

    Kind regards


  • Graphical waveform reference conflict with table 2D?

    Hello world

    I have a problem (I hope so easy?) with the joint 2.vi Untiltted... I need to wire a reference (with the chart "MVC and Stim") to the Sub - VI X axis Curs table under so I get the x-axis positions the cursor over the chart MVC and Stim... When this chart is a 1 d array, it works fine (graph at the bottom should graphic data between the sliders)... But I change the MVC and graphic stem in a 2D array that draws multiple waveforms graph Ref do not connect to the Subvi?

    Any suggestions? I'm on a tight schedule, and it's killing me slowly...

    Kind regards

    Jack

    Hello

    I do not have chekced your screws I did not LabVIEW on my pc at the moment. I hope that the code is LV 2010 or below. If this isn't the case, please send the code in a version compatible with LV 2010.

    However, a few questions:

    What is your Ref entry selected to include the data type? You create the reference control once again inside your sub vi when you changed from 1 d in table 2D graphics?

    If Yes, suggest to the two qus, try removing the data type "include". This can cause problems in the future. Otherwise, you must re-create your sub vi entry ref control again.

    one way is, just transfer the reference on the front of the vi that has graphics for the sub vi, use application of the nodes to get the name of the control and the reference in the Panel, check your "MVC" and "Stim" among the control names, get the control reference. This will save you the dotted arrows.

  • How to get tilted periodic waveform in labVIEW?

    Hello

    I want to draw a waveform that has range of 0 to 360 and have a frequency of 50 Hz. the logic that I used in my code is like:

    50 HZ = 0.02 seconds.

    360/0.02 = 18000 (means multiply each sample to 18000 to get inclined wave that offers an amplitude in the range 0 to 360)

    values go from 0 to 0.02, not accurate, and I multiply each step with 18000 to get the desired line.

    1. take the current stage.

    2. If step is > 0.02

    then start from scratch

    3. other (less then or equal to 0.02 seconds, then)

    Multiply step with 18000

    but I do not get the desired response. kindly help me, I'll be very grateful to you

    Kind regards

    Brassart ahmed

    Why not use the function of the ramp signal? Check the range of signal generation.

    Also, looks like you're wanting to generate an output signal. If so, you need to put your data in the buffer and to let the jury AO manage the timing of release. Windows has too much jitter timing to do what you want.

    Mike...

  • Get string of data Variables

    Hello

    I'm post and retrieve data to an ASP page on a site.

    The data returned using the following function:

    var dataS3:String;
    function handleComplete3(event:Event):void
    {
         var loader3:URLLoader = URLLoader(event.target);
         dataS3 = loader3.data;
         trace(dataS3); 
    }
    
    

    The trace (showing the received data) looks like: score1 = 0.5244005132792953 & score2 =-0.27105341041929653

    How can I get these 2 partitions (score1 and score2), which seem to be part of a string of data, into separate variables that I can then later use as numeric values in frames (round/add/subtract/multiply/divide their)? Is there a way to analyze the 2 variables for use in mathematics from frame later? Would I declare var DataS3 differently or keep it as a string, and then somehow convert the string back to separate the numbers or integers?

    Any help appreciated.

    In general, you use objects, you can run a loop on this. You can also type cast that you do only when you must instead create a variable to use.

    Your example rewritten using a table and casting can be:

    function handleComplete3(event:Event):void

    {

    do a bunch of var = value pairs

    var urlVars:Array = String (event.target.data).split("&");)

    S5

    trace (String(urlVars[0]). Split ("=") [1]); a string of draws

    S6

    trace (String(urlVars[1]). Split ("=") [1]); a string of draws

    Now you want to conversion, just convert online numbers instead of again assign vars

    S7

    trace (Math.Round (Number (String(urlVars[0]). ((Split ("=") [1]) * 1000) / 1000); number of prints

    S8

    trace (Math.Round (Number (String(urlVars[1]). ((Split ("=") [1]) * 1000) / 1000); number of prints

    }

    The fundamental point is that you can use the data that you receive directly and unless it is in a feature called very intensively you can just multiple operations at the same time without saving changes out of additional variables.

    You are allowed to Garland and types of melting as you go. For example I have to split the string by one & ampersand into a temporary array, I did it for easier reading. To print your S7 I would have done this one line of code:

    function handleComplete3(event:Event):void

    {

    traces of your S7

    trace (Number (Math.Round (Number (String (String (Event.Target.Data). Split ("&") [0]). Split("=") [1]) * 1000) / 1000));

    }

    There is no difference between the S7 printing. You assigned a bunch of variables and set up one by one. I sank anonymously their Garland style without attributing all the variables working directly on the data. I just wanted to point the daisy chaining power of ActionScript. You can convert things as you go and condense the code and dynamic variable usage a bit.

  • ChnListBox... of another PDM file

    Hello world

    I would like to draw a waveform channel, given any string value x and value any channel there, I selected in a dialog box.

    It's pretty easy if both channels are owned by the same PDM file, as you can see in the code below (works on my computer):

    Option Explicit  ' force explicit declaration of all variables in a script.
    Dim DisplaySheet, DisplayArea, oMyCurve

    Call UserVarCompile ("WaveformPlot.VAS")
    Call SUDDlgShow ("Dlg1", "C:\Documents and Settings\All Users\Documents\National Instruments\DIAdem 11.0\Documents\WaveformPlot.SUD", NULL)

    Call View.Sheets.RemoveAll
    Dim oMySheet: Set oMySheet = View.Sheets.Add ("Sheet1")
    View.ActiveSheet.Cursor.Type = "line".
    Set DisplaySheet = View.Sheets ("sheet 1")

    Set DisplaySheet.Areas.Item = DisplayArea (1)
    DisplayArea.DisplayObjType = "CurveChart2D".
    Call View.Sheets ("sheet 1"). Areas.Item (1). DisplayObj.Curves.RemoveAll
    Set oMyCurve = DisplayArea.DisplayObj.Curves.Add (XChannel_, YChannel_)

    I created two user variables named XChannel_ and YChannel_ so that I can use in my SOUTH file.

    Everything is perfect... but I am asked to select the channels to any PDM file. The two channels selected may not belong to a same file PDM.

    I don't know how to handle that I don't think that there is a command that would allow me to use 1 channel 1 TDMS file without loading completely. Help, I have seen several methods like ChnNameGet with DataFileHeader, but none of them really treat my problem.

    I hope someone will help me.

    Thank you.

    Near Hi,.

    Let me first address the selective channel loading component of your post.  If you also want to help by the way all the information required of the SUDialog to the VBScript DIAdem, we can address that next.  For a single channel to load a data file, you must know the following information:

    Full path to the database (disk + case + name + extension)

    Name of the use to use to read this data file

    The name or Index of the channel group channel is in

    The name or Index of the string to load

    GroupRef = 'GroupName' ' OR '[1].
    ChannelRef = 'ChannelName' ' OR '[2] '.
    ChannelPath = GroupRef & "/" & ChannelRef ' ' GroupName/ChannelName' GOLD ' [1] / [2].
    Call DataFileLoadSel (DataFilePath, ChannelPath, use)

    Brad Turpin

    Tiara Product Support Engineer

    National Instruments

  • Passing an array of wave shape of the main Vi to Subvi

    I'm taking a waveform chart and have it draw accurate information and even a chart in waveform in a Subvi. For now, the waveform is getting the information of a Global DAQmx channel and information is posted on the waveform table.

    I would like to pass this information to a Subvi as well as information of a string that the user has typed information in. I want only the Subvi executing structure case if the Boolean value on the main vi it true.

    The purpose of the Subvi is automatically save (later print) the façade of the Subvi as a bmp/jpeg/png. I have attached the vi for the vi sub file and an image of the main vi. I can't give the file to the main vi.

    Image 1 is the face before of the main vi, which is the same information that I want to transfer to the Subvi. Image 2 is the block diagram of main vi with the information sent to the Subvi.

    The Subvi, I have main table of waveform and the string of the vi entry as a Boolean operator to activate control to save the cover in jpeg format.

    Now I can't get any information to be transferred to the table of waveform in the Sub - VI and I'm trying to make happen is I run some sample and when I stop my main vi waveform graph will have copied data to the Subvi and the Subvi will save the front face of the Subvi in jpeg format.

    I'm sure I'm missing something very obvious, but I was not able to understand using the forum and help of NOR.

    Any help is appreciated, thanks.

    I uh... I did a video on this subject. I hope you don't mind.

    I fall my words a little bit, you know, refer to outputs as inputs, confuse the left, right and laugh unnecessarily. But I think it does the job.

    Let me know how you go.

  • Separate byte-by-byte series chain

    Hello

    This is my first post and only started using labview yesterday please sorry if it sounds a bit stupid. I connected an arduino via labview and sent data that him and had given returned. I can get it to draw a waveform of these data a chart. However I do the arduino send data from sensor by iteration. I have 8 sensors each byte that comes through for a new sensor data will be, after the eighth sensor sensor will begin a new and repeat the process. I have need to separate this data and put it into eight different tables, but don't know how to do it correctly.

    Any help is greatly appreciated.

    Thank you

    Hi Canalian,

    convert your string of VISARead into a table of U8 and decimate this table in 8 sub-tables:

    Now you have each separated data sensors in its own table and you can do with it what you want.

    Well, you can also use StringSubset to obtain each byte because it's clean...

  • Trace the signal with little data

    Hello everyone,

    I have the problem of tracking. I would draw a signal I have greated. I store the profile of signals in a table and this table I want to give with "draw the waveform. The problem now is that my signal may have a minimum of 4 values. The function of "Draw the waveform" plots each position of the table in the graph. With 4 values, the result is a triangle signal but it is false, that the signal should be like a rectangle (signal Wave Drive). There is no action between that. I have the oscilloscope the correct signal with only values in the table.

    In the 1 following you can see the result. The signal has an offset of 5 V, just FYI. The signal should be the signal in the following 2 (orange).

    Hope someone can help me.

    Best regards

    Probably a trace type thin step in PlotWaveform will do what you want.

    You can experiment with styles of different path for example native of race graphs.prj: you can locate with finder example or simply search in the \userint folder.

  • Two timed in a single parcel sine signals

    Hello

    I enclose my VI, and I need help to draw the waveform.

    Each symbol (0 or 1) have different frequencies. I would like to draw each signal one after another. (like a waveform of the FSK)

    I am trying to build my own FSK.

    So far, each signal is display one then the other.

    Thank you

    Hit Ratatouille,

    The display of graphics for one signal after another, click with the right button on the graphic on the front and replace it with a graph in the form of wave. I think that this action has resolved the problem you mentioned. The functional difference between a waveform graph and a waveform chart is the way are handled the x-axis. For the chart, the x-axis is in real time, while for the chart, the values of x are an entry. In your case, the generation of sinuses makes the sine waves, but each generation has the same values, X, so the best you could do would be to overlap.

    Hope this helps,

    Luke W

  • Problem graphic refresh with multiple locations

    Scenario:
    Draw two waveforms periodically to a chart (FMEM table for each iteration). Use the scope mode or scanning. Band mode seems to work a little better.

    Questions:
    * If a plot in a wfm-array is empty for an update, another plot will not redraw properly. It will redraw when the second parcel was given, but the first plot will be badly drawn parts data points will be absent.

    * Scan mode leave many red lines and erase some data that's in the way.

    Please take a look at the VI attached to see the (dare I call it bug) in action. If you have any ideas, please share.

    I managed to find a partial solution to this problem, but the behavior seems weird and bug - like sweep mode always looks very bad.

    Background:
    I wanted to use graphics to create the best way to display the data, since I need to display several plots with high frequencies was updated, but the variable sampling rates. Before tracing data, it is already decimated so I only to draw as many points as I have available pixels.

    Solutions of circumvention attempts:
    * ForceRedraw: Do nothing. I use it wrong?

    * Reporter FP: Does nothing.

    To remove the empty FMEM at the end of the array of wfm (for an update/iteration):
    -draws first properly draw
    -don't pull on the second plot line
    -If the window is resized, the data is deleted, only the last part of the plot is visible. Looks like previous plot data are "forgotten".
    -Automatic scale will not work. It will be autoscales on the final section of data.

    * Increase the length of history: does nothing.

    * Put a flag in front of the chart: live to be redraw until the window is resized. Update graph becomes very slow. The X-scale will go berserk. I used that thing once on an indicator of flickering text and placed an invisible object in front of it, which has contributed to this situation.

    * Resize the window: works! Not a very practical solution. Scan even seems ok.

    * Use XY-graph: my goal was to make the most efficient way to display data with relatively high update rates. I used a XY, but when I got a little bit of these graphs, the cpu load was very high and I checked it was the actual writing to the graphical indicator that took all the cpu. I tried the update less often and I already decimated data before sending it to the curve, but the cpu was still too high. Replace with the graphic work like a miracle with almost no cpu load

    * If a wfm is empty for an iteration, draw the last trace point once again, but with a very small time-offset positive (I think it didn't work well plot with new): graph redraws ok in reach mode but not in scan mode. But if I draw again and again this last point, the other plot will finally cause the x-scale to autoset and I will need to keep track of the scale and not re - plot this point only if it is out of scale-x. It starts to get difficult here and I have not solved all the problems that may arise here yet, but it is of the workaround I use now. And for the graphics, I did find a way to disable this automatic update of the scale (is there a way?).

    I did and VI test to test these issues (attached), where the different workarounds may be tested by activating different buttons. Run it just in the default to run without active workarounds and it should show the issue of discounting very clearly. I tested it on 2 PC and LabVIEW 2013, 2012, 2010 and 8.6.

    This has been touted as the CAR 455443.

    Kind regards

    Jeff Peacock

    Product Support Engineer | LabVIEW R & D | National Instruments

  • 2 compliment field

    Hi guys,.

    I have a vi that me I32 gives 1 D data table (Long integer)... I want to take the two compliment it and draw a waveform.

    If someone needs my VI do not hesitate to find it in the attachment.

    Grateful to all those who have helped me get to this point.


  • filtering/interpolation or smoothing a 3D Board

    Hello

    I have attached a VI whereby it accepts a text file with 3 columns of data. An example of text file is attached.

    I was able to draw the waveform of 3 plots, but I would like to make a few high-pass filtering before posting. If I want a 2nd order high pass filter (fc = 0.5). I found the express filter vi but vi becomes broken once I have set. I think its something to do with the difference in size of table

    And I join in the Downsample as well data until it is has too much data (~ 5000 lines) filtering. Ideally, I wish I had I could have 1 rank for all of the 2 rows of data in column 3. or 1 of 3 lines. How can I do this?

    Thank you

    BP

    1. use the Index table to separate the data in each column.

    2. enter data in each column is to build waving. Don't forget to enter dt (time between samples).

    2. use build array to merge the signals and input to the filter function.

Maybe you are looking for