Arduino Forum

Using Arduino => Interfacing w/ Software on the Computer => Topic started by: brijesh on Apr 19, 2011, 05:17 am

Title: Real Time Plotting Tool ( Oscilloscope )
Post by: brijesh on Apr 19, 2011, 05:17 am
Hello All,

In my projects I needed a simple tool that could plot real time data from a microcontroller. There was no such tool available out there. There are various scripts using Processing and Python that can be used to plot the data, but nothing that is simple, easy to use and ready out of the box.

So I ended up writing a tool to plot real time data for my Quadrotor project. I thought others also may find it useful hence the birth of generic plotting tool

SimPlot
Currently has following features


Video of the tool in action: http://youtu.be/a9lTem0GWe0 (http://youtu.be/a9lTem0GWe0)

Webpage with more information http://www.negtronics.com/simplot (http://www.negtronics.com/simplot)

Project page with source code http://code.google.com/p/projectsimplot/ (http://code.google.com/p/projectsimplot/)

Arduino Code samples: http://www.negtronics.com/simplot/simplot-code-samples (http://www.negtronics.com/simplot/simplot-code-samples)

Download it from http://code.google.com/p/projectsimplot/downloads/list (http://code.google.com/p/projectsimplot/downloads/list)

Here is an example sketch that was used to generate 4 sine/cosine waveforms that are plotted on the figure above.

Code: [Select]
/*

SimPlot Demo Arduino Sketch.
Generates and sends out 4 channels of data to be plotted using SimPlot.

*/
void setup()
{
 Serial.begin(57600);
 
}

int buffer[20];
float deltaAngle = 3.14/51; //Arbitrary angle increment size
float angle = 0;
int amplitude = 100;

void loop()
{

 int data1;
 int data2;
 int data3;
 int data4;
 
 //Generating data that will be plotted
 data1 = amplitude * sin(angle);
 data2 = amplitude * cos(angle);
 
 data3 = (amplitude/2) * sin(angle);
 data4 = (amplitude/2) * cos(angle);
 
 angle = angle + deltaAngle;
 
 plot(data1,data2,data3,data4);
 
 delay(100); //Need some delay else the program gets swamped with data
 
}

void plot(int data1, int data2, int data3, int data4)
{
 int pktSize;
 
 buffer[0] = 0xCDAB;             //SimPlot packet header. Indicates start of data packet
 buffer[1] = 4*sizeof(int);      //Size of data in bytes. Does not include the header and size fields
 buffer[2] = data1;
 buffer[3] = data2;
 buffer[4] = data3;
 buffer[5] = data4;
   
 pktSize = 2 + 2 + (4*sizeof(int)); //Header bytes + size field bytes + data
 
 //IMPORTANT: Change to serial port that is connected to PC
 Serial.write((uint8_t * )buffer, pktSize);
}
Title: Re: Real Time Plotting Tool ( Oscilloscope )
Post by: brijesh on May 03, 2011, 06:48 am
New Version: 1.1
Date: July 22th 2011
Notes:
1) Can change X axis length.
2) Can change Y axis min and max values.
3) Change the channel legends.
4) Enable or disable individual channels.
5) New version number scheme with only 2 fields x.x

New Version: 1.0.8
Date: May 29th 2011
Notes:
1) Fixed a bug which caused the program to crash on startup when there were no serial ports (Ardunio board not connected).
2) Changed version number from x.x.x.x to x.x.x

New Version: 1.0.0.7
Date: May 3rd 2011
Notes:
1) Fixed bug in Y axis autoscale feature.
2) Displaying program version info in the status bar.
Title: Re: Real Time Plotting Tool ( Oscilloscope )
Post by: emmak on May 26, 2011, 12:27 pm
Hei, thanks for this post. I am working on something similar to what you have done here, I need to read some data from arduino board via serial port and plot the data as a real time graph. Can you please put me through how to use this SimPlot? I download it already but could not run the executable file. Thanks.
Title: Re: Real Time Plotting Tool ( Oscilloscope )
Post by: robtillaart on May 26, 2011, 03:14 pm
Can you post some (prelim) screenshots?
Title: Re: Real Time Plotting Tool ( Oscilloscope )
Post by: brijesh on May 26, 2011, 03:15 pm
Emmak,
Can you give more information. What happened when you tried to run the executable? What kind of error messages did you get, if any?
What operating system are you running it on? What version of the .Net framework do you have?

Rob,
Are you asking for a screenshot from me or Emmak?



Title: Re: Real Time Plotting Tool ( Oscilloscope )
Post by: brijesh on May 30, 2011, 05:49 am
New release of the tool. Found and fixed a bug. The program would crash on startup (never start) if there were no serial ports in the computer. This would happen if you have not plugged in the Arduino board before you run the program. My computer has a serial port on the motherboard, so I never saw this issue. Thanks to EmmaK that I found the bug.

New webpage with more information: http://www.negtronics.com/simplot (http://www.negtronics.com/simplot)

Arduino Code samples: http://www.negtronics.com/simplot/simplot-code-samples (http://www.negtronics.com/simplot/simplot-code-samples)

Created a video to show SimPlot in operation: http://youtu.be/a9lTem0GWe0 (http://youtu.be/a9lTem0GWe0)

Looking for suggestions to impove the tool and add more features. For the next release I am debating about these features, not sure if they are useful. What do you guys think?

1) Remove Y axis auto scale feature and provide a way for user to set the range.
2) Provide feature to change X axis range.
3) Inculde Serial Monitor functionality in the text window.
4) Add more channels?

Title: Re: Real Time Plotting Tool ( Oscilloscope )
Post by: robtillaart on May 30, 2011, 08:56 am

Not checked the tool yet ...

- For analog signals I would like to have a running average line. This can be based on a (configurable) number of samples or the samples in the last second/minute/...

- It would be great to have an X-Y plot -> analog1 on X and analog2 on Y 

- Baudrates of 230400 and 345600,
Although the Serial Monitor of the IDE don't support these baudrates, the Arduino - 2009/UNO - do. I've used them for few weeks now without a problem. The highest rate without a problem was 500.000 baud with putty.exe but that is a non standard rate. Maybe I want the free baudrate like in putty.exe so I can go to the limit (own risk of course)

- plot signal through some function
e.g. I have an analog signal 0..1024 and I want to map that on temperature through some function e.g. a temperature function
float T(int s)
{
  return -50 + s/4.0;
}
The scale should be temperature degrees Celsius of course

my 2 cents for now
Rob
Title: Re: Real Time Plotting Tool ( Oscilloscope )
Post by: brijesh on Jun 03, 2011, 04:23 am
Hello Rob,

Thanks for your input.

- For analog signals I would like to have a running average line. This can be based on a (configurable) number of samples or the samples in the last second/minute/...
Nice idea, it is added to the list of things to be done.

- It would be great to have an X-Y plot -> analog1 on X and analog2 on Y
This one is more difficult to implement. Not so sure where it would used.

- Baudrates of 230400 and 345600,
Although the Serial Monitor of the IDE don't support these baudrates, the Arduino - 2009/UNO - do. I've used them for few weeks now without a problem. The highest rate without a problem was 500.000 baud with putty.exe but that is a non standard rate. Maybe I want the free baudrate like in putty.exe so I can go to the limit (own risk of course)

Added to list of things to be done.


- plot signal through some function
e.g. I have an analog signal 0..1024 and I want to map that on temperature through some function e.g. a temperature function
float T(int s)
{
  return -50 + s/4.0;
}
The scale should be temperature degrees Celsius of course

This is far more difficult to implement. I can implement a single operation. To implment multiple operation like you have (one addition and one division) requires me to write a mathmatical expression parser (not sure if that is right term). Way beyond my programming skills, by the way I am not a programmer by profession. :-)

On a side note, is anyone having problems installing the tool? Did anyone try to install on a machine that did not have .NET framework already installed? I am total newbie to this whole GUI programming and .NET stuff so got no idea what will happen if someone does that.

Title: Re: Real Time Plotting Tool ( Oscilloscope )
Post by: robtillaart on Jun 03, 2011, 08:55 am
Hi Brijesh,
Quote

- It would be great to have an X-Y plot -> analog1 on X and analog2 on Y
This one is more difficult to implement. Not so sure where it would used.

It would allow to have two related sensors in one plot, e.g. temperature versus humidity (greenery?) -  heigth versus pressure (up in the air or under water)  - length vs force  - speed vs voltage (testing a generator) -


Quote

- plot signal through some function
e.g. I have an analog signal 0..1024 and I want to map that on temperature through some function e.g. a temperature function
float T(int s)
{
  return -50 + s/4.0;
}
The scale should be temperature degrees Celsius of course

This is far more difficult to implement. I can implement a single operation. To implment multiple operation like you have (one addition and one division) requires me to write a mathmatical expression parser (not sure if that is right term). Way beyond my programming skills, by the way I am not a programmer by profession. :-)

I know it is a very difficult one but it would give the screenshots a "real world meaning"

google - math parser C# - and you will find free to use classes like
- http://muparser.sourceforge.net/
- http://www.codeproject.com/KB/cs/MathParser.aspx -
- http://www.c-sharpcorner.com/uploadfile/patricklundin/mathexpparser12062005062213am/mathexpparser.aspx -

Still not trivial
Title: Re: Real Time Plotting Tool ( Oscilloscope )
Post by: Enn40 on Jun 05, 2011, 09:07 am
Hi,
Its nice lightweight program.

I´d like to see:

1) Remove Y axis auto scale feature and provide a way for user to set the range.
2) Provide feature to change X axis range.

E
Title: Re: Real Time Plotting Tool ( Oscilloscope )
Post by: brijesh on Jun 11, 2011, 02:07 am
Rob,

I agree about XY plots, I will look into what it takes to support multiplie kinds of plots.

Enn40,

Thanks for the suggestions, I will add both those features in the comming releases.


Title: Re: Real Time Plotting Tool ( Oscilloscope )
Post by: doumdi on Jun 16, 2011, 08:06 pm
Please have a look at this and tell me what you think :

http://arduino.cc/forum/index.php/topic,64175.0.html (http://arduino.cc/forum/index.php/topic,64175.0.html)

Dominic
Title: Re: Real Time Plotting Tool ( Oscilloscope )
Post by: brijesh on Jun 16, 2011, 10:57 pm
Hello Dominic,

It looks like a feature rich system. It has support of multiple devices on the bus, local variable plotting, ADC data plotting etc.

The common thing I can see with SimPlot is that both can plot data. I am trying to keep SimPlot, well simple and easy to use.

It would help the Arduino users if you mention how the tool is useful and what are its use cases. I mean explain features other than plotting analog data. It might not be evident to many people from reading the initial post.

Cheers and good luck.
Title: Re: Real Time Plotting Tool ( Oscilloscope )
Post by: doumdi on Jun 20, 2011, 02:58 pm
Hello Brijesh,

Thanks for the comment. I have added information on my original post so it explains a little bit more what is the NetworkViewer.

http://arduino.cc/forum/index.php/topic,64175.0.html (http://arduino.cc/forum/index.php/topic,64175.0.html)

Regards,

Dominic
Title: Re: Real Time Plotting Tool ( Oscilloscope )
Post by: brijesh on Jul 23, 2011, 01:37 am
Hello All,

There is new version of the tool, Version 1.1
I have discarded the .net version notation which uses 4 fields, ie x.x.x.x and chose to go with simpler notation with only 2 fields.

New features
1) Can change X axis length.
2) Can change Y axis min and max values.
3) Change the channel legends.
4) Enable or disable individual channels.

Rob, I tried to implement averaging and X-Y plots, but ran into some issues. You will see that there is empty column in plotsetup window where the average values was supposed to go.

Bug reports, suggestions and comments are much appreciated.

Thanks



Title: Re: Real Time Plotting Tool ( Oscilloscope )
Post by: sbsscooter on Sep 13, 2011, 10:15 am
as i type this out i realise it's most probably a massive noob question , but i still hope u can help im running and Arduino UNO and im trying to run your sample code for four analogue outputs to sim plot . im confused about where i get the imformation to fill out this line in your code ??

im using com port 10 if that help's any help would be great

Code: [Select]

//IMPORTANT: Change to serial port that is connected to PC
  Serial.write((uint8_t *10 )buffer, pktSize);
Title: Re: Real Time Plotting Tool ( Oscilloscope )
Post by: brijesh on Sep 13, 2011, 04:55 pm
Hello,

If you have connected the Uno to PC with USB connection that you used to download the sketch, then you don't have to change anything in the sketch. Other Arduino models have more than one serial port and if someone has done something fancy then they need to change the code in the sketch.

COM Port 10 is port number on the PC side. Chose Com Port 10 in the drop down box in SimPlot.

You don't need to make any changes to code in sketch.

brijesh
Title: Re: Real Time Plotting Tool (Excel )
Post by: fazal_74 on Sep 14, 2011, 05:21 pm
hello all.
My question is how to get real time data from arduino board to computer and then to Excel for further operation like ploting graphs... etc
Can some one tell me about PLX DAQ of arduino. Is this use for the same purpose as i describe above?
thanks
regards.
Title: Re: Real Time Plotting Tool ( Oscilloscope )
Post by: brijesh on Sep 14, 2011, 06:03 pm
Hello Fazal,

SimPlot can be used to observe real time plots. Currently it does not have feature to log data for further processing. I am in the process of adding that feature.

PLX DAQ does seem to have all the features you are looking for. You would have to figure out the protocol and use it.
Title: Re: Real Time Plotting Tool ( Oscilloscope )
Post by: brijesh on Sep 16, 2011, 05:40 pm
It has been brought to my attention that download link is not working. There appears to be a problem with Google project hosting. Other
projects have also reported this problem.

Here link to thread discussing the issue
http://groups.google.com/group/google-code-hosting/browse_thread/thread/c0bee98d79267240 (http://groups.google.com/group/google-code-hosting/browse_thread/thread/c0bee98d79267240)

Apparently there is a error in the file url address being generated.

Meanwhile here is edited direct download link
http://pushpak.googlecode.com/files/SimPlot%20Ver1-1.zip (http://pushpak.googlecode.com/files/SimPlot%20Ver1-1.zip)

Lets hope they fix it soon.

Cheers
Title: Re: Real Time Plotting Tool ( Oscilloscope )
Post by: graynomad on Sep 26, 2011, 01:57 am
Hi Brijesh,

Is Simplot still written in .NET?

______
Rob
Title: Re: Real Time Plotting Tool ( Oscilloscope )
Post by: brijesh on Sep 26, 2011, 02:07 am
Hello Rob,

Yes SimPlot is still written in .Net. I used Visual Basic, thinking that it would be easier for others to modify and contribute.
I just created a project for SimPlot and hosted it on google code. Here is the link.

http://code.google.com/p/projectsimplot/ (http://code.google.com/p/projectsimplot/)

Brijesh
Title: Re: Real Time Plotting Tool ( Oscilloscope )
Post by: graynomad on Sep 26, 2011, 02:37 am
OK, I've been looking around for a base to start with a GUI for a debugger I'm designing.

http://arduino.cc/forum/index.php/topic,72014.0.html (http://arduino.cc/forum/index.php/topic,72014.0.html)

I'm semi-familiar with .NET and that was my initial preference but I would rather have something that's cross-platform and your post led me to NetworkViewer which is written in QT. I have .NET so might download QT and play with that for a while as well.

Truth is I don;t know where I'll get the time, it will be a big enough job doing the sharp end let alone the GUI as well.

______
Rob
Title: Re: Real Time Plotting Tool ( Oscilloscope )
Post by: reflexsa on Oct 21, 2011, 11:11 am
Hi,

I can't seem to get the SimPlot to actually plot something.
I tried loading both your arduino examples onto my Uno and neither of which display anything in SimPlot.
It would appears that it is opening the COM port but then after that there is not communication judging by the leds on my arduino board.
If I tried to connect to it via hyperterminal while SimPlot is connected then it tell me the port is in use basically. So I know if is connecting.
If I do connect to it in hyperterminal it sends out a whole bunch of data.
I'm hoping I'm not overlooking something simple here but there isn't all that many buttons to press.

Is the visual basic project available to the public?

Please see the screenshot below of the blank SimPlot.
(http://img94.imageshack.us/img94/5408/oscillo.jpg)
Title: Re: Real Time Plotting Tool ( Oscilloscope )
Post by: reflexsa on Oct 21, 2011, 12:31 pm
Ah. Pressing the reset button on the Arduino fixed it...
Title: Re: Real Time Plotting Tool ( Oscilloscope )
Post by: Nor1 on Nov 02, 2011, 08:38 am
Hi.
I got the same problem, no curve, reset cards did not help.

Tried and end Simplot, then start up the serial monitor (in Arduino software)
The serial monitor is built up a string that looks like this

üìÿíüàü¤ù¡ü¥ü¥ü ü ø¡øàøàøàôà

Which I assume means that the data it receives from the program in Arduino.
Closes the serial monitor, restart Simplot, but no curve.
Both Simplot and serial montitor acts as connected port 18

What might have gone wrong here?

Thank you in advance
Title: Re: Real Time Plotting Tool ( Oscilloscope )
Post by: Tomtomtom on Dec 01, 2011, 08:39 am
Hello Nor1,
I was having similar symptoms: SimPlot would seem to make a connection to the appropriate COM port, but no data would be plotted.  I think this means that the program does not recognize the data in that port.  Perhaps it does not have the right packet structure.

For me, eventually I found that swapping the order of the bytes within the 16-bit word made the difference.  I am using my own board, not Arduino.  I am not sure how the Arduino boards send data through the serial port.  For me sending out 0xCDAB, 0x0002, 0x01FF (header, packet size, data) did not work, I had to send 0xABCD, 0x0200, 0xFF01.  Attached is a screenshot of the data coming out the serial port as displayed in RealTerm.

(http://www.freeimagehosting.net/t/aa1c8.gif) (http://www.freeimagehosting.net/aa1c8)

http://www.freeimagehosting.net/aa1c8

I wonder if you are having a similar problem.  Good luck.

Brijesh,
Thank you for sharing such a useful program.  It is quite helpful.

Tom
Title: Re: Real Time Plotting Tool ( Oscilloscope )
Post by: brijesh on Jan 05, 2012, 12:32 am
ooh crap, :0
sorry for not responding to recent posts. I was relying on email notifications for any activity on this thread and for some reason I have stopped getting those notifications and I assumed there was no activity. Plus I recently relocated due to a new job so was kind of busy. I hope you guys have figured out what the issue was, I will look into it further tonight. I have couple of updates for the software, added file logging capability. Will be releasing the update soon.

Thanks for your patience and Happy New Year.  :)
Title: Re: Real Time Plotting Tool ( Oscilloscope )
Post by: Prochot on Aug 15, 2012, 10:55 pm
I'm interested in using the SimPlot software with an RS232 connected laser displacement sensor (Acuity AR600). The software will connect and scroll realtime data in the watch window, but nothing displays in the plot window. I suspect that the data format is incorrect. I believe the incoming data from the sensor is an ascii string representing a floating point value from 0.0000 to 2.0000.

Can someone tell me how to translate this data stream into something that SimPlot can understand?
Title: Re: Real Time Plotting Tool ( Oscilloscope )
Post by: brijesh on Aug 16, 2012, 06:16 am
First an update. New version of Simplot is now available (Ver 1.2). Simplot has built Arduino "monitor" functionality. Now you can plot data and also print debug messages.

@prochot
Looks like you have directly connected the sensor of PC uart. Looks like output of the sensor is in ASCII format and what is what you are seeing in Simplot terminal window (monitor window).

Do plot the sensor values you have to send the data in particular format. The required data format is explained on website under the section "The How"
http://www.negtronics.com/simplot (http://www.negtronics.com/simplot)

You will also fine example code for Ardunio format. To make this work you will have to connect the sensor to microcontroller get the sensor data, convert from ASCII to binary data, format the data in to packet and send it to be plotted to Simplot.

Cheers
Title: Re: Real Time Plotting Tool ( Oscilloscope )
Post by: Jantje on Sep 21, 2012, 12:45 am
Brijesh
This SimPlot looks interesting to me.
Is there a reason why there are only 4 channels? I mean my mega has 50+ pins. So 4 is a little little.
Best regards
Jantje
Title: Re: Real Time Plotting Tool ( Oscilloscope )
Post by: brijesh on Sep 21, 2012, 08:23 am

Is there a reason why there are only 4 channels? I mean my mega has 50+ pins. So 4 is a little little.

SimPlot was intended to be similar to Oscilloscope than a Logic Analyzer. The 50 pins on mega are all digital pins and plotting the state of those pins is functionality of Logic analyzer. SimPlot is intended to plot analog values like output of sensors sampled by ADC, or values of internal variables etc.

That being said, it looks like there is interest for more number of channels. I will put in my to do list and increase the number of channels to 8. If there is interest in Logic analyzer capability I will look into adding that as well. Not sure how much interest is there.

Cheers
Title: Re: Real Time Plotting Tool ( Oscilloscope )
Post by: Jantje on Sep 21, 2012, 11:13 pm
Thanks for the positive response.
I referred to the 50 pins of the mega because in practice you need to do some calculations to decide whether you turn the pin on or of.
Simplifying you could say that each pin has some integer value that will put the pin high or low. When you read the pin itself you do not know the integer value.
With your scope it is possible to know the calculation steps. And then 4 is kind of limiting.
For instance currently I have a buggy project that reads 2 potmeters and a distance sensor and a light dependent resistor to decide to activate a motor.
That is already 4 scopes for the inputs. If I also want some inbetween values (or the motor speed) I need to drop a scope line.
Anyways I'll instal the tool now and do some tests tomorrow.
Best regards
Jantje
Title: Re: Real Time Plotting Tool ( Oscilloscope )
Post by: Jantje on Sep 22, 2012, 12:18 am
Wauw
That was quick.
It works like a charm. To bad it is written in .net. Otherwise I would add the additional channels myself.
Great work.

Best regards
Jantje
Title: Re: Real Time Plotting Tool ( Oscilloscope )
Post by: Jantje on Sep 22, 2012, 02:26 pm
I must say I'm really impressed with the effectiveness of this functionality.
Using your tool I succeeded in fixing several bugs in my software which could have cost me several hours to find and fix without it.
Basically I saw that the scrolling halted for a while indicating a "extra delay". Because of the other channels it was easy for me to locate the delay.
I also saw the wrong line moving when I changed something; indicating reading the wrong pins.
And I saw the lines being stable meaning that the analog reads are reliable even when my motor is running. Increasing my thrust in the hardware.

In short: You have made a great tool which allows fast (quickly installed and very basic code changes) and appropriate action.

Thanks a lot

Jantje

Title: Re: Real Time Plotting Tool ( Oscilloscope )
Post by: RjPrimer on Sep 24, 2012, 06:30 am
I'm getting values displayed in my serial monitor, now  I want it to be printed in the interface of my VB specifically in my Richtext
Code: [Select]

     Private Sub DisplayCharacter(ByVal displayChar As String)
        RichTextBox1.Text = displayChar
    End Sub

    Private Sub SerialPort1_DataReceived(ByVal sender As Object, ByVal e As System.IO.Ports.SerialDataReceivedEventArgs)
        Dim RxData As String
        System.Threading.Thread.Sleep(300)
        RxData = SerialPort1.ReadExisting()
        RichTextBox1.Invoke(New DisplayDelegate(AddressOf DisplayCharacter), New Object() {RxData})
    End Sub


But it wont display :c
Title: Re: Real Time Plotting Tool ( Oscilloscope )
Post by: PaulS on Sep 24, 2012, 11:04 am
Quote
But it wont display

Are you sure that the method is even called?

If it is, why are you sleeping in the serial data callback? Doing so makes no sense.
Title: Re: Real Time Plotting Tool ( Oscilloscope )
Post by: pdasilva18 on Oct 05, 2012, 04:24 am
Is the VB source code available for SimPlot. I might like to modify. Will share any changes...
Title: Re: Real Time Plotting Tool ( Oscilloscope )
Post by: RjPrimer on Oct 06, 2012, 01:00 pm
How am i gonna re scale the plot for the Square Wave?
Title: Re: Real Time Plotting Tool ( Oscilloscope )
Post by: roweboat on Nov 09, 2012, 09:19 am
Awesome work! We have been working on something very similar called MegunoLink. Does a similar job of monitoring and plotting arduino data. Can also log data and use it to upload hex files. Check it out at http://www.MegunoLink.com (http://www.MegunoLink.com) would love to hear any feature suggestions.
Title: Re: Real Time Plotting Tool ( Oscilloscope )
Post by: brijesh on Jan 24, 2013, 07:12 am

In short: You have made a great tool which allows fast (quickly installed and very basic code changes) and appropriate action.

Thanks a lot


Glad you found the tool useful. Sorry for late reply. I am having difficulty with new reply notifications. For some reason the message board does not send me notifications all the time.
Title: Re: Real Time Plotting Tool ( Oscilloscope )
Post by: apiet107 on Feb 11, 2013, 10:16 pm
I am only sending 1 string of data -- I have the baud rate configured correctly but I am just getting the same character printed over and over again. Did not modify your code in anyway. Screenshot is attached.

Any help would be appreciated.
Title: Re: Real Time Plotting Tool ( Oscilloscope )
Post by: brijesh on Feb 12, 2013, 04:35 am
apiet,

You should send data in a proper packet, which has header and size. If you send any data without a packet then it just prints it to text area. This feature is there so that you can print helpful debug and other messages as well as plot data.

Please read the description of packet on the website and use the library that I have provided.

cheers
Title: Re: Real Time Plotting Tool ( Oscilloscope )
Post by: sriramv on Oct 16, 2013, 02:12 pm
Thank You, everybody on this forum! This kind of acted as an unofficial datasheet!  :)

Works great with PSoC too!  ]:D

Data packet (FOR SINGLE CHANNEL) from the PSoc should be sent as

(0xAB, 0xCD, 0x02, 0x00, DATA LSB, DATA MSB).


Title: Re: Real Time Plotting Tool ( Oscilloscope )
Post by: RoseOn92 on Dec 04, 2013, 02:52 pm
Thank you for developing such a great tool.  :)
I have a question. Is it possible to plot float type data instead of integer?
As I tried to monitor a float type data (which is around 0.14-0.20) but Simplot kept on showing 0 which makes sense since it is integer type. Anyway I can tweak around to display a float type data?

Thanks in advance.
Title: Re: Real Time Plotting Tool ( Oscilloscope )
Post by: Jantje on Dec 04, 2013, 05:42 pm

Thank you for developing such a great tool.  :)
I have a question. Is it possible to plot float type data instead of integer?
As I tried to monitor a float type data (which is around 0.14-0.20) but Simplot kept on showing 0 which makes sense since it is integer type. Anyway I can tweak around to display a float type data?

Thanks in advance.

Just multiply your value with 1000
Jantje
Title: Re: Real Time Plotting Tool ( Oscilloscope )
Post by: sebnil on Dec 09, 2013, 01:09 am
Well done! I got some inspiration from your software when I made my own realtime plotter. I needed some other features and multiplatform support though. The video below demonstrates typical use of my realtime plotter:
http://www.youtube.com/watch?v=WN2oXuavrWk (http://www.youtube.com/watch?v=WN2oXuavrWk)

(http://sebastiannilsson.com/wp-content/uploads/2013/12/RealtimePlotterProcessing-300x216.png)
Some features:
Title: Re: Real Time Plotting Tool ( Oscilloscope )
Post by: RoseOn92 on Dec 13, 2013, 08:17 am

Just multiply your value with 1000
Jantje



Taken your advice before things get complicated for me. Thank you.

Anyway I have another question, anyone know how can I log the data output from SimPlot or more specifically the serial monitor? I've tried a couple of methods found from Google, but its either I use their programs to log the data or I display the plot using SimPlot. I can't do both as the serial port cannot be opened by two programs at the same time. If you guys have a suggestion, I will be very pleased to listen to that.

Thank you in advance.
Title: Re: Real Time Plotting Tool ( Oscilloscope )
Post by: Jantje on Dec 13, 2013, 12:05 pm
Arduino eclipse V2 latest version (you need the nightly build) has a serial monitor and a scope using the same way of working as simplot.
You can not save the simplot data (it is send in binary form and can be filtered from the scope but it is not available in processable data) but you can have the monitor data and the plot (use your os to make a screen shot)
Use drag with left and right mouse to change the Y scale and x axes location. (only up down is supported left right is ignored)
To download I would advice to use the product. You can download it from here http://eclipse.baeyens.it/download.php (http://eclipse.baeyens.it/download.php)
Do not forget to configure if you want to build and upload (not needed to use scope and monitor)  point 4 of http://www.eclipse.baeyens.it/Install.html (http://www.eclipse.baeyens.it/Install.html)
Best regards
Jantje
Title: Re: Real Time Plotting Tool ( Oscilloscope )
Post by: acboother on Dec 16, 2013, 11:09 am
I got inspired too :)

http://forum.arduino.cc/index.php?topic=185740.0

where you can find some info about what I'm playing with
Title: Re: Real Time Plotting Tool ( Oscilloscope )
Post by: timwrinch on Feb 13, 2014, 12:10 pm
Hi Brijesh,

I'm completely new to all this Arduino stuff, but just had a go at using your Simplot code in order to plot the data from just 1 axis of a 3 axis analog accelerometer. I'm currently receiving the data wireless via Series 1 xbees and then using Serial.read to view the data in the serial monitor. How do I assign this data to on of the Simplot data channels?

2nd point, when I go to verify the code I receive the error 'buffer was not declared in this scope' referring to where the data packets are defined.

Please help!
Title: Re: Real Time Plotting Tool ( Oscilloscope )
Post by: rlogiacco on Apr 14, 2014, 08:25 pm
The SImPlot windows application doesn't seem to work properly with Leonardo and Micro as these two wait for serial reset before pushing data onto the USB line. This issue doesn't affect the Arduino Eclipse Plugin as you can reset the serial line from the UI.

The application requires the addition of a button to send the serial line reset.

@Jantie this feature of the Arduino Eclipse Plugin needs some improvements I believe.
Title: Re: Real Time Plotting Tool ( Oscilloscope )
Post by: Jantje on Apr 14, 2014, 10:06 pm

@Jantie this feature of the Arduino Eclipse Plugin needs some improvements I believe.

@rlogiacco
Feel free to suggest changes at github https://github.com/jantje/arduino-eclipse-plugin/issues?direction=desc&sort=updated&state=open (https://github.com/jantje/arduino-eclipse-plugin/issues?direction=desc&sort=updated&state=open)
Best regards
Jantje
Title: Re: Real Time Plotting Tool ( Oscilloscope )
Post by: OliveMarie on Nov 30, 2014, 06:21 am
Hey there!

I just wanted to tell you how EXTREMELY extremely wildly grateful I am to you for developing this and not charging me money for it.

I am junior in mechanical engineering...and for my junior design project we have to design a system that does X,Y, and Z in an automated fashion via an arduino. I am not familiar at all with coding, circuitry...anything of that sort. Due to a number of different circumstances...the project fell entirely to me, leaving me 4 days do figure out everything myself. Without this...I had no hope of getting it done...I'd spent 8+ hours today just trying to adjust other codes I'd found online in order to graph in real time. This works fantastic, and your example codes made it do-able for a noob like me.

thankyouthankyouthankyouthankyou!

Cheers and have the best day!

Olive
Title: Re: Real Time Plotting Tool ( Oscilloscope )
Post by: Johndue on Feb 25, 2015, 06:42 pm
Thank you for awsome tools.
I use Jantje's eclipse plugin as scope and wounder if there are any function for clearing the plot window.

Example,
Code: [Select]
#include "Due.h"
void setup() {
Serial.begin(57600);
delay(1000);
pinMode(13, OUTPUT);
digitalWrite(13, LOW);
Serial.println("OK");
pinMode(A0, INPUT);
pinMode(DAC0, OUTPUT);
while (Serial.available() > 0) {
Serial.read();
}
}

int16_t buffer[20];
int16_t c1, c2, c3, c4;
int r=10;

void plot();
void window(int t);

void loop() {

if (Serial.available() > 0) {
r=0;
if (Serial.available() > 0) {
while (Serial.available() > 0) {
char c = Serial.read();
int i = (c - '0');
r = 10 * r + i;
}
}

}
window(r);
delay(1000);
}

void window(int t) {

        // I want to clear window here

for (int i = 0; i < 100; ++i) {
c1 = (analogRead(A0) * 3300 / 1023);
plot();
delay(t);
}
}

void plot() {
int16_t pktSize;
buffer[0] = 0xCDAB;
buffer[1] = 4 * sizeof(int16_t);
buffer[2] = c1;
buffer[3] = c2;
buffer[4] = c3;
buffer[5] = c4;
pktSize = 2 + 2 + (4 * sizeof(int16_t));
Serial.write((uint8_t *) buffer, pktSize);
}



Title: Re: Real Time Plotting Tool ( Oscilloscope )
Post by: jsimasek on Feb 26, 2015, 08:34 pm
http://visualgen.org/index.php/8-arduino-visual/tutorials/23-plot
Title: Re: Real Time Plotting Tool ( Oscilloscope )
Post by: aoxanhtangme on Mar 29, 2015, 12:40 pm
thanks a lot
Title: Re: Real Time Plotting Tool ( Oscilloscope )
Post by: Vernel on Apr 02, 2015, 03:21 am
Hey

These stuff are really great. I have been playing with a similar tool which can also save the data to csv, pdf and svg files for projects reports etc. Am an engineering student at University and we currently use arduino for process controls etc and at times need to print the results in reports. I have posted the current release of what am currently using for school projects. Just recently used my program to tune PID for a simple temperature control system. See the forum post below for the release details. Would also love to hear from you guys on what you think about it.

http://forum.arduino.cc/index.php?topic=312702.0 (http://forum.arduino.cc/index.php?topic=312702.0)
Title: Re: Real Time Plotting Tool ( Oscilloscope )
Post by: sonali20 on Jun 08, 2015, 04:42 pm
Hi,

My friend recommended this as a really good, simple-to-use plotting software so I'm using it to tune a PID controller. However, I'm not able to get it to work. When I set up the port and baud rate and press connect, the serial data gets printed correctly in the monitor but the plotting window remains blank. I verified the plot set-up to make sure that the data being printed is within range. I've attached a picture that demonstrates this.

I'd be very grateful if someone could point out what I'm doing wrong.

Thanks!
Title: Re: Real Time Plotting Tool ( Oscilloscope )
Post by: pilaf93 on Aug 27, 2015, 08:39 pm
hello, great work!! Is it possible to make more channels?? I need 18 channels in my project.
Title: Re: Real Time Plotting Tool ( Oscilloscope )
Post by: judge on Dec 18, 2016, 02:52 pm
The negtronics web site is down. The internet wayback machine shows what was there: https://web.archive.org/web/20150321054307/http://www.negtronics.com/simplot
Title: Re: Real Time Plotting Tool ( Oscilloscope )
Post by: zoomx on Dec 19, 2016, 10:52 am
The GoogleCode site is still up and there are many forks on GihHub.
Title: Re: Real Time Plotting Tool ( Oscilloscope )
Post by: Nick1787 on Feb 26, 2017, 06:37 pm
Nice work! I created something very similiar too and features some of the same features (multiple channels, standlone app, etc.).

(https://github.com/Nick1787/AdvancedSerial/raw/master/screenshots/Slider_AdvancedSerial.png)

Heres a link to my github if anyone wants to check it out:  https://github.com/Nick1787/AdvancedSerial/wiki (https://github.com/Nick1787/AdvancedSerial/wiki)



Title: Re: Real Time Plotting Tool ( Oscilloscope )
Post by: zoomx on Feb 28, 2017, 03:16 pm
Thanks for sharing, I have starred it!

Your project has a feature not present in Simplot nor in IDE plotter: it saves the data!
Title: Re: Real Time Plotting Tool ( Oscilloscope )
Post by: pepelevamp on Dec 29, 2018, 02:58 pm
Dude!
Nice work! thank you


Nice work! I created something very similiar too and features some of the same features (multiple channels, standlone app, etc.).

(https://github.com/Nick1787/AdvancedSerial/raw/master/screenshots/Slider_AdvancedSerial.png)

Heres a link to my github if anyone wants to check it out:  https://github.com/Nick1787/AdvancedSerial/wiki (https://github.com/Nick1787/AdvancedSerial/wiki)