38 / 69
Web to serial test
Web to serial needs user’s webpage programming ability. Design webpage, request own device’s data
and process data then reveal the results on webpage. According to chapter4.1.17 Customized Webpage, can
download revised webpage into USR-N520 .
1. Build a connection and connect to USR-N520
function connectx(){
try{
socket=new WebSocket('ws://'+window.location.host+':6432');
socket.binaryType = "arraybuffer";
}catch(e){
alert('error');
return;
}
socket.onopen = sOpen;
socket.onerror=sError;
socket.onmessage=sMessage;
socket.onclose=sClose
}
2. Receive Data Function
function sMessage(msg)
3. Send data function
function send()
Содержание USR-N520
Страница 1: ...1 69 User Manual File Version V1 0 4 ...
Страница 17: ...17 69 UDP Client Software Configuration UDP Client Testing Screenshot ...
Страница 27: ...27 69 2 Set modbus slave software refer to the following ...
Страница 28: ...28 69 3 Return result for query command is as drawing ...
Страница 33: ...33 69 Drawing 26 Self Defined Heartbeat Function ...
Страница 35: ...35 69 2 Testing result ...
Страница 37: ...37 69 Web to Serial COM Send Receive Data ...
Страница 40: ...40 69 2 Set Printer Driver ...
Страница 59: ...59 69 Software Configuration Full Show ...
Страница 69: ...69 69 ...