chart viewerthis software is an android terminal application that displays data charts in real time....

14
ChartViewerAndroidi Android Terminal Application Chart Viewer Operating Instructions Ver 131

Upload: others

Post on 15-Mar-2020

4 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Chart ViewerThis software is an ANDROID terminal application that displays data charts in real time. Receives data from various devices and personal computers and displays the waveform

ChartViewer(Android)

i

Android Terminal Application

Chart Viewer

Operating Instructions

( Ver 1.3.1 )

Page 2: Chart ViewerThis software is an ANDROID terminal application that displays data charts in real time. Receives data from various devices and personal computers and displays the waveform

ChartViewer(Android)

ii

- 目次 -

1. Summary ........................................................................................................................................................................................................................................... 1

2. ANDROID Version ........................................................................................................................................................................................................................ 2

3. Supported serial communication devices .......................................................................................................................................................................... 2

4. processing power ....................................................................................................................................................................................................................... 2

5. Filter the chart display .............................................................................................................................................................................................................. 3

6. Pausing and scrolling ............................................................................................................................................................................................................... 3

7. Range setting by drag operation ............................................................................................................................................................................................ 4

8. Action bar menu .......................................................................................................................................................................................................................... 5

8.1. Selection of communication method (USB-Serial / Socket) ......................................................................................................................... 6

8.2. Setting communication parameters ........................................................................................................................................................................... 6

8.3. Set port number of socket ............................................................................................................................................................................................... 6

8.4. Disconnect Socket ............................................................................................................................................................................................................... 6

8.5. Clear screen .............................................................................................................................................................................................................................. 6

8.6. Set chart range....................................................................................................................................................................................................................... 7

8.7. Set number of data items ................................................................................................................................................................................................. 7

8.8. Set filter string ......................................................................................................................................................................................................................... 8

8.9. Set string in before values .................................................................................................................................................................................................. 8

8.10. Set screen update frequency ......................................................................................................................................................................................... 8

8.11. Set screen rezolution ............................................................................................................................................................................................................. 9

8.12. DC-Offset Cancellation ........................................................................................................................................................................................................ 9

9. Sample data transmission application ......................................................................................................................................................................... 10

10. Contact information ................................................................................................................................................................................................................ 11

11. Change History ........................................................................................................................................................................................................................... 12

<NOTE> This document is translated from Japanese to English by Google-Translate.

Please refer to “http://www.ne.jp/asahi/ajara/kojara/data/android_chartview_j.pdf” for the Japanese version of the original.

Page 3: Chart ViewerThis software is an ANDROID terminal application that displays data charts in real time. Receives data from various devices and personal computers and displays the waveform

ChartViewer(Android)

1

1. Summary

This software is an ANDROID terminal application that displays data charts in real time.

Receives data from various devices and personal computers and d isplays the waveform.

Each connected device or personal computer must have a function to transmit data such as sensor output.

Various devices can be connected via serial line (RS-232C / UART) and WiFi (socket (TCP / IP)).

The numerical value is extracted f rom the received data, and a chart (waveform graph) is displayed in real time

like an oscilloscope.

As received data, text data in CSV format and transparent packet frames (binary data delimited by DLE / STX to D LE / ETX) can

be handled.

Text data recognizes one set(1 to 8ch) of data per line. The end of the text data line is CR (0x0D), LF (0x0A) ,or 2 bytes o f

CR+LF.

Text data is CSV format text separated by comma (,) and contains the numeric values of specifie d by the number of data

items(number of channels).

For example, text data storing three integers of 123.456, 124.567, -10.789 is as follows.

Text data can be filtered to select only specific lines by specifying the character string included in the tex t data.

To select only the following text data lines, set "[PKT-A]" in "Set filter string" from the action menu.

(In this case, the value following “ [PKT-A]” is evaluated)

If special string exists before the numerical value, set that string in "Set st ring in before values".

If the following text data line, Set “Value =” .

Display example of time chart (waveform graph)

123.456, 124.567, -10.789 LF(0x10)

[PKT-A] 123.456, 124.567, -10.789 LF(0x10)

・・・・・ Value = 123.456, 124.567, -10.789 LF(0x10)

USB-Serial

WiFi

Socket communication by TCP/IP

RS-232C/UART

・ Embedded Linux device

・ Raspberry Pi

・ Other various devices

・・・・・

Any sensor ·Acceleration ·Geomagnetic

·Gyro

・・・

Various devices or PC

Data with three items(three channels)

Sensor output data

Android Tablet / Smartphone

Data counter (displayed in 1000 units, "1K" means 1000)

Page 4: Chart ViewerThis software is an ANDROID terminal application that displays data charts in real time. Receives data from various devices and personal computers and displays the waveform

ChartViewer(Android)

2

A transparent packet frame is a byte stream that starts with DLE - STX and ends with DLE - ETX.

When receiving data, two consecutive DLEs in the packet data are conve rted to one DLE.

(In other words, if you want to include a byte with the same value as DLE in the packet data, insert one DLE, convert it to D LE /

DLE 2 bytes, and send it.)

The packet data is a little-endian 32-bit integer whose number is specified by the number of data items(number of channels).

This values must be specified left -justified. (Values are treated as signed integers)

For example, a packet frame storing three integers of 1000 (0x03E8), 2000 (0x07D0), and 3088 (0x0C10) is as follows.

For transparent packet frames, you cannot filter the data or specify the location of the data.

<Note> When transmitting a transparent packet frame in Socket mode, add LF (0x0A) to the end of each packet.

2. ANDROID Version

ChartViewer can be used on Android Ver4.2.2 or later.

3. Supported serial communication devices

The ChartViewer supports the following three serial communication USB devices made by the RATOC -SYSTEM.

# Name USB connector shape

1 REX-USB60MB Micro-B

2 REX-USB60MI Micro-A

3 REX-USB60F Type A (Usual PC USB connector)

4. processing power

The Chartviewer is created with java (interpreter), so it is not possible to display a chart at an extremely high sampling rate.

Sampling rate is depends on the features of your Android device, such as a tablet.

About 10 to 100 ms for text data, about 5 to 50 ms for binary data(transparent packet frame) .

DLE STX Packet data DLE ETX Packet frame (STX = 0x02, ETX = 0x03, DLE = 0x10 fixed)

DLE STX DLE ETX

0xE8 0x03 0x00 0x00 0xD0 0x07 0x00 0x00 0x10 0x10 0x0C 0x00 0x00 ・・・

If DLE (0x10) is included in the packet data, add more DLE (0x10). This 2 bytes(0x10, 0x10) become 1 byte data (0x10).

32BitInteger Packet frame

32BitInteger 32BitInteger

DLE STX ・・・ DLE ETX DLE STX ・・・ DLE ETX DLE STX ・・・ DLE ETX LF LF LF

Page 5: Chart ViewerThis software is an ANDROID terminal application that displays data charts in real time. Receives data from various devices and personal computers and displays the waveform

ChartViewer(Android)

3

5. Filter the chart display

Check boxes at the bottom right of the screen allow you to select the data items to be displayed on the screen.

(In the following example, the red waveform is hidden by turning off the red check box.)

You can also show / hide the checkbox itself by tapping the button to the right of the checkbox.

6. Pausing and scrolling

Tap the button at the top right of the screen to stop displaying the chart. (At this time, the button display changes to .)

While the display is stopped, the chart can be scrolled by dragging in the horizontal direction.

The gauge at the bottom left of the screen shows the status of the data stored in the buffer.

The buffer capacity is 20,000 data (fixed).

To resume displaying the chart, tap the button.

Gray (including black) indicates data stored in the buffer.

The black part means the part currently displayed on the screen.

Page 6: Chart ViewerThis software is an ANDROID terminal application that displays data charts in real time. Receives data from various devices and personal computers and displays the waveform

ChartViewer(Android)

4

7. Range setting by drag operation

By dragging the screen vertically, the dragged area can be enlarged and displayed.

At this time, the range you dragged is set as the range, and the automatic -range mode is canceled.

Tapping the screen will (again) enter autorange mode.

drag

tap

Drag vertically

Zoom in on dragged area

Auto range mode

Page 7: Chart ViewerThis software is an ANDROID terminal application that displays data charts in real time. Receives data from various devices and personal computers and displays the waveform

ChartViewer(Android)

5

8. Action bar menu

Tap at the right end of the title bar to display the following menu.

Make the following settings in each menu.

MENU CONTENT

Communication method selection Select USB-Serial mode / Socket mode.

If the mode changes, restart the app.

Set communication parameter Set the communication speed, number of data bits, number of stop bits,

parity, flow control type

Set port number of socket Set the port number for socket communication. (Default = 14238)

Socket disconnect Close the socket and disconnect from the client.

Clear screen Clear the screen.

Set chart range Set the range value (low value and high value) of the chart graph.

Set number of data items Set the number of data items (number of channels, number of

simultaneously displayed waveforms).

Set filter string Set the filtering character string of the received text data.

Set string in before values Set the character string located immediately before the numeric value of

the received text data.

Set screen drawing frequency Screen update frequency (Specify how many times data is received before

updating the chart)

Set screen rezolution Select the screen resolution (number of horizontal and vertical pixels).

Reset communication device Reset the serial communication device and clear the screen.

DC-offset Cancelation Adjust so that the area of the positive side of the waveform is the same as

the area of the negative side.

MENU For USB-Serial mode For Socket mode

Page 8: Chart ViewerThis software is an ANDROID terminal application that displays data charts in real time. Receives data from various devices and personal computers and displays the waveform

ChartViewer(Android)

6

8.1. Selection of communication method (USB-Serial / Socket)

Select USB-Serial mode or Socket mode.

If the mode changes, restart the app.

8.2. Setting communication parameters

Set the communication parameters (communication speed, number of data bits, number of stop bits, parity bits, flow control) i n

USB-Serial mode.

The screen shown below is displayed. Tap the orange setting item to expand the item menu.

Tap the value to set and tap the OK button.

For example, to set the communication speed to 115200bps, tap “ Baud rate” and then tap “115200”.

8.3. Set port number of socket

Set the port number for Socket communication. (The default value is 14238)

8.4. Disconnect Socket

Close the socket and disconnect from the client.

Disconnect instantly when selecting a menu.

8.5. Clear screen Clear the screen.

Clear screen instantly when selecting a menu.

* The mode can be identified by the display

at the top of the screen

In USB-Serial mode, the name of the connected device is displayed.

However, it is hidden if not connected.

In Socket mode, the IP address and port number

are always displayed.

Page 9: Chart ViewerThis software is an ANDROID terminal application that displays data charts in real time. Receives data from various devices and personal computers and displays the waveform

ChartViewer(Android)

7

8.6. Set chart range

The range (low value and high value) of the chart diagram is automatic-range-mode set by default, and is automatically set

according to the data value.

If you want to set the range of the chart diagram fixedly, uncheck " Range setting automaticaly" in the "Set chart range " menu and

set the range value.

In the case of automatic range setting, the maximum and minimum values obtained from the received dat a are obtained, and the

range is set by adding a 10% margin above and below.

If you tap the "OK" button with "Range setting automaticaly" checked in the "Set chart range" menu, it will be in the

automatic-range-mode. (The range is calculated from the maximum and minimum values of the data currently in the buffer.)

8.7. Set number of data items

Set the number of data items (number of channels, number of waveforms displayed simultaneously on the chart).

To set a fixed range, tap to remove the check.

Page 10: Chart ViewerThis software is an ANDROID terminal application that displays data charts in real time. Receives data from various devices and personal computers and displays the waveform

ChartViewer(Android)

8

8.8. Set filter string

Specify the character string (filter string) included in the valid te xt line when text data (line by line) is received.

For example, if you specify {"[PKT-A]"} as the filter string, only the lines that contain the string "[PKT-A]" in the received text

line will be valid, and the other text lines will be ignored.

8.9. Set string in before values

Specifies the string that immediately precedes the numeric values , if the numeric values is not the beginning of a received text

line (or if it is not immediately after a filter string).

8.10. Set screen update frequency

Set the drawing frequency of the chart diagram (how many times data is received before updating the chart diagram).

The default value is "1", which updates the chart diagram each time data is received.

[PKT-A] 0.04883, -0.05762, 0.65894,

[PKT-B] 0.04858, -0.05737, 0.65918,

[PKT-C] 0.04883, -0.05737, 0.65942,

[PKT-A] 0.04810, -0.05664, 0.65991,

[PKT-B] 0.04858, -0.05664, 0.66089,

[PKT-C] 0.04883, -0.05713, 0.66089,

・・・・・

Received text

Valid line

Value= 0.04883, -0.05762, 0.65894,

Value= 0.04858, -0.05737, 0.65918,

Value= 0.04883, -0.05737, 0.65942,

Value= 0.04810, -0.05664, 0.65991,

Value= 0.04858, -0.05664, 0.66089,

Value= 0.04883, -0.05713, 0.66089,

・・・・・

Received text

Valid line

Page 11: Chart ViewerThis software is an ANDROID terminal application that displays data charts in real time. Receives data from various devices and personal computers and displays the waveform

ChartViewer(Android)

9

8.11. Set screen rezolution

Select the screen resolution to be set.

8.12. DC-Offset Cancellation

Adjust the offset of the waveform data so that the areas of the positive and negative values of the displayed waveform are the

same.

Select "DC-Offset Cancellation" from the action bar menu to display the following dialog box.

Here, set the following values and tap OK.

Enable DC-Offset cancellation Check to perform DC offset cancellation

Number of data which offset cancellation Specify the number of data for DC offset correction.

The timing which renews offset value Specify the timing to update the DC offset correction value by the

number of data

No DC offset cancellation With DC offset cancellation

Number of data to be offset cancellation(1st)

Offset cancellation timing

This part (the first data collected for offset correction)is No displayed.

・・・・・

* Actual resolution value differs depending on each device.

Number of data to be offset cancellation(2ndt)

Page 12: Chart ViewerThis software is an ANDROID terminal application that displays data charts in real time. Receives data from various devices and personal computers and displays the waveform

ChartViewer(Android)

10

9. Sample data transmission application

This is a Windows application that sends sample data of ChartViewer.

This app sends the following text data to WiFi (Socket communication by TCP/IP) or USB-Serial (RS-232C / UART) line.

Please refer to the following URL for the acquisition / details of this application.

URL: http://www.ne.jp/asahi/ajara/kojara/android_e.htm

Windows PC Android tablet / smartphone (start ChartViewer) WiFi

Cross cable

0.04883, -0.05762, 0.65894

0.04858, -0.05737, 0.65918

0.04883, -0.05737, 0.65942

0.04810, -0.05664, 0.65991

0.04858, -0.05664, 0.66089

0.04883, -0.05713, 0.66089

0.05078, -0.05615, 0.66016

0.05225, -0.05664, 0.66162

・・・・・ ,

* Send three values on one line, separated by commas (,).

Each value can be either a random value or a trigonometric (Sin, Cos, Tan) value.

Page 13: Chart ViewerThis software is an ANDROID terminal application that displays data charts in real time. Receives data from various devices and personal computers and displays the waveform

ChartViewer(Android)

11

10. Contact information

For inquiries about "Chart View", please add "Ajara:" to the beginning of the subject and send it to the following email addr ess in

Japanese.

We cannot accept non-Japanese language.

Page 14: Chart ViewerThis software is an ANDROID terminal application that displays data charts in real time. Receives data from various devices and personal computers and displays the waveform

ChartViewer(Android)

12

11. Change History

Version Changes Note

1.3.0 First edition

1.3.1 In the English display (locale other than "ja"), the display error of the chart range setting

dialog was corrected.

[Before] [After]

Not applicable for

Japanese display