EN

Real-time curve function DEMO

 

  1. Attributes settings:

 

Real time curve function DEMO

 

1. Y_Central: The Y coordinate value of the curve. Normally we set as the center Y coordinate of the curve variable block.

 

2. VD_Central: Center value of the curve variable data. VD_Central=(Vmax-Vmin)/2.

 

As an example: we need to show 0-5V voltage value curve, the voltage value is 1 integer and 2 decimal.

The data we send is hex integer. So we shall use 500 to display as 5.00. Vmax=500, Vmin=0, VD_Central=(500-0)/2=250.

 

3. Vertical axis magnification: N=(Ymax-Ymin)*256/(Vmax-Vmin)

 

4. Data source channel:  There are totally 8 data channel for the real time curve. Each channel has 1 KB buffer for the data.

 

We use CH_MODE to define the channel number in the command.



CH_MODE (hex)=0X03 (0  0  0  0  0  0  0  0) (binary)

Real time curve function DEMO

 

As an example:

If channel 0 is enable, CH_MODE(HEX)=0X03(0 0 0 0 0 0 0 1)(BINARY)=01

If channel 1 is enable, CH_MODE(HEX)=0X03(0 0 0 0 0 0 1 0)(BINARY)=02

If channel 3 is enable, CH_MODE(HEX)=0X03(0 0 0 0 0 1 0 0)(BINARY)=08

If channel 0 and channel 1 is enable,

CH_MODE(HEX)=0X03(0 0 0 0 0 0 1 1)(BINARY)=03

 

2. Command set to send the data

 

84+CH_MODE+DATA0+DATA1+…+DATAn

 

DEMO: If you send A5 5A 12 84 01 00 A0 00 50 00 E0 01 00 01 10 01 50 00 D0 01 E0

 

A5 5A: Frame head

12: Data length

84: Write curve buffer

01: Channel 0 enable

00 A0 00 50 00 E0 01 00 01 10 01 50 00 D0 01 E0: Curve value

 

The curve displayed as below

 

Real time curve function DEMO

 

 

The following links may help you

 

14 STONE TOOL BOX instruction tutorial

https://www.stoneitech.com/news/instructions