Announcements

Please ask technical questions in the appropriate product forum

odissey1
Level 9
Level 9

Click here for the latest version (v.1.2).

 

SerialPlot is a custom component for interfacing with real-time plotting software SerialPlot.

Hackaday.io: SerialPlot - Realtime Plotting Software     

The component implements interface to the real-time charting software SerialPlot. Using this component, PSoC data can be easily visualized on personal computer (Linux, Mac & Windows). Component doesn’t consume hardware resources, performing all operations by CPU, which is useful for systems with little resources, such as PSoC4. Multiple instances of the component can run simultaneously in the project.

 

Component features:

     Data types: int8, int16, int32, uint8, uint16, uint32, float

     Up to 8 channel output

 

The component was tested using CY8KIT-059 PSoC5 prototyping kit and CY8KIT-042 PSoC4 Pioneer Kit. Demo projects are provided.

 

Attached archive contains component library (v0.0), component datasheet and demo projects for PSoC5 and PSoC4. Please read installation instructions in the readme.txt.

 

The component provided as-is, no liabilities. It is free to use and modify.

/odissey1

 

P.S. Demo projects use optional annotation components (which are also provided here in Support_libs.zip):

PSoC Annotation Library: PSoC Annotation Library v1.0

KIT-042 annotation stub: KIT-042: annotation component for CY8CKIT-042 Pioneer Kit  

Download SerialPlot: Hackaday.io: SerialPlot - Realtime Plotting Software                       

 

 

Figure 1. SerialPlot demo project schematic.

SerialPlot_P4_basic_01a_A.png

Figure 2. Project data output to SerialPlot graphic software.

SerialPlot_basic_01a_B.png

SerialPlot_P4_basic_01a_C2.png

13 Replies
All replies
Accepted solution
MotooTanaka
Level 9
Level 9
Distributor - Marubun (Japan)

Dear /odissey1-san,

Although your component seems to be nice, my brain is not functioning well.

May be, because it's Monday.

Anyway, I extracted zips as below

003-folder.JPG

Then I opened Demos/SerialPlot_basic_01a.cydsn/SerialPlot_basic_01a.cydwr.

When I tried "Clean and Build" I got

000-notice-list.JPG

Then I opened  Demos/SerialPlot_P4_basic_01a.cydsn/SerialPlot_P4_basic_01a.cydwr.

When I tried "Clean and Build" I got

001-notice-list.JPG

Apparently, I'm missing some step(s), would you teach me how/what to do?

Best Regards,

17-Feb-2020

Motoo Tanaka

Morty Proxy This is a proxified and sanitized view of the page, visit original site.
odissey1
Level 9
Level 9

Dear Motoo,

Thank you for reporting the issue. I apparently shortened the path during zipping the Demos archive, so that libraries could not be found automatically. It is corrected now, and updated Demo folder is uploaded instead of the previous one. Please download Demos.zip again. Alternatively, just set the AnnotationLibrary_lib and KIT-042_lib folders in Project Dependencies list.

Sincerely,

odissey1

Morty Proxy This is a proxified and sanitized view of the page, visit original site.
MotooTanaka
Level 9
Level 9
Distributor - Marubun (Japan)

Dear Odissey1-san,

I have downloaded new Demos.zip and it could be compiled OK!

As I'm about to leave office, I'll test it with  my board, tomorrow.

Thank you for your help!

Best Regards,

17-Feb-2020

Motoo Tanaka

Morty Proxy This is a proxified and sanitized view of the page, visit original site.
odissey1
Level 9
Level 9

Motoo,

I updated the component library SerialPlot_lib.zip as well due to the component icon not showing correctly in the Components panel. Please reload.

/odissey1

Morty Proxy This is a proxified and sanitized view of the page, visit original site.
MotooTanaka
Level 9
Level 9
Distributor - Marubun (Japan)

Dear odissey1-san,

I'm sorry for being messy but...

well, first the good news is your library and demo seems generating right data

(1) Recorded log (numbers seems to be fine)

012-log.JPG

next the bad news is my plot does not look like yours ... orz

(2) Data Format Tab

010-Data-format.JPG

(3) Plot tab

011-Plot.JPG

I wonder if my plot tab is appropriate.

Could you show/teach me your Plot tab setting?

Best Regards,

18-Feb-2020

Motoo Tanaka

Morty Proxy This is a proxified and sanitized view of the page, visit original site.
odissey1
Level 9
Level 9

Moto,

I downloaded and tested (PSoC5) SerialPlot_basic_01 project again (Creator 4.0). The output seems to be as shown on Figure 2 above in my original post. On the other hand, the data output in the recorded log (chan1: -3, -6, -9, -12, ... -36, -3) doesn't seem to be correct. It supposed to be a sine of amplitude +/-127 and period of 256. The data observed on the SerialPlot monitor coincides with record log in Terminal  so the SerialPlot software seems to correctly display incoming data. I am just curious why the data is different? Can you please post  the project you worked on, so I could test it.

/odissey1

Morty Proxy This is a proxified and sanitized view of the page, visit original site.
MotooTanaka
Level 9
Level 9
Distributor - Marubun (Japan)

Dear Odissey1-san,

Attached is the archive of my current project.

I intentionally did not "clean" the project" so it is larger.

Best Regards,

18-Feb-2020

Motoo Tanaka

Morty Proxy This is a proxified and sanitized view of the page, visit original site.
odissey1
Level 9
Level 9

Motoo,

I downloaded an tested your project SerialPlot_P4_basic_01a on CY8CKIT-042 (Pioneer Kit) using Creator 4.2. Everything seems to be OK, the output is below. Attached also SerialPlot Settings_01.ini file.

Can you please switch the Component output format to ASCII and check with TeraTerm or Putty what data is being generated by the project?

/odissey1

SerialPlot_P4_basic_01a_A1.png

Morty Proxy This is a proxified and sanitized view of the page, visit original site.
MotooTanaka
Level 9
Level 9
Distributor - Marubun (Japan)

Dear Odissey1-san,

Something just came to mind.

I grubbed another CY8CKIT-042 from our lab stock.

And tried with the same project.

022-042B.JPG

So I realized that my CY8CKIT-042 was broken or at least sick as its output was still

023-042A.JPG

Then another thing came to my mind.

So I started the PSoC Programmer and updated the firmware of my CY8CKIT-042.

Then the output was

024-042A-2.JPG

After all, the problem was the old firmware on my CY8CKIT-042 (KitProg).

I'm awfully sorry for disturbing you with this.

But next time you see the above middle screen you can suggest your customer

to update KitProg frimware.... orz

Anyway, now I (think that I) am fine.

Thank you very much!

Best Regards,

18-Feb-2020

Motoo Tanaka

Morty Proxy This is a proxified and sanitized view of the page, visit original site.
odissey1
Level 9
Level 9


Attached below is a new version v1.0 of the SerialPlot component for interfacing with real-time plotting software SerialPlot (0.12.0).

What's new in v1.0:
     * The number of output channels increased to 64
     * Option to send multiple data packets per frame
     * Added procedure PlotArray() for large number of channels 
     * Full compatibility with PSoC4 SCB UART

The component was tested using Creator 4.0 and 4.4 using CY8KIT-059 PSoC5 prototyping kit and CY8KIT-044 PSoC4200M Pioneer Kit. Demo projects are provided.

Attached archive contains component library, component datasheet and demo projects for PSoC5 and PSoC4. Please read installation instructions in the readme.txt.

Credits:
     SerialPlot v0.12.0, by Hasan Yavuz Özderya,
     https://hackaday.io/project/5334-serialplot-realtime-plotting-software/discussion-88924
     https://github.com/hyOzd/serialplot

 

Figure 1. Example of SerialPlot Bar Chart plotting of 32 channels of data using Chart_PlotArray() API.

SerialPlot_PlotArray_01a_B1.png

odissey1
Level 9
Level 9

This is an updated version v1.1 of the SerialPlot component for interfacing with real-time plotting software SerialPlot (0.12.0).

What's new in v1.1:
     * Option to set data frame size automatically
     * Option for data format 'double'

The component was tested using Creator4.0 and 4.4 using CY8KIT-059 PSoC5 prototyping kit and CY8KIT-044 PSoC4 200M Pioneer Kit. Demo projects are provided.

Attached archive contains component library, component datasheet and demo projects for PSoC5 and PSoC4. Please read installation instructions in the readme.txt.

Credits:
     SerialPlot v0.12.0, by Hasan Yavuz Özderya,
     https://hackaday.io/project/5334-serialplot-realtime-plotting-software/discussion-88924
     https://github.com/hyOzd/serialplot

 

odissey1
Level 9
Level 9

Below is a demo project showing high speed data output from PSoC4M to the SerialPlot charting software. The SCB UART is configured for 2Mbaud rate using external clock of 16MHz (48MHz/3), with oversampling ratio of 8.

To achieve such rates, an external USB-UART converter has to be used, as the KitProg's USB to UART converter maxes out at about 115.2 kbaud due to the clock inaccuracy. An FTDI converter cable ( TTL-232R-5V-PCB) was used for this purpose.

The test data (2 channels of int16) were generated at about 9kHz rate and sent to the SerialPlot charting tool using the SerialPlot v1.1 component. Project essential code:

 

 

int16 v1,v2;                     // data channels
... 
for(;;)
{ 
     if(isrTimer_flag != 0)      // monitor for Timer interrupt
     {
          isrTimer_flag = 0;     // reset flag
          GenerateSignal();      // update values v1-v2
          Chart_1_Plot(v1, v2);  // plot values
     } 
}

 

 

Full project description provided in the  component datasheet (Appendix 5).

 

Figure 1. Project schematic. The SerialPlot component is configured for 2 channels of int16 data type, Custom Frame format, with the Checksum enabled. The SCB UART is configured for 2Mbaud rate using external clock of 16MHz (48MHz/3) with with oversampling ratio of 8.

SerialPlot_P4M_2MBd_01a_A.png

Figure 2. Component Advanced settings. To reduce the amount of the overhead bytes and to lower the SerialPlot refresh rate the number of data packets per frame was set to 32. The FrameSizeFormat parameter was set to automatic (first byte is a payload size). 

SerialPlot_P4M_2MBd_01a_AdvancedDialog.png

 

Figure 3. Project annotation using KIT-044 v0.2 annotation component. The external USB-UART bridge is directly connected to the SCB UART output Pin_4[1]

SerialPlot_P4M_2MBd_01a_KIT-044_C.png

 

Figure 4. SerialPlot output and Port settings: Port: COM6 USB Serial Port; Baud Rate: 2000000;
No Parity, 8-bits, 1 Stop Bit, No Flow Control. The non-standard Baud Rate value must be typed
into the dropbox manually. The data packets rate is 8885(4 bytes each) per second. 

SerialPlot_P4M_230kBd_01a_SerialPlot_Port.png

 

 

odissey1
Level 9
Level 9

Attached is v1.2 of the SerialPlot component for interfacing with real-time plotting software SerialPlot (0.12.0).

What's new in v1.2:
     * Option to use USBUART interface
 

The component was tested using Creator4.0 and 4.4 using CY8KIT-059 PSoC5 prototyping kit and CY8KIT-044 PSoC4 200M Pioneer Kit. Demo projects are provided.

Attached archive contains component library, component datasheet and demo projects for PSoC5 and PSoC4. Please read installation instructions in the readme.pdf.

 

Figure 1. Project schematic  using SerialPlot v1.2 component and USBUART interface.

SerialPlot_USB_basic_01a_A.PNG.png

 

Figure 2. Example of the SerialPlot charting software output using USBUART interface. 

SerialPlot_USB_basic_01a_SerialPlot_B.PNG.png

 

Figure 3.  Project annotation is created using PSoC Annotation Library.  PSoC5 USBUART interface is used to send data to the host computer, running the SerialPlot software.

SerialPlotUSB_01a_KIT-059.PNG.png

Morty Proxy This is a proxified and sanitized view of the page, visit original site.