Community Translation - CapSense Sensor Monitoring and Logging through UART and Bridge Control Panel - KBA228593

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
MotooTanaka
Level 9
Level 9
Distributor - Marubun (Japan)
First comment on blog Beta tester First comment on KBA

Hi,

I'd like to translate KBA228593 into Japanese.

moto

Original KBA: KBA228593

CapSense Sensor Monitoring and Logging through UART and Bridge Control Panel - KBA228593

Translated by: MoTa_728816

===============================

タイトル: UART と Bridge Control Panel を使用した CapSense センサのモニタリングとロギング方法 - KBA228593

ヴァージョン: **

質問:

UART を使用して CapSense® センサのデータをモニタして、データのログをとるのにはどうしたら良いでしょうか?

回答:

添付ファイルは CY8CKIT-145 キットを使用して CapSense ボタンを実装したサンプルです。

以下の CapSense モニタリング手法は既に I2C ポートが他の目的で使用されているときや、CapSense の Raw count や Different count などのパラメータを大量に保存したい場合などに有効です。

PSoC 4® デバイスをプログラムする

1. (Windowsで) Start → Cypress → PSoC Programmer を選択肢、PSoC Programmer を起動します。

2. File Load アイコンをクリックして、添付のプロジェクトのフォルダ “CapSense_UART_sensor_monitor” から CapSense_UART_sensor_monitor.hex をロードします。図 1 のように PSoC Programmer の設定を行ってください。

図 1. PSoC Programmer 設定

001-pastedImage_21.png

3. USB ポートに CY8CKIT-145 を接続します。

4. Program アイコンをクリックします。プログラミングが完了すると、図 2 のように  “Programming Succeeded” というメッセージが表示されます。

図 2. PSoC 4 のプログラミング

002-pastedImage_20.png

Bridge Control Panel (BCP) で CapSense のデータを見て、ロギングする

1. (Windows から) Start → Cypress → Bridge Control Panel を選択して、Bridge Control Panel を起動する。

2. Bridge Control Panel ダイアログで、図 3 のように Chart →  Variable Settings へ移動する。

図 3. 変数設定 (Variable Settings) をアクセスする

003-pastedImage_27.png

3.  Variable settings ダイアログで、図 4 のように変数名 (Variable Name) と データタイプ (Type) を入力します。OK をクリックして Bridge Control Panel ダイアログに戻ります。

図 4. 変数名とデータタイプの入力

004-pastedImage_30.pngノート: これらの変数は variable_settings.ini ファイルから読み込むことも可能です。 Load... をクリックして variable_settings.ini を選択してください。

4. Bridge Control Panel ダイアログで、Connected I2C/SPI/RX8  Ports リストから、PSoC 4 デバイスのコムポートを選択してください。この例では、コムポートは COM30 になっています。このポートはご使用の環境によって異なる場合があります。接続に成功すると、図 5 のように  “Connected” と表示されます。

図 5. コムポートの選択

005-pastedImage_32.png

5. Editor タブで、図 6 のように PSoC 4 からデータを受信するコマンドを入力します。

ノート:コマンドを手動で入力する代わりに、このナレッジベースアーティクルとともに提供されている UART_command.iic ファイルを読み込むことも可能です。このファイルにはセンサデータを受信するためのコマンドが含まれています。ファイルを読み込むためには File → Open File (Ctrl+O) をクリックしてください。

6. コマンドを一回だけ実行するのには、Send ボタンをクリックしてください。コマンドを繰り返す場合には、図 5 で青枠で囲われていた Repeat をクリックしてください。

BCP  は PSoC 4 からデータストリームを受信し始めます。@1rawcount0 は RawCount  の上位バイトを、@0rawcount0 は下位バイトを取得します。同様にして、他のデータに関しても変数を分離されています。

図 6. PSoC 4 デバイスからデータを読み込む

006-pastedImage_33.png

ノート: “+” 記号は長い行を複数の行に分割します。

図 7  に PSoC 4 から CapSense のデータを送信するのに必要なコードを示します。

図 7. CapSense データを送信する PSoC 4 関数

007-pastedImage_35.png

7. PSoC 4 から受信したデータを可視化するため、Chart タブへ移動して右上のコーナーに表示されているリストから rawcount0 のプロットを選択します。図 8 および 図

10 で示されているように、diffcount0 のような他の変数も選択することが可能です。

図 8. BCP 上の Row Count のプロット                                         図 9. BCP 上の Difference Count のプロット

008-pastedImage_37.png009-pastedImage_38.png

8. CapSense センサデータをロギングするのには、BCP を実行するために Repeat をクリックします。必要な時間経過後、データのモニタリングを停止するために Stop をクリックします。

図 10. データモニタリングの開始と停止

010-pastedImage_44.png

9. Chart → Export Collected Data (収集したデータを書き出す) をクリックします。

図 11. 収集したデータの書き出し (Export Collected Data)

011-pastedImage_50.png

10. Export Collected Data ダイアログから、図 12 で示されるようにデータを絵または、テキスト、XML, HTML、Excel 等のデータとして保存することが可能です。

図 12. 書き出すデータの保存


012-pastedImage_56.png013-pastedImage_0.png

===============================

27-Apr-2020

moto

0 Likes
1 Reply
JennaJo
Moderator
Moderator
Moderator
1000 replies posted 750 replies posted 500 replies posted

Hello, Tanaka-san

We receive your translation, it will be published to KBA to Community.

After upload, You will receive the points as the word of KBA.

Due to the current delay of processed work, Please bear with me for the delayed the response.

It could be delayed, but it will be processed soon.

Thanks for your contribution to CDC!

Will keep you update the status.

Thanks,

Jenna Jo

Jenna Jo
0 Likes