Shanghai Smart Control ETOUCH 10.4'' Display

Product's Documents

Below are documents related to this product, you can read online or download:

User Manual

This is the main product document for model ETOUCH.

The file format is pdf, 35 pages, you can download this manual here .

background
.
Shanghai Smart Control Co., Ltd
上海宏英智能科技股份有限公司
10.4'' Display
User Manual
background
.
Shanghai Smart Control Co., Ltd
上海宏英智能科技股份有限公司
Page 2/34
网址:www.smartsh.com
+86 021-5186 2016
传真:
+86 021-3782 9910
电话:
地址:上海市松江区九泾路 470 A
Web: www.smartsh.com
Tel: +86 021-3782 9910 Fax: +86 021-5186 2016
Add:Tower A,No.470,JiuJing Rd,Shanghai,China
Contents
1 Technical Parameters ���������������������������������������������������������������������������������������������������������������������������������� 3
2 Interface Definition�������������������������������������������������������������������������������������������������������������������������������������� 4
3 Installation Dimensions������������������������������������������������������������������������������������������������������������������������������� 5
4 Attention �������������������������������������������������������������������������������������������������������������������������������������������������������� 6
5 Connector Accessories Selection List������������������������������������������������������������������������������������������������������� 7
Appendix I Demo Description ���������������������������������������������������������������������������������������������������������������������������� 8
(1) Bluetooth����������������������������������������������������������������������������������������������������������������������������������������������������� 8
(2) CAN Initialization �������������������������������������������������������������������������������������������������������������������������������������25
(3) CAN Reception������������������������������������������������������������������������������������������������������������������������������������������25
(4) CAN Transmission������������������������������������������������������������������������������������������������������������������������������������26
(5) Video�����������������������������������������������������������������������������������������������������������������������������������������������������������28
(6) WiFi �������������������������������������������������������������������������������������������������������������������������������������������������������������31
Appendix II FCC Warning ������������������������������������������������������������������������������������������������������������������������������������34
background
Page 3/34
1
Technical Parameters
Kernel
Processor Cortex-A9 Dual-Core
Frequency 1GHz
RAM 1GB
FLASH 4GB
Software
Operating System Linux
Development Platform CODESYS V3.5
Display
Size 10.4''
Resolution 1024*768
Brightness 600cd/m
2
HMI
Function Keys Front panel standard 8
Touch Screen Resistance
Environmental Parameter
Operating Temperature -30℃ ~ +70℃
Storage Temperature -40℃ ~ +80℃
Degree of Protection IP65
Electrical Parameter
Operating Voltage 12 32V DC
Power Consumption 530mA@24VDC
Functional Parameters
CAN CAN 2
Ethernet 10/100 Base-T 1
Video 720P AHD 4
Audio MIC Input, HP Output 1
WIFI AP/STA Mode 1
Bluetooth Voice Call, Music Play 1
EMC
Electrical transient conducted
immunity along the power line
GB/T 21437.2-2021 (ISO 7637-2:2011)
Electrical transient immunity of
non-power line coupling
GB/T 21437.3-2021 (ISO 7637-3:2016)
ESD GB/T 19951-2019(ISO 10605:2008)
EFT GB/T 17626.4-2018(IEC 61000-4-4:2012)
Mechanical Stresses
Random Vibration GB/T 2423.56-2018 (IEC 60068-2-64:2008)
Mechanical Shock GB/T 2423.5-2019 (IEC 60068-2-27-2008)
Sine Vibration GB/T 2423.10-2019 ( IEC 60068-2-6:2007)
Environmental Stresses
Triple Combination (vibration,
temperature, humidity)
GB/T 2423.35-2019(IEC 60068-2-53-2010)
Alternating Humid Heat GB/T 2423.4-2008 (IEC 60068-2-30:2005)
Temperature Shock GB/T 2423.22-2012 (IEC 60068-2-14:2009)
Enclosure Protection Grade GB/T 4208-2017(IEC 60529:2013)
Resistant to salt spray
corrosion and penetration
GB/T 2423.17-2008 (IEC 60068-2-11:1981)
background
Page 4/34
Port Function Note Port Diagram
1 24VDC Positive
2 24VDC Positive
3 GND Negative
4 GND Negative
Power Supply
Port Function Note Port Diagram
1 RX- Ethernet
2 TX- Ethernet
3 TX+ Ethernet
4 RX+ Ethernet
5 +5V USB
6 D- USB
7 D+ USB
8 GND USB
DOWNLOAD
Port Function Note Port Diagram
1 VIDEO 1
Video
2 VIDEO 2
Video
3 VIDEO 3
Video
4 VIDEO 4
Video
5 GND
Video Power Ground
MULT1 Video
2 Interface Definition
Port Function Note Port Diagram
1 Audio-IN Audio Input
2 Audio-OUT Audio Output
3 Audio-GND Audio Signal Ground
4 CAN_H1 CAN1_H
5 CAN_L1 CAN1_L
CAN1 Port - Audio
Port Function Note Port Diagram
1 12V 12V Power Supply
2 / /
3 / /
4 CAN_H2 CAN2_H
5 CAN_L2 CAN2_L
CAN2 Port
Notes:
Video power ground for camera power supply. Audio signal ground for audio signal use,
not as audio power ground.
background
.
Shanghai Smart Control Co., Ltd
上海宏英智能科技股份有限公司
Page 5/34
网址:www.smartsh.com
+86 021-5186 2016
传真:
+86 021-3782 9910
电话:
地址:上海市松江区九泾路 470 A
Web: www.smartsh.com
Tel: +86 021-3782 9910 Fax: +86 021-5186 2016
Add:Tower A,No.470,JiuJing Rd,Shanghai,China
3 Installation Dimensions
background
.
Shanghai Smart Control Co., Ltd
上海宏英智能科技股份有限公司
Page 9/34
网址:www.smartsh.com
+86 021-5186 2016
传真:
+86 021-3782 9910
电话:
地址:上海市松江区九泾路 470 A
Web: www.smartsh.com
Tel: +86 021-3782 9910 Fax: +86 021-5186 2016
Add:Tower A,No.470,JiuJing Rd,Shanghai,China
1)When the environment where the display is located requires soldering, all display connection cables
need to be physically disconnected before such work is performed, otherwise the display will be burned.
2)The display should only be operated by trained and qualified personnel. Smart Control cannot
guarantee the validity of its warranty if this product is damaged due to improper operation by non-
professional personnel.
3)The display of the car display terminal will be easily scratched or seriously damaged if it is rubbed with
sharp or hard objects. In order to ensure the service life of the display, this situation should be avoided.
4)The display of the monitor can be easily damaged in high temperatures, so please do not cover it with
other objects, such as jackets or other clothing.
5)The display should preferably be installed under a cover to avoid exposure to liquids. For safety
reasons, the vehicle-mounted display terminal should preferably be mounted on a stable object and
should be prevented from moving, otherwise it is susceptible to traffic accidents that could damage the
device or injure the operator.
6)Installation of the monitor: It is recommended to tilt a certain angle to install, using bracket installation
or embedded mounting plate, as shown in the figure below.
Horizontal installation is not recommended, because horizontal installation will cause visual
inconvenience, and once there is rain or liquid attached to the surface of the LCD screen, it can not flow
away in time, affecting the touch. Please do not press the mounting plate in the monitor touch screen
bezel, once pressed to the critical touch area, it will cause touch drift or failure.
6 Attentions
7) In the process of programming with Codesys 3.5, note that the name of the image called must be English or
numeric.
8)The display does not support mouse, keyboard and other peripherals, do not connect the mouse, keyboard and
other peripherals when the power is on, there is a chance that the display will cause abnormalities.
9)If using the "plclogic" folder to update the application, please make sure that the copy of the file is complete and
not damaged, and that the new version of the program file uses unofficial library files to ensure that the same version
as the original display, otherwise the display may be stuck at the boot logo and cannot enter the system.
background
上海宏英智能科技股份有限公司
Shanghai Smart Control Co., Ltd
.
Page 7/34
Add:Tower A,No.470,JiuJing Rd,Shanghai,China
Tel: +86 021-3782 9910 Fax: +86 021-5186 2016
Web: www.smartsh.com
地址:上海市松江区九泾路 470 A
电话:
+86 021-3782 9910
传真:
+86 021-5186 2016
网址:www.smartsh.com
5 Connector Accessories Selection List
background
上海宏英智能科技股份有限公司
Shanghai Smart Control Co., Ltd
.
Page 8/34
Add:Tower A,No.470,JiuJing Rd,Shanghai,China
Tel: +86 021-3782 9910 Fax: +86 021-5186 2016
Web: www.smartsh.com
地址:上海市松江区九泾路 470 A
电话:
+86 021-3782 9910
传真:
+86 021-5186 2016
网址:www.smartsh.com
Appendix I Demo Description
:F_TRIG;
:F_TRIG;
:BOOL;
:bool;
:F_TRIG;
:BOOL;
:BOOL;
:BOOL;
:BOOL;
:BYTE := 4;
:BYTE;
:BOOL;
:STRING[40];
: HY_BT.BTCmdResponse;
:INT;
HY_Radio 1.0.0.2
Standard 3.5.14.0
SysMem23 3.5.13.0
SysPlcCtrl23 3.5.13.0 
F_TRIG_Back
F_TRIG_BackMain
BackButton
BackMainButton
F_TRIG_OpenBT
OpenBTButton
FM_Result
OpenBT
BTOpenResult
bt_uart_port
Reqcmd
req_ret
BT_Name
Response
ShowBTID
Related Functions:
SysRestoreRetains(stFileName);
HY_BT.Sys_BT_Open(port,protocol);
HY_RADIO.Sys_Radio_Close(reserved);
HY_BT.Sys_BT_Close(reserved);
HY_BT.Sys_BT_GetCmdResponse(cmd,resp);
HY_BT.Sys_BT_ExecCommandByte(pcmdbyte,len);
Concat(STR1,STR2);
LEN(STR);
DELETE(STR,LEN,POS);
SysMemSet(dwDest,bCharacter,dwCount);
Related Libraries:HY_BT 1.0.0.4
BTCloseResult :BOOL;
(1) Bluetooth
Variable Declaration:
background
上海宏英智能科技股份有限公司
Shanghai Smart Control Co., Ltd
.
Page 9/34
Add:Tower A,No.470,JiuJing Rd,Shanghai,China
Tel: +86 021-3782 9910 Fax: +86 021-5186 2016
Web: www.smartsh.com
地址:上海市松江区九泾路 470 A
电话:
+86 021-3782 9910
传真:
+86 021-5186 2016
网址:www.smartsh.com
BT_ConnectState :BOOL;
bt_status :INT;
BT_CallInFlag :BOOL;
BT_CallOutFlag :BOOL;
callin_tel :HY_BT.BTCmdResponse;
callout_tel :HY_BT.BTCmdResponse;
Telephone_Callin :STRING[64];
F_TRIG_GetCall :F_TRIG;
GetCallButton :BOOL;
CallAct :BOOL;
cmd_buf : ARRAY [0..255] OF BYTE;
send_ret :INT;
DelayShow :INT;
ShowPoint :INT;
BLINK_TIME :BLINK;
CallTimeSencond :INT;
CallTimeMinte :INT;
BLINK_RTIRG :R_TRIG;
F_TRIG_NotCall :F_TRIG;
NotCallButton :BOOL;
TelephoneNum :STRING[40];
F_TRIG_Num :ARRAY [0..11] OF F_TRIG;
KeyPress :ARRAY [0..11] OF BOOL;
F_TRIG_CallOut :F_TRIG;
F_TRIG_NotCallOut :F_TRIG;
CallOutButton :BOOL;
NotCallOutButton :BOOL;
tel_number :ARRAY [1..32] OF BYTE;
tel_len :INT;
Pos :INT;
I :INT;
F_TRIG_OutCall :F_TRIG;
OutCallButton :BOOL;
music_status :INT;
music_a2dp_connect_flag: BOOL;
music_name_wstring :WSTRING(64);
music_name : HY_BT.BTCmdResponse;
music_lyric_wdata :WSTRING(64);
music_name_string :STRING[64];
background
上海宏英智能科技股份有限公司
Shanghai Smart Control Co., Ltd
.
Page 10/34
Add:Tower A,No.470,JiuJing Rd,Shanghai,China
Tel: +86 021-3782 9910 Fax: +86 021-5186 2016
Web: www.smartsh.com
地址:上海市松江区九泾路 470 A
电话:
+86 021-3782 9910
传真:
+86 021-5186 2016
网址:www.smartsh.com
music_name_len
music_name_byte
music_times_ms
music_total_time
music_step
music_time_step_ms
TimeSecond
DisplayTotalTime
F_TRIG_StartMusic
OpenMusicButton
MusicOpen
DisplayNowTime
MoveState
music_lyric
music_lyric_string
music_lyric_len
music_lyric_byte
TelePhone_CallOut
BT_Volume_Old
R_TRIG_InitBT
Init_BT
Test
R_TRIG_Start
BT_CallingFlag
DisplayVolume
DisplayCallTime
F_TRIG_NextSong
F_TRIG_LastSong
F_TRIG_VolumeUp
F_TRIG_VolumeDown
DelayShowCount
ShowID
VAR_GLOBAL
BT_Volume:BYTE;
END_VAR
:INT;
:ARRAY [1..64] OF BYTE;
:DWORD;
:HY_BT.BTCmdResponse;
:HY_BT.BTCmdResponse;
:DWORD;
:INT;
:STRING[20];
:F_TRIG;
:BOOL;
:BOOL;
:STRING[20];
:REAL;
:HY_BT.BTCmdResponse;
:STRING;
:INT;
:ARRAY [1..64] OF BYTE;
:STRING[20];
:BYTE;
:R_TRIG;
:BOOL;
:INT;
:R_TRIG;
:BOOL;
:BYTE;
:STRING[20];
:F_TRIG;
:F_TRIG;
:F_TRIG;
:F_TRIG;
:INT;
:INT;
RETAIN
// Bluetooth Sound
VAR_GLOBAL
During_Day:BOOL; // Bluetooth Interface
NextSongButton:BOOL;
LastSongButton:BOOL;
background
上海宏英智能科技股份有限公司
Shanghai Smart Control Co., Ltd
.
Page 11/34
Add:Tower A,No.470,JiuJing Rd,Shanghai,China
Tel: +86 021-3782 9910 Fax: +86 021-5186 2016
Web: www.smartsh.com
地址:上海市松江区九泾路 470 A
电话:
+86 021-3782 9910
传真:
+86 021-5186 2016
网址:www.smartsh.com
BTVolumeUpButton:BOOL;
BTVolumeDNButton:BOOL;
// Jump to the Bluetooth Interface
// Jump to the ENTMAIN Interface
// Jump to the Mainpage Interface
// Turn on Bluetooth
// Answer the Phone Button
// Dialing out Calls
// Backspace to delete 1 entered number
// Hang up the Phone
// Play, Pause Music
// Next Song
// Previous Song
// Volume+
// Volume-
END_VAR
Code Implementation:
R_TRIG_InitBT(CLK:=VisuElems.CurrentVisu='BT_PAGE');
F_TRIG_Back(CLK:=BackButton);
F_TRIG_BackMain(CLK:=BackMainButton);
F_TRIG_OpenBT(CLK:=OpenBTButton);
F_TRIG_GetCall(CLK:=GetCallButton);
F_TRIG_CallOut(CLK:=CallOutButton);
F_TRIG_NotCallOut(CLK:=NotCallOutButton);
F_TRIG_OutCall(CLK:=OutCallButton);
F_TRIG_StartMusic(CLK:=OpenMusicButton);
F_TRIG_NextSong(CLK:=NextSongButton);
F_TRIG_LastSong(CLK:=LastSongButton);
F_TRIG_VolumeUp(CLK:=BTVolumeUpButton);
F_TRIG_VolumeDown(CLK:=BTVolumeDNButton);
(*Bluetooth Initialisation*)
IF R_TRIG_InitBT.Q THEN
SysRestoreRetains(FileName);
BT_Volume_Old:=BT_Volume;
ShowBTID:=1;
// Get the last set volume
// "Turn on Bluetooth" is displayed after initialisation
END_IF
IF VisuElems.CurrentVisu='BT_PAGE' THEN
IF F_TRIG_OpenBT.Q THEN
BTOpenResult:=FALSE;
// Turn on Bluetooth
BTCloseResult:=FALSE;
IF NOT FM_Result THEN
FM_Result:=HY_RADIO.Sys_Radio_Close(0);// Turn on Bluetooth and Turn off the Radio
END_IF
OpenBT:=NOT OpenBT;
IF OpenBT THEN
// Turn on Bluetooth
BTOpenResult:=HY_BT.Sys_BT_Open(bt_uart_port, 16#80);
ELSE
BTCloseResult:= HY_BT.Sys_BT_Close(0);
// Turn off Bluetooth
END_IF
background
上海宏英智能科技股份有限公司
Shanghai Smart Control Co., Ltd
.
Page 12/34
Add:Tower A,No.470,JiuJing Rd,Shanghai,China
Tel: +86 021-3782 9910 Fax: +86 021-5186 2016
Web: www.smartsh.com
地址:上海市松江区九泾路 470 A
电话:
+86 021-3782 9910
传真:
+86 021-5186 2016
网址:www.smartsh.com
END_IF
IF BTCloseResult THEN
BTOpenResult:=FALSE;
// Turn off Bluetooth, clear open function return value
END_IF
IF BTOpenResult THEN
ShowBTID:=0;
// Turn on Bluetooth, display "Turn off Bluetooth"
END_IF
IF BTCloseResult THEN
ShowBTID:=1;
// Turn off Bluetooth, display "Turn on Bluetooth"
END_IF
IF BTOpenResult THEN
// Bluetooth is switched on
reqcmd := INT_TO_BYTE(HY_BT.BT_REQUEST_CMD.ENUM_BT_REQUEST_GET_BT_CONNECT_
STATUS);
req_ret := HY_BT.Sys_BT_GetCmdResponse(reqcmd, ADR(response));// Get Bluetooth connection status
IF req_ret THEN
BT_ConnectState := TO_BOOL(TO_INT(response.data));
// Connection status
req_ret := HY_BT.Sys_BT_GetCmdResponse(reqcmd, ADR(response));
END_IF
reqcmd := INT_TO_BYTE(HY_BT.BT_REQUEST_CMD.ENUM_BT_REQUEST_GET_BT_NAME);// Get
Bluetooth Name
IF req_ret THEN
BT_Name := response.data;
// Bluetooth Name
END_IF
ELSE
BT_ConnectState:=FALSE;
END_IF
IF BT_ConnectState THEN
// Bluetooth is connected
IF NOT Init_BT THEN
cmd_buf[0] := INT_TO_BYTE(HY_BT.BT_ACTION.ENUM_BT_REQUEST_SET_SYSTEM_
VOLUME);// System Volume
cmd_buf[1] := INT_TO_BYTE(HY_BT.BT_ACTION.ENUM_BT_REQUEST_SET_SYSTEM_
VOLUME);// Bluetooth Volume
background
上海宏英智能科技股份有限公司
Shanghai Smart Control Co., Ltd
.
Page 13/34
Add:Tower A,No.470,JiuJing Rd,Shanghai,China
Tel: +86 021-3782 9910 Fax: +86 021-5186 2016
Web: www.smartsh.com
地址:上海市松江区九泾路 470 A
电话:
+86 021-3782 9910
传真:
+86 021-5186 2016
网址:www.smartsh.com
cmd_buf[2] := BT_Volume;
cmd_buf[3] := 16#D;
// Bluetooth Volume
cmd_buf[4] := 16#A;
send_ret := HY_BT.Sys_BT_ExecCommandByte(ADR(cmd_buf), 5);
Init_BT:=TRUE;
END_IF
BT_CallInFlag := bt_status.1 ;
BT_CallOutFlag := bt_status.2;
// Get Bluetooth phone status
reqcmd := INT_TO_BYTE(HY_BT.BT_REQUEST_CMD.ENUM_BT_REQUEST_GET_CALL_STATUS);
req_ret := HY_BT.Sys_BT_GetCmdResponse(reqcmd, ADR(response));
bt_status := TO_INT(response.data);
// Incoming calls
// O utgoing calls
BT_CallingFlag := bt_status.0;
IF BT_CallInFlag THEN
// Incoming calls
reqcmd := INT_TO_BYTE(HY_BT.BT_REQUEST_CMD.ENUM_BT_REQUEST_GET_CALLIN_
TELEPHONE);
req_ret := HY_BT.Sys_BT_GetCmdResponse(reqcmd, ADR(callin_tel));
IF req_ret THEN
Telephone_Callin := callin_tel.data;
// Get the incoming phone number
END_IF
IF F_TRIG_GetCall.Q THEN
// Answering the phone
CallAct:=TRUE;
cmd_buf[0] := INT_TO_BYTE(HY_BT.BT_ACTION.ENUM_BT_ACTION_CALL);
cmd_buf[1] := INT_TO_BYTE(HY_BT.BT_CALL_MODE.ENUM_BT_CALL_ANSWER);
cmd_buf[2] := 16#D;
cmd_buf[3] := 16#A;
send_ret := HY_BT.Sys_BT_ExecCommandByte(ADR(cmd_buf), 4);
END_IF
IF CallAct THEN
IF F_TRIG_OutCall.Q THEN
cmd_buf[0] := INT_TO_BYTE(HY_BT.BT_ACTION.ENUM_BT_ACTION_CALL);
cmd_buf[1] := INT_TO_BYTE(HY_BT.BT_CALL_MODE.ENUM_BT_CALL_HANG
// Answer
// Hang up
_UP);
background
上海宏英智能科技股份有限公司
Shanghai Smart Control Co., Ltd
.
Page 14/34
Add:Tower A,No.470,JiuJing Rd,Shanghai,China
Tel: +86 021-3782 9910 Fax: +86 021-5186 2016
Web: www.smartsh.com
地址:上海市松江区九泾路 470 A
电话:
+86 021-3782 9910
传真:
+86 021-5186 2016
网址:www.smartsh.com
cmd_buf[2] := 16#D;
cmd_buf[3] := 16#A;
send_ret := HY_BT.Sys_BT_ExecCommandByte(ADR(cmd_buf), 4);
CallAct:=FALSE;
OutCallButton:=FALSE;
END_IF
ELSE
IF F_TRIG_OutCall.Q THEN
cmd_buf[0] := INT_TO_BYTE(HY_BT.BT_ACTION.ENUM_BT_ACTION_CALL);
cmd_buf[1] := INT_TO_BYTE(HY_BT.BT_CALL_MODE.ENUM_BT_CALL_REFUSE);
cmd_buf[2] := 16#D;
cmd_buf[3] := 16#A;
send_ret := HY_BT.Sys_BT_ExecCommandByte(ADR(cmd_buf), 4);
CallAct:=FALSE;
// Refusal to answer
OutCallButton:=FALSE;
END_IF
END_IF
BLINK_TIME(ENABLE:=CallAct,TIMEHIGH:=T#500MS,TIMELOW:=T#500MS);// Call Duration
BLINK_RTIRG(CLK:=BLINK_TIME.OUT);
IF BLINK_RTIRG.Q THEN
CallTimeSencond:=CallTimeSencond+1;
// Call Duration
// Second
IF CallTimeSencond>59 THEN
CallTimeMinte:=CallTimeMinte+1;
// Minute
CallTimeSencond:=0;
END_IF
END_IF
IF CallAct THEN
DisplayCallTime:='';
// Connected - call duration display
IF CallTimeMinte<10 THEN
DisplayCallTime:=concat('0',TO_STRING(CallTimeMinte));
DisplayCallTime:=concat(DisplayCallTime,':');
ELSE
DisplayCallTime:=concat(TO_STRING(CallTimeMinte),':');
END_IF
IF CallTimeSencond<10 THEN
background
上海宏英智能科技股份有限公司
Shanghai Smart Control Co., Ltd
.
Page 15/34
Add:Tower A,No.470,JiuJing Rd,Shanghai,China
Tel: +86 021-3782 9910 Fax: +86 021-5186 2016
Web: www.smartsh.com
地址:上海市松江区九泾路 470 A
电话:
+86 021-3782 9910
传真:
+86 021-5186 2016
网址:www.smartsh.com
DisplayCallTime:=concat(DisplayCallTime,'0');
DisplayCallTime:=concat(DisplayCallTime,TO_STRING(CallTimeSencond));
ELSE
DisplayCallTime:=concat(DisplayCallTime,TO_STRING(CallTimeSencond));
END_IF
END_IF
IF NOT CallAct THEN
CallTimeSencond:=0;
CallTimeMinte:=0;
// Call not answered - ringing dots
DelayShow:=DelayShow+1;
IF DelayShow>50 THEN
ShowPoint:=ShowPoint+1;
DelayShow:=0;
END_IF
IF ShowPoint>3 THEN
ShowPoint:=0;
END_IF
ELSE
ShowPoint:=0;
DelayShow:=0;
END_IF
ELSE
CallAct:=FALSE;
END_IF
IF BT_CallOutFlag THEN
// Have a call out
reqcmd := INT_TO_BYTE(HY_BT.BT_REQUEST_CMD.ENUM_BT_REQUEST_GET_CALLOUT_
TELEPHONE);
req_ret := HY_BT.Sys_BT_GetCmdResponse(reqcmd, ADR(callout_tel));
IF req_ret THEN
TelePhone_CallOut := callout_tel.data;
// Dial outgoing phone number display
END_IF
IF F_TRIG_OutCall.Q THEN
cmd_buf[0] := INT_TO_BYTE(HY_BT.BT_ACTION.ENUM_BT_ACTION_CALL);
cmd_buf[1] := INT_TO_BYTE(HY_BT.BT_CALL_MODE.ENUM_BT_CALL_HANG
// Hang up the phone
_UP);
background
上海宏英智能科技股份有限公司
Shanghai Smart Control Co., Ltd
.
Page 16/34
Add:Tower A,No.470,JiuJing Rd,Shanghai,China
Tel: +86 021-3782 9910 Fax: +86 021-5186 2016
Web: www.smartsh.com
地址:上海市松江区九泾路 470 A
电话:
+86 021-3782 9910
传真:
+86 021-5186 2016
网址:www.smartsh.com
cmd_buf[2] := 16#D;
cmd_buf[3] := 16#A;
send_ret := HY_BT.Sys_BT_ExecCommandByte(ADR(cmd_buf), 4);
END_IF
IF NOT BT_CallingFlag THEN
CallTimeSencond:=0;
CallTimeMinte:=0;
// Dialing out and waiting for a call to be answered
DelayShow:=DelayShow+1;
IF DelayShow>50 THEN
ShowPoint:=ShowPoint+1;
DelayShow:=0;
END_IF
IF ShowPoint>3 THEN
ShowPoint:=0;
END_IF
ELSE
ShowPoint:=0;
DelayShow:=0;
END_IF
BLINK_TIME(ENABLE:=BT_CallingFlag,TIMEHIGH:=T#500MS,TIMELOW:=T#500MS);
BLINK_RTIRG(CLK:=BLINK_TIME.OUT);
IF BLINK_RTIRG.Q THEN
// Dial out connection time
CallTimeSencond:=CallTimeSencond+1;
IF CallTimeSencond>59 THEN
CallTimeMinte:=CallTimeMinte+1;
CallTimeSencond:=0;
END_IF
END_IF
DisplayCallTime:='';
IF CallTimeMinte<10 THEN
DisplayCallTime:=concat('0',TO_STRING(CallTimeMinte));
DisplayCallTime:=concat(DisplayCallTime,':');
ELSE
DisplayCallTime:=concat(TO_STRING(CallTimeMinte),':');
background
上海宏英智能科技股份有限公司
Shanghai Smart Control Co., Ltd
.
Page 17/34
Add:Tower A,No.470,JiuJing Rd,Shanghai,China
Tel: +86 021-3782 9910 Fax: +86 021-5186 2016
Web: www.smartsh.com
地址:上海市松江区九泾路 470 A
电话:
+86 021-3782 9910
传真:
+86 021-5186 2016
网址:www.smartsh.com
END_IF
IF CallTimeSencond<10 THEN
DisplayCallTime:=concat(DisplayCallTime,'0');
DisplayCallTime:=concat(DisplayCallTime,TO_STRING(CallTimeSencond));
ELSE
DisplayCallTime:=concat(DisplayCallTime,TO_STRING(CallTimeSencond));
END_IF
END_IF
NOT BT_CallInFlag AND NOT BT_CallOutFlag THEN
IF
// Dialing
 in the absence of a telephone
TelephoneNumString();
// Phone Number
IF F_TRIG_CallOut.Q AND
SysMemSet(ADR(tel_number), 0, 16);
tel_len := LEN(TelephoneNum);
pos := 0;
TelephoneNum<>''THEN // Making a phone call
FOR i:=1 TO tel_len BY 1 DO
BYTE(MID(TelephoneNum, 1, pos))));
pos := pos + 1;
tel_number[i] := WORD_TO_BYTE(BYTE_TO_HEXinASCII(TO_
END_FOR
cmd_buf[0] := INT_TO_BYTE(HY_BT.BT_ACTION.ENUM_BT_ACTION_CALL);
cmd_buf[1] := INT_TO_BYTE(HY_BT.BT_CALL_MODE.ENUM_BT_CALL_ASK);
SysMemCpy(ADR(cmd_buf[2]), ADR(tel_number), tel_len);
cmd_buf[tel_len+2] := 16#D;
cmd_buf[tel_len+3] := 16#A;
send_ret := HY_BT.Sys_BT_ExecCommandByte(ADR(cmd_buf), tel_len+4);
END_IF
IF F_TRIG_NotCallOut.Q AND LEN(TelephoneNum)>0 THEN
// Delete 
1 digit number
TelephoneNum:=DELETE(TelephoneNum,1,LEN(TelephoneNum));
END_IF
END_IF
background
上海宏英智能科技股份有限公司
Shanghai Smart Control Co., Ltd
.
Page 18/34
Add:Tower A,No.470,JiuJing Rd,Shanghai,China
Tel: +86 021-3782 9910 Fax: +86 021-5186 2016
Web: www.smartsh.com
地址:上海市松江区九泾路 470 A
电话:
+86 021-3782 9910
传真:
+86 021-5186 2016
网址:www.smartsh.com
music_status := TO_INT(response.data);
// Get Bluetooth Music Status
reqcmd := INT_TO_BYTE(HY_BT.BT_REQUEST_CMD.ENUM_BT_REQUEST_GET_MUSIC_STATUS);
req_ret := HY_BT.Sys_BT_GetCmdResponse(reqcmd, ADR(response));
IF req_ret THEN
music_a2dp_connect_flag := music_status.0;
MusicOpen := music_status.1;
// Play Music
END_IF
R_TRIG_Start(CLK:=music_time_step_ms>0);
IF music_a2dp_connect_flag THEN
IF R_TRIG_Start.Q THEN
MusicOpen:=TRUE;
END_IF
IF F_TRIG_StartMusic.Q THEN
MusicOpen:=NOT MusicOpen;
IF MusicOpen THEN
cmd_buf[0] := INT_TO_BYTE(HY_BT.BT_ACTION.ENUM_BT_ACTION_MUSIC);
cmd_buf[1] := INT_TO_BYTE(HY_BT.BT_MUSIC_MODE.ENUM_BT_MUSIC_
START);
cmd_buf[2] := 16#D;
cmd_buf[3] := 16#A;
send_ret := HY_BT.Sys_BT_ExecCommandByte(ADR(cmd_buf), 4);
ELSE
cmd_buf[0] := INT_TO_BYTE(HY_BT.BT_ACTION.ENUM_BT_ACTION_MUSIC);
cmd_buf[1] := INT_TO_BYTE(HY_BT.BT_MUSIC_MODE.ENUM_BT_MUSIC_
PAUSE);
cmd_buf[2] := 16#D;
cmd_buf[3] := 16#A;
send_ret := HY_BT.Sys_BT_ExecCommandByte(ADR(cmd_buf), 4);
END_IF
END_IF
background
上海宏英智能科技股份有限公司
Shanghai Smart Control Co., Ltd
.
Page 19/34
Add:Tower A,No.470,JiuJing Rd,Shanghai,China
Tel: +86 021-3782 9910 Fax: +86 021-5186 2016
Web: www.smartsh.com
地址:上海市松江区九泾路 470 A
电话:
+86 021-3782 9910
传真:
+86 021-5186 2016
网址:www.smartsh.com
IF MusicOpen THEN
DelayShowCount:=DelayShowCount+1;
IF DelayShowCount>40 THEN
ShowID:=ShowID+1;
IF ShowID>2 THEN
ShowID:=0;
END_IF
DelayShowCount:=0;
END_IF
ELSE
DelayShowCount:=0;
ShowID:=0;
END_IF
SysMemSet(ADR(music_name_wstring), 0, 128);
SysMemSet(ADR(music_lyric_wdata), 0, 128);
// Name of the Song
// Singer
// Get Bluetooth Music Song Name
reqcmd := INT_TO_BYTE(HY_BT.BT_REQUEST_CMD.ENUM_BT_REQUEST_GET_SONG_
NAME);
req_ret := HY_BT.Sys_BT_GetCmdResponse(reqcmd, ADR(music_name));
IF req_ret THEN
music_name_string := music_name.data;
//music_name_len := LEN(music_name_string);
music_name_len := music_name.size;
SysMemCpy(ADR(music_name_byte), ADR(music_name_string), music_name_len);
SysMemCpy(ADR(music_name_wstring), ADR(music_name_string), music_name_
len);
END_IF
music_lyric_string := music_lyric.data;
music_lyric_len := music_lyric.size;
SysMemCpy(ADR(music_lyric_byte), ADR(music_lyric_string), music
// Get the lyrics corresponding to a Bluetooth Music Song
reqcmd := INT_TO_BYTE(HY_BT.BT_REQUEST_CMD.ENUM_BT_REQUEST_GET_SONG_LYRIC);
req_ret := HY_BT.Sys_BT_GetCmdResponse(reqcmd, ADR(music_lyric));
IF req_ret THEN
_lyric_len);
background
上海宏英智能科技股份有限公司
Shanghai Smart Control Co., Ltd
.
Page 20/34
Add:Tower A,No.470,JiuJing Rd,Shanghai,China
Tel: +86 021-3782 9910 Fax: +86 021-5186 2016
Web: www.smartsh.com
地址:上海市松江区九泾路 470 A
电话:
+86 021-3782 9910
传真:
+86 021-5186 2016
网址:www.smartsh.com
SysMemCpy(ADR(music_lyric_wdata), ADR(music_lyric_string), music_lyric_len);
END_IF
// Get the total time that a Bluetooth music song has been playing (ms)
reqcmd := INT_TO_BYTE(HY_BT.BT_REQUEST_CMD.ENUM_BT_REQUEST_GET_SONG_
DURATION);
req_ret := HY_BT.Sys_BT_GetCmdResponse(reqcmd, ADR(music_total_time));
IF req_ret THEN
music_times_ms := TO_DWORD(music_total_time.data);
TimeSecond:=TO_INT(music_times_ms/1000);
DisplayTotalTime:='';
IF (TimeSecond/60)<10 THEN
DisplayTotalTime:=concat('0',TO_STRING(TimeSecond/60));
ELSE
DisplayTotalTime:=concat(DisplayTotalTime,TO_STRING(TimeSecond/60));
END_IF
DisplayTotalTime:=concat(DisplayTotalTime,':');
IF (TimeSecond MOD 60)<10 THEN
DisplayTotalTime:=concat(DisplayTotalTime,'0');
DisplayTotalTime:=concat(DisplayTotalTime,TO_STRING(TimeSecond MOD
60));
ELSE
DisplayTotalTime:=concat(DisplayTotalTime,TO_STRING(TimeSecond MOD 60));
END_IF
END_IF
// Get the progress of Bluetooth music song playing time
reqcmd := INT_TO_BYTE(HY_BT.BT_REQUEST_CMD.ENUM_BT_REQUEST_GET_SONG_
PROGRESS);
req_ret := HY_BT.Sys_BT_GetCmdResponse(reqcmd, ADR(music_step));
IF req_ret THEN
music_time_step_ms := TO_DWORD(music_step.data);
TimeSecond:=TO_INT(music_time_step_ms/1000);
IF TimeSecond<0 THEN
TimeSecond:=0;
background
上海宏英智能科技股份有限公司
Shanghai Smart Control Co., Ltd
.
Page 21/34
Add:Tower A,No.470,JiuJing Rd,Shanghai,China
Tel: +86 021-3782 9910 Fax: +86 021-5186 2016
Web: www.smartsh.com
地址:上海市松江区九泾路 470 A
电话:
+86 021-3782 9910
传真:
+86 021-5186 2016
网址:www.smartsh.com
END_IF
DisplayNowTime:='';
IF (TimeSecond/60)<10 THEN
DisplayNowTime:=concat('0',TO_STRING(TimeSecond/60));
ELSE
DisplayNowTime:=concat(DisplayNowTime,TO_STRING(TimeSecond/60));
END_IF
DisplayNowTime:=concat(DisplayNowTime,':');
IF (TimeSecond MOD 60)<10 THEN
DisplayNowTime:=concat(DisplayNowTime,'0');
DisplayNowTime:=concat(DisplayNowTime,TO_STRING(TimeSecond MOD
60));
ELSE
DisplayNowTime:=concat(DisplayNowTime,TO_STRING(TimeSecond MOD
60));
END_IF
END_IF
// Song Progress Bar
MoveState:=LIMIT(0,437.0*(TO_REAL(music_time_step_ms)/TO_REAL(music_times_
ms)),437);
F_TRIG_NextSong.Q
// Next Song
IF THEN
test:=test+1;
cmd_buf[0] := INT_TO_BYTE(HY_BT.BT_ACTION.ENUM_BT_ACTION_MUSIC);
cmd_buf[1] := INT_TO_BYTE(HY_BT.BT_MUSIC_MODE.ENUM_BT_MUSIC_PLAY_
NEXT_SONG);
cmd_buf[2] := 16#D;
cmd_buf[3] := 16#A;
send_ret := HY_BT.Sys_BT_ExecCommandByte(ADR(cmd_buf), 4);
END_IF
// Previous Song
IF F_TRIG_LastSong.Q THEN
background
上海宏英智能科技股份有限公司
Shanghai Smart Control Co., Ltd
.
Page 22/34
Add:Tower A,No.470,JiuJing Rd,Shanghai,China
Tel: +86 021-3782 9910 Fax: +86 021-5186 2016
Web: www.smartsh.com
地址:上海市松江区九泾路 470 A
电话:
+86 021-3782 9910
传真:
+86 021-5186 2016
网址:www.smartsh.com
cmd_buf[0] := INT_TO_BYTE(HY_BT.BT_ACTION.ENUM_BT_ACTION_MUSIC);
cmd_buf[1] := INT_TO_BYTE(HY_BT.BT_MUSIC_MODE.ENUM_BT_MUSIC_PLAY_
LAST_SONG);
cmd_buf[2] := 16#D;
cmd_buf[3] := 16#A;
send_ret := HY_BT.Sys_BT_ExecCommandByte(ADR(cmd_buf), 4);
END_IF
// Volume Increase
IF F_TRIG_VolumeUp.Q THEN
BT_Volume:=LIMIT(0,BT_Volume+1,10);
cmd_buf[0] := INT_TO_BYTE(HY_BT.BT_ACTION.ENUM_BT_REQUEST_SET_SYSTEM_
VOLUME);
cmd_buf[1] := INT_TO_BYTE(HY_BT.BT_ACTION.ENUM_BT_REQUEST_SET_SYSTEM_
VOLUME);
cmd_buf[2] := BT_Volume;
cmd_buf[3] := 16#D;
cmd_buf[4] := 16#A;
send_ret := HY_BT.Sys_BT_ExecCommandByte(ADR(cmd_buf), 5);
END_IF
F_TRIG_VolumeDown.Q THEN
// Volume Decrease
IF
IF BT_Volume > 0 THEN
BT_Volume:=LIMIT(0,BT_Volume-1,10);
END_IF
cmd_buf[0] := INT_TO_BYTE(HY_BT.BT_ACTION.ENUM_BT_REQUEST_SET_SYSTEM_
VOLUME);
cmd_buf[1] := INT_TO_BYTE(HY_BT.BT_ACTION.ENUM_BT_REQUEST_SET_SYSTEM_
VOLUME);
cmd_buf[2] := bt_volume;
cmd_buf[3] := 16#D;
cmd_buf[4] := 16#A;
send_ret := HY_BT.Sys_BT_ExecCommandByte(ADR(cmd_buf), 5);
END_IF
IF BT_Volume_Old<>BT_Volume THEN
background
上海宏英智能科技股份有限公司
Shanghai Smart Control Co., Ltd
.
Page 23/34
Add:Tower A,No.470,JiuJing Rd,Shanghai,China
Tel: +86 021-3782 9910 Fax: +86 021-5186 2016
Web: www.smartsh.com
地址:上海市松江区九泾路 470 A
电话:
+86 021-3782 9910
传真:
+86 021-5186 2016
网址:www.smartsh.com
SysSaveRetains(FileName);
(* Saving variable data to a regular file *)
BT_Volume_Old:=BT_Volume;
END_IF
END_IF
ELSE
CallAct:=FALSE;
ShowPoint:=0;
DelayShow:=0;
TelephoneNum:='';
END_IF
DisplayVolume:=BT_Volume*10;
END_IF
(* Number Entry *)
F_TRIG_Num[0](CLK:=KeyPress[0]);
F_TRIG_Num[1](CLK:=KeyPress[1]);
F_TRIG_Num[2](CLK:=KeyPress[2]);
F_TRIG_Num[3](CLK:=KeyPress[3]);
F_TRIG_Num[4](CLK:=KeyPress[4]);
F_TRIG_Num[5](CLK:=KeyPress[5]);
F_TRIG_Num[6](CLK:=KeyPress[6]);
F_TRIG_Num[7](CLK:=KeyPress[7]);
F_TRIG_Num[8](CLK:=KeyPress[8]);
F_TRIG_Num[9](CLK:=KeyPress[9]);
F_TRIG_Num[10](CLK:=KeyPress[10]);
F_TRIG_Num[11](CLK:=KeyPress[11]);
IF F_TRIG_Num[0].Q THEN
TelephoneNum:=concat(TelephoneNum,'0');
END_IF
IF F_TRIG_Num[1].Q THEN
TelephoneNum:=concat(TelephoneNum,'1');
END_IF
background
上海宏英智能科技股份有限公司
Shanghai Smart Control Co., Ltd
.
Page 24/34
Add:Tower A,No.470,JiuJing Rd,Shanghai,China
Tel: +86 021-3782 9910 Fax: +86 021-5186 2016
Web: www.smartsh.com
地址:上海市松江区九泾路 470 A
电话:
+86 021-3782 9910
传真:
+86 021-5186 2016
网址:www.smartsh.com
IF F_TRIG_Num[2].Q THEN
TelephoneNum:=concat(TelephoneNum,'2');
END_IF
IF F_TRIG_Num[3].Q THEN
TelephoneNum:=concat(TelephoneNum,'3');
END_IF
IF F_TRIG_Num[4].Q THEN
TelephoneNum:=concat(TelephoneNum,'4');
END_IF
IF F_TRIG_Num[5].Q THEN
TelephoneNum:=concat(TelephoneNum,'5');
END_IF
IF F_TRIG_Num[6].Q THEN
TelephoneNum:=concat(TelephoneNum,'6');
END_IF
IF F_TRIG_Num[7].Q THEN
TelephoneNum:=concat(TelephoneNum,'7');
END_IF
IF F_TRIG_Num[8].Q THEN
TelephoneNum:=concat(TelephoneNum,'8');
END_IF
IF F_TRIG_Num[9].Q THEN
TelephoneNum:=concat(TelephoneNum,'9');
END_IF
IF F_TRIG_Num[10].Q THEN
TelephoneNum:=concat(TelephoneNum,'*');
END_IF
IF F_TRIG_Num[11].Q THEN
TelephoneNum:=concat(TelephoneNum,'#');
END_IF
background
上海宏英智能科技股份有限公司
Shanghai Smart Control Co., Ltd
.
Page 25/34
地址:上海市松江区九泾路 470 A
电话:
+86 021-3782 9910
传真:
+86 021-5186 2016
Add:Tower A,No.470,JiuJing Rd,Shanghai,China
Tel: +86 021-3782 9910 Fax: +86 021-5186 2016
Web: www.smartsh.com
网址:www.smartsh.com
can1init:=HY_CAN.CANInit(0,250,2000);
END_IF
(2) CAN Initialization
Related Functions:
HY_CAN.CANInit(wDrvNr,wBauteRate,wBufferSize);
Related Libraries:HY_CAN 1.0.0.5
Variable Declaration:
can1init :BOOL;
can2init :BOOL;
Code Implementation:
IF NOT can1init THEN
//CAN1 initialisation with a baud rate of 250K
IF NOT can2init THEN
can2init:=HY_CAN.CANInit(1,250,2000); //CAN2 initialisation with a baud rate of 250K
END_IF
:HY_CAN.CAN_Message;
:ARRAY [1..15] OF HY_CAN.CAN_Message;
:HY_CAN.CAN_Message;
:BOOL;
:INT;
:BOOL;
:ARRAY [0..1] OF DWORD;
:DWORD;
Related Functions:
HY_CAN.MgrFindRecMessage(dwCOBId,wDrvNr,pBuffer);
Related Libraries:HY_CAN 1.0.0.5
(3) CAN Reception
Variable Declaration:
:BOOL;
rec_flag1 := HY_CAN.MgrFindRecMessage(0,0,ADR(CAN1Buffer));
// 100 cycles in one period to ensure that no frames are lost in reception
CAN1Buffer
CAN1Buffer_00
CAN1Buffer_18FF0200
rec_flag1
Count
CAN1_CONTROL
X
Z
clear_can1R
Code Implementation:
FOR count:=1 TO 100 BY 1 DO 
IF can1init THEN
// Receive CAN1 Telegrams
IF rec_flag1 THEN
CASE CAN1Buffer.dwID OF
16#001:
background
上海宏英智能科技股份有限公司
Shanghai Smart Control Co., Ltd
.
Page 26/34
Add:Tower A,No.470,JiuJing Rd,Shanghai,China
Tel: +86 021-3782 9910 Fax: +86 021-5186 2016
Web: www.smartsh.com
地址:上海市松江区九泾路 470 A
电话:
+86 021-3782 9910
传真:
+86 021-5186 2016
网址:www.smartsh.com
CAN1Buffer_00[1]:= CAN1Buffer;
X[1]:=X[1]+1;
16#38FF0200:
CAN1Buffer_18FF0200:= CAN1Buffer;
Z:=Z+1;
// Receive the telegram with ID 001H
// Receive a telegram with ID 18FF0200H, ID+20000000
when extending the frame
END_CASE
ELSE
count:=120;
// If not received then jump out of the loop
END_IF
END_IF
END_FOR
(4) CAN Transmission
//can1_send : HY_CAN.CanOpenWriteMSG_FB;
:DWORD;
:BOOL;
:HY_CAN.CanOpenWriteMSG_FB;
:BOOL;
:BOOL;
:BYTE;
:BOOL;
:ARRAY [1..20] OF DWORD;
:DWORD := 0;
  
Related Functions:
can1_send();
Related Libraries:HY_CAN 1.0.0.5 
Variable Declaration :
sendcnt
Init
can1_send
CAN1SEND
CAN_1S_ting
ASQW
CAN_1S
test_can
send_Count1
RST_SENDCAN1 :BOOL;
Code Implementation:
IF CAN1SEND THEN //CAN1 port data transmission
IF can1init THEN
CASE send_id1 OF
0:
test_can[1] := test_can[1]+1;
can1_send.wDrvNr := 0;
can1_send.bRtrFrame := 0;
// With ID=0, send 101,11 22 33 44 55 66 77 88 message
can1_send.pPointer8byte := ASQW;
background
上海宏英智能科技股份有限公司
Shanghai Smart Control Co., Ltd
.
Page 27/34
Add:Tower A,No.470,JiuJing Rd,Shanghai,China
Tel: +86 021-3782 9910 Fax: +86 021-5186 2016
Web: www.smartsh.com
地址:上海市松江区九泾路 470 A
电话:
+86 021-3782 9910
传真:
+86 021-5186 2016
网址:www.smartsh.com
can1_send.ucLen := 8;
can1_send.dwCanID := 101;
can1_send.ucByte1:= 16#11;
can1_send.ucByte2:= 16#22;
can1_send.ucByte3:= 16#33;
can1_send.ucByte4:= 16#44;
can1_send.ucByte5:= 16#55;
can1_send.ucByte6:= 16#66;
can1_send.ucByte7:= 16#77;
can1_send.ucByte8:= 16#88;
can1_send();
1:
test_can[2]:=test_can[2]+1;
can1_send.wDrvNr := 0;
can1_send.bRtrFrame := 0;
can1_send.pPointer8byte := ASQW;
can1_send.ucLen := 8;
can1_send.dwCanID := 201;
can1_send.ucByte1:=16#11;
can1_send.ucByte2:=16#22;
can1_send.ucByte3:=16#33;
can1_send.ucByte4:=16#44;
can1_send.ucByte5:=16#55;
can1_send.ucByte6:=16#66;
can1_send.ucByte7:=16#77;
can1_send.ucByte8:=16#88;
// Calling the send function
// With ID=1, send 201,11 22 33 44 55 66 77 88 message
can1_send();
END_CASE
END_IF
END_IF
background
上海宏英智能科技股份有限公司
Shanghai Smart Control Co., Ltd
.
Page 28/34
Add:Tower A,No.470,JiuJing Rd,Shanghai,China
Tel: +86 021-3782 9910 Fax: +86 021-5186 2016
Web: www.smartsh.com
地址:上海市松江区九泾路 470 A
电话:
+86 021-3782 9910
传真:
+86 021-5186 2016
网址:www.smartsh.com
(5) Video
cnt : DWORD;
video_need_init :BOOL ;
video_play : BOOL ;
video_close : BOOL;
act_read_fmt : BOOL;
init_result : BOOL;
insert_result : BOOL;
act_clear : BOOL := FALSE;
video_valid : BOOL;
chan : BYTE := 3;
x : DWORD := 420;
y : DWORD := 100;
w : DWORD := 400;
h : DWORD := 300;
fullscr : BYTE := 0;
play_flag : BOOL;
close_flag : BOOL;
video_fmt : INT := 255;
act_video_set : BOOL;
set_result : INT;
set_color : DWORD;
get_result : INT;
video_status : INT;
video_init_succeed : BOOL := FALSE;
video_cnt : DWORD := 0;
Related Functions:
HY_Video.Sys_Video_Init(video_channel,video_channel_count,video_input_format,video_input_interface);
HY_Video.Sys_Video_Query_Status(init_timeout_ms,reserved);
HY_Video.Sys_Video_Signal_Valid(channel,reserved);
HY_Video.Sys_Video_Play(channel,pos_x,pos_y,pos_w,pos_h,videoflag);
HY_Video.Sys_Video_Close(channel,flag);
HY_Video.Sys_Video_Set_Default_Format(fmt,reserved);
HY_Video.Sys_Video_Get_Default_Format(reserved);
Related Libraries:HY_Video 1.0.0.6
Variable Declaration:
try_times : DWORD;
background
上海宏英智能科技股份有限公司
Shanghai Smart Control Co., Ltd
.
Page 29/34
Add:Tower A,No.470,JiuJing Rd,Shanghai,China
Tel: +86 021-3782 9910 Fax: +86 021-5186 2016
Web: www.smartsh.com
地址:上海市松江区九泾路 470 A
电话:
+86 021-3782 9910
传真:
+86 021-5186 2016
网址:www.smartsh.com
init_result := HY_Video.Sys_Video_Init(0, 4, HY_Video.ENUM_FORMAT_720P, HY_Video.YUV_422);
Code Implementation:
IF video_need_init THEN // Initialisation Video
IF init_result THEN
video_need_init := FALSE;
END_IF
END_IF
video_status := HY_Video.Sys_Video_Query_Status(0, 0);
IF init_result AND NOT video_init_succeed THEN // Determine if video initialisation is complete
IF (video_status = 1) THEN
video_init_succeed := TRUE;
ELSE
video_cnt := video_cnt + 1;
END_IF
END_IF
IF video_init_succeed THEN
// Determining whether a video signal is connected
IF NOT insert_result THEN
try_times := try_times + 1;
insert_result := HY_Video.Sys_Video_Signal_Valid(chan, 0);
IF insert_result THEN
try_times := 0;
video_valid := TRUE;
ELSE
video_valid := FALSE;
END_IF
END_IF
IF video_valid THEN
// Show/Switch Video
IF video_play THEN
video_play := FALSE;
play_flag:=HY_Video.Sys_Video_Play(channel:=chan,pos_x:=x,pos_y:=y,pos_
w:=w,pos_h:=h, videoflag:=fullscr);
END_IF
IF video_close THEN
close_flag := HY_Video.Sys_Video_Close(chan, 0);
// Close Video
video_close := NOT close_flag;
background
上海宏英智能科技股份有限公司
Shanghai Smart Control Co., Ltd
.
Page 30/34
Add:Tower A,No.470,JiuJing Rd,Shanghai,China
Tel: +86 021-3782 9910 Fax: +86 021-5186 2016
Web: www.smartsh.com
地址:上海市松江区九泾路 470 A
电话:
+86 021-3782 9910
传真:
+86 021-5186 2016
网址:www.smartsh.com
END_IF
END_IF
END_IF
(* Setting the video format (0: 720P, 2: 1080P)
1: Setup successful
-1: Unsupported input formats
-2: Lower firmware version (kernel version greater than or equal to K11, SO library version greater than 1.0.0.6)
-3: Setup failed
The A8 7" and 10.1" displays are shipped with a default camera format of 720P.
(This function is only invoked to set the corresponding video mode when the external camera standard is changed, and must 
be restarted after successful setting*)
IF act_video_set THEN
set_result := HY_Video.Sys_Video_Set_Default_Format(video_fmt, 0);
// Video Format Setting
IF (set_result = 1) THEN
set_color := 16#FF00FF00;
ELSE
set_color := 16#FFC0C0C0;
END_IF
act_video_set := NOT act_video_set;
END_IF
IF NOT act_read_fmt THEN
get_result := HY_Video.Sys_Video_Get_Default_Format(0);
// Reading Video Format
IF (get_result >= 0) THEN
video_fmt := get_result;
END_IF
act_read_fmt := TRUE;
END_IF
background
上海宏英智能科技股份有限公司
Shanghai Smart Control Co., Ltd
.
Page 31/34
Add:Tower A,No.470,JiuJing Rd,Shanghai,China
Tel: +86 021-3782 9910 Fax: +86 021-5186 2016
Web: www.smartsh.com
地址:上海市松江区九泾路 470 A
电话:
+86 021-3782 9910
传真:
+86 021-5186 2016
网址:www.smartsh.com
(6) WiFi
wifi_loop : DWORD;
Workmode : BYTE := 1;
retry_times : DWORD := 0;
wifi_open_act : BOOL;
wifi_scan_act : BOOL;
wifi_connect_act : BOOL;
wifi_delete_act : BOOL;
wifi_ap_first_read : BOOL;
Related Functions:
HY_Wifi.Sys_Wifi_Open(mode,connected_ap,ip_sta);
HY_Wifi.Sys_Wifi_Close(reserved);
SysMemSet(dwDest,bCharacter,dwCount);
HY_Wifi.Sys_Wifi_Scan(result);
HY_Wifi.Sys_Wifi_Connect(ssid_name,passwd,ip_sta);
SysMemCpy(dwDest,dwSrc,dwCount);
HY_Wifi.Sys_Wifi_RemoveAP(ssid_name);
HY_Wifi.Sys_Wifi_AP_Get_AccountInfo(wifi_id,plogin_info);
HY_Wifi.Sys_Wifi_AP_Set_AccountInfo(wifi_id,login_info);
Related Libraries:SysMem23 3.5.13.0
HY_WIFI 1.0.0.5
Variable Declaration:
wifi_ap_read_info_act : BOOL;
wifi_ap_change_info_act : BOOL;
change_result : BOOL;
open_result : BOOL;
close_result : BOOL;
connect_result : BOOL;
delete_result : BOOL;
ap_scan_number : INT;
Aplist : HY_Wifi.WifiAPList;
Apscanlist : HY_Wifi.WifiScanResult;
Apinfo : HY_Wifi.WifiInfo;
Apuserinfo : HY_Wifi.WifiAPAccountInfo;
open_idx : INT := 0;
con_idx : INT := -1;
conn_state : INT := -1;
background
上海宏英智能科技股份有限公司
Shanghai Smart Control Co., Ltd
.
Page 32/34
Add:Tower A,No.470,JiuJing Rd,Shanghai,China
Tel: +86 021-3782 9910 Fax: +86 021-5186 2016
Web: www.smartsh.com
地址:上海市松江区九泾路 470 A
电话:
+86 021-3782 9910
传真:
+86 021-5186 2016
网址:www.smartsh.com
: STRING := '111';
: STRING := '123456789';
: BOOL := 0;
: INT := 0;
: INT := 3;
: HY_Wifi.NetIP;
: ARRAY[0..3] OF BYTE;
: DWORD := 16#FF000000;
: DWORD := 16#FF000000;
Ssid
Pwd
Flag
requery_cnt
max_cnt
Iparray
Ipaddr
Conncolor
Scancolor
Code Implementation:
IF wifi_open_act THEN
IF (open_idx = 0) THEN
open_result := HY_Wifi.Sys_Wifi_Open(workmode, ADR(aplist), ADR(iparray)); // Turn on wifi
as STATION mode
IF open_result THEN
open_idx := 1;
END_IF
ELSE
close_result := HY_Wifi.Sys_Wifi_Close(0);
// Turn off wifi as AP mode
IF close_result THEN
open_idx := 0;
con_idx := 2;
SysMemSet(ADR(iparray.addr), 0, 4);
END_IF
END_IF
wifi_open_act := FALSE;
END_IF
IF wifi_scan_act THEN
ap_scan_number := HY_Wifi.Sys_Wifi_Scan(result := ADR(apscanlist)); // Scanning hotspots number
wifi_scan_act := FALSE;
IF (ap_scan_number > 0) THEN
scancolor := 16#FF0000CC;
ELSE
scancolor := 16#FFFF0000;
END_IF
END_IF
background
上海宏英智能科技股份有限公司
Shanghai Smart Control Co., Ltd
.
Page 33/34
Add:Tower A,No.470,JiuJing Rd,Shanghai,China
Tel: +86 021-3782 9910 Fax: +86 021-5186 2016
Web: www.smartsh.com
地址:上海市松江区九泾路 470 A
电话:
+86 021-3782 9910
传真:
+86 021-5186 2016
网址:www.smartsh.com
IF wifi_connect_act THEN
retry_times := retry_times + 1;
SysMemSet(ADR(iparray.addr), 0, 4);
con_idx := -1;
connect_result := HY_Wifi.Sys_Wifi_Connect(ssid_name := ssid, passwd := pwd, ip_sta := ADR(iparray));
// wifi connection
IF connect_result OR retry_times > 0 THEN
wifi_connect_act:= FALSE;
retry_times := 0;
IF connect_result THEN
con_idx := 0;
conncolor := 16#FFFF00CC;
SysMemCpy(ADR(ipaddr), ADR(iparray.addr), 4);
// Obtaining an IP address
ELSE
con_idx := 1;
conncolor := 16#FFFF0000;
END_IF
END_IF
END_IF
IF wifi_delete_act THEN
delete_result := HY_Wifi.Sys_Wifi_RemoveAP(ssid_name := ssid);
wifi_delete_act := FALSE;
// Delete wifi hotspot
END_IF
IF wifi_ap_read_info_act OR NOT wifi_ap_first_read THEN
change_result := HY_Wifi.Sys_Wifi_AP_Get_AccountInfo(0, ADR(apuserinfo));
// Read Wifi AP username and password
wifi_ap_first_read := TRUE;
END_IF
IF wifi_ap_change_info_act THEN
change_result := HY_Wifi.Sys_Wifi_AP_Set_AccountInfo(0, apuserinfo);
// Update Wifi AP username and password
END_IF
background
上海宏英智能科技股份有限公司
Shanghai Smart Control Co., Ltd
.
Page 34/34
Add:Tower A,No.470,JiuJing Rd,Shanghai,China
Tel: +86 021-3782 9910 Fax: +86 021-5186 2016
Web: www.smartsh.com
地址:上海市松江区九泾路 470 A
电话:
+86 021-3782 9910
传真:
+86 021-5186 2016
网址:www.smartsh.com
This device complies with part 15 of the FCC rules. Operation is subject to the following two
conditions:
(1) this device may not cause harmful interference, and
(2) this device must accept any inte rference received, including interference that may cause
undesired operation.
Changes or modifications not expressly approved by the party responsible for compliance could void
the user's authority to operate the equipment.
NOTE: This equipment has been tested and found to comply with the limits for a Class B digital device,
pursuant to part 15 of the FCC Rules. These limits are designed to provide reasonable protection
against harmful interference in a Car installation. This equipment generates uses and can radiate
radio frequency energy and, if not installed and used in accordance with the instructions, may cause
harmful interference to radio communications. However, there is no guarantee that interference will
not occur in a particular installation. If this equipment does cause harmful interferenceto radio or
television reception,which can be determined by turning the equipment off and on, the user is
encouraged to try to correct the interference by one or more of the following measures:
-Reorient or relocate the receiving antenna.
·Increase the separation between the equipment and receiver.
·Connect the equipment into an outlet on a circuit different from that to which the receiver is
connected.
·Consult the dealer or an experienced radio/TV technician for help.
Radiation Exposure Statement
This equipment complies with FCC radiation exposure limits set forth for an uncontrolled
environment.This equipment should be installed and operated with minimum distance 2cm
Appendix II FCC Warning
between the radiator and your body.
background
1. Professional installation must be justified in the filing, and grant condition must state
This device
must be
professionally installed.
Description: Device is Display screen and must need special trained professional in configurating and
installing the product. More details please refer to user manual exhibits.
2. Professional installation does not permit use of any antenna with the transmitter; the permitted types of
antenna must be specified.
Description: Below listed of Antennas has been compliance FCC Rules Part 15 requirement, more details
please refer to test reports.Antenna Type: DipoleR-N Type Connector, Antenna Gain (dBi): 2400-2500MHz
3.0dBi
3. The applicant should address the following items when justifying professional installation.
i) To qualify for professional installation, the applicant must explain why the hardware
Description: Due to this product will not be sold directly to the general public through retail store
therefore the hardware is not readily available to average customer.
ii) Marketing
Device cannot be sold via retail to the general public or by mail order; it must be sold to
authorized dealers or installers only
Description: Due to this product will not be sold directly to the general public through retail store. It will
be sold to authorized declarers or install only.
iii) Filing must show that intended use is not for consumers and general public; rather device is
generally for industrial/commercial use.
Description: Device is for industrial/commercial use.
iv) Explain what is unique, sophisticated, complex, or specialized about the equipment that REQUIRES it
to be installed by a professional installer?
Description: Please be advised that due to the unique Market and function targeted by this product. this
product will need special trained professional in selecting the proper location, adjusting the antenna
anele on the outside pole or on the wall to satisfy the relevant rule requirements, we hereby declare that
the product will be distributed through controlled distribution channel which has special trained
professional to install this product and will not be sold directly to the general public through retail store
.
4. Other professional installation requirements
(1)
Installation must be controlled.
Description: The product will be distributed through controlled distribution channel which has special
trained professional to install this product.
(2) Installed by licensed professionals (
e.g.,
device sold to dealer who hire installers).
Description: Device sold to dealer who hires installers and need special trained professional in
configuring and installing the product.
(3) Installation requires special training (
e.g.,
special programming, access to keypad, field strength
measurements made).
Description: The product needs special programming. access to keypad. field strength measurements
made, so must need special trained professional in configuring and installing the product.

Specifications

Shanghai Smart Control ETOUCH Questions and Answers

Questions and Answers

Related Products