"Viewing and monitoring data are common tasks during the development of various kinds of PSoC® device-based applications. For instance, in order to select the proper parameters for the CapSense CSA, CSD, or CSR User Modules, such as finger and noise thresholds, it is convenient to observe raw data from the sensors including baseline and signals with and without a finger touch.
The most commonly used approach is to collect text data via an RS232 interface using a HyperTerminal application, import the text data into a spreadsheet application (such as Microsoft® Excel®) and finally, plot a chart. This approach is intricate, inconvenient, and does not allow real-time data monitoring.
The PC application allows you to view data from up to 48 sensors, save and print charts, and save data for later analysis in a spreadsheet."
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
CapSense Data Viewing Tool - Design Aids
1. Design Aids - CapSense Data Viewing Tool
AN2397
Author: Vadym Grygorenko
Associated Project: Yes
Associated Part Family: CY8C20x34, CY8C21x34, CY8C24x94
GET FREE SAMPLES HERE
Software Version: PSoC Designer™ 4.3 SP1
Associated Application Notes: AN2401, Using the USBUART User Module
PSoC Application Notes Index
Application Note Abstract
This Application Note describes a simple PC tool for real-time CapSense data viewing and logging. It allows data monitoring
and viewing, and lets you save various data for further analysis.
Introduction Adopting PSoC Firmware
Viewing and monitoring data are common tasks during the The MultiChart application receives data that is divided into
development of various kinds of PSoC® device-based packets:
applications. For instance, in order to select the proper
Packet0 Packet1 … PacketN …
parameters for the CapSense CSA, CSD, or CSR User
Modules, such as finger and noise thresholds, it is Each packet consists of a header, a data element, and a tail.
convenient to observe raw data from the sensors including
Table 1. Data Packet Structure
baseline and signals with and without a finger touch.
The most commonly used approach is to collect text data via Packet Element Content
an RS232 interface using a HyperTerminal application, 0x0D
Header
import the text data into a spreadsheet application (such as
0x0A
Microsoft® Excel®) and finally, plot a chart. This approach is
Raw Count 0
intricate, inconvenient, and does not allow real-time data
Raw Count 1
monitoring.
…
The PC application allows you to view data from up to 48
Baseline 0
sensors, save and print charts, and save data for later
Data Baseline 1
analysis in a spreadsheet.
…
Signal 0
System Requirements
Signal 1
The MultiChart application requires the following system
…
configuration:
0x00
Tail 0xFF
A free serial communication (COM) port. If you do not
have a COM port you can use a USB-UART bridge. 0xFF
Microsoft Windows 9x, 2000, XP, or 2003.
Installation
Copy the file MultiChart.exe into a folder. You may wish to
create a shortcut to this file on your desktop or in the start
menu.
January 18, 2007 Document No. 001-41446 Rev. ** 1
[+] Feedback
2. AN2397
The header is followed by data. The data section consists of
The header allows the PC to divide input data flow into 3*N 16-bit words, N is sensor count, N=1..48. Each data
packets. The header consists of two bytes; a carriage return word represents one unsigned integer value. Data words
(0x0D) and a line feed (0x0A). To send the header, call the should be ordered according Table 1. The following code
standard TX8 User Module function: sequence sends the data section, with all sensor results in
the proper order, to the PC:
TX8_PutCRLF(); // Send Header
TX8_Write((char *) (CSD_waSnsResult), CSD_TotalSensorCount*2);
TX8_Write((char *) (CSD_waSnsBaseline), CSD_TotalSensorCount*2);
TX8_Write((char *) (CSD_waSnsDiff), CSD_TotalSensorCount*2);
The packet is bounded by the tail. The tail allows the
User Interface Description
application to determine the packet length. The tail consists
of three bytes; 0x00 0xFF 0xFF. To send the tail, add the Screen shots of the application are shown in Figure 1 and
following code to your project: Figure 2 on page 3.
The main window consists of two tabs: Sensor View and
TX8_PutChar(0x00); // Send Tail Custom View. You can monitor the results of a single sensor
TX8_PutChar((CHAR)0xFF); in Sensor View. Custom View allows you to display the
TX8_PutChar((CHAR)0xFF); results from any combination of the available sensors.
The main part of each tab is the chart panel. The vertical
The attached PSoC project, CSD_3213, demonstrates how
axis presents received data value. The horizontal axis
to collect CSD data and send it to the MultiChart application
shows the packet number. The MultiChart application counts
using the software TX8 UART transmitter. You can test this
incoming packets and displays estimated packet rate in the
project using the CY3212-CapSense (PSoC CapSense
status bar. The status bar also indicates the active COM
Training Kit) board. To connect the TX8 output to the PC
port number, run and logging statuses.
COM port, use an external RS232 level translator or USB-
UART bridge. A PSoC project for the USB-UART bridge,
The chart panel allows you to zoom in on and scroll around
USB_UART_Bridge, is attached. Refer to Application Note
the image using the mouse.
AN2401, “USBUART User Module Usage” for more details
about using the USB-UART bridge. To zoom in on a chart, use the left mouse button to click and
drag down and to the right to select an area of the screen.
When you release the mouse button, the MultiChart tool will
zoom the area selected.
To undo the zoom, click the left mouse button and drag up
and to the left. When you release the mouse button the
chart will zoom back to the original area.
To scroll a chart, click the right mouse button and drag in the
direction you wish to scroll.
January 18, 2007 Document No. 001-41446 Rev. ** 2
[+] Feedback
3. AN2397
Figure 1. Main Window – Sensor View
Figure 2. Main Window – Custom View
January 18, 2007 Document No. 001-41446 Rev. ** 3
[+] Feedback
4. AN2397
Figure 3. Tool Panel
Advanced
Stop / Chart Editor
Continue
Clear Start / Stop
Save
Chart Logging
Print Copy Image
Image
Image to Clipboard
The tool panel buttons are shown in Figure 3. Figure 4. Settings Dialog
The Stop/Continue button pauses chart updates so
that you can take a screen shot or observe the details
of the chart. Click this button once more to resume
chart updating.
The Clear Chart button clears all data in both chart
tabs.
The Save Image button allows you to save the active
chart image to a file in vector (.emf) or bitmap (.bmp)
formats. The Enhanced Metafile format (.emf) is a
vector format that results in a smaller image file size.
The Print Image button prints the active chart image.
The Copy Image to Clipboard button places an
image of the active chart on the clipboard where you
can paste it into another application.
The Start/Stop Logging button starts and stops The Select port drop-down allows you to select the
saving received data into a log file. When you start COM port number. This setting is checked by the
logging, all data received is stored in a comma application at start-up only. Connect external USB-
separated values (csv) file. You can open this file in a COM adapters (if needed) before launching the
spreadsheet application for detailed analyses. The log application.
file name is MultiChartLog.csv by default. The file
name can be changed in Settings dialog box. The log The Port speed drop-down selects the UART bit rate.
file size grows very quickly. Use the same rate you used in the PSoC project.
The Advanced Chart Editor button opens a window The Visible points field specifies the number of data
that allows you to change almost all of the chart packets to display in the chart. When the number of
settings including series colors, and axes limits. packets received is greater than this value, old data is
removed from chart.
Modifying the Settings The Log file name field specifies the name and
You can modify the COM port number, UART bit rate, and location of the log file. (You can browse and select by
other settings. To modify the settings, from the Tools clicking the open file icon.)
menu select Settings. The settings dialog box appears as
These settings are automatically saved when you close
shown in Figure 4.
the application and are reloaded when you restart the
application.
January 18, 2007 Document No. 001-41446 Rev. ** 4
[+] Feedback
5. AN2397
Figure 5. Advanced Chart Editor
Modifying the Advanced Settings
To change data series colors:
1. Click the Advanced Chart Editor button on the
toolbar.
2. Select the Series tab.
3. Select the corresponding series from the drop-down
menu.
4. Click the Color button (see Figure 5) and select the
desired color.
These settings are active for current instance of the
application; they are not saved.
January 18, 2007 Document No. 001-41446 Rev. ** 5
[+] Feedback