Multi Trend in AX(HX view) - Engineer of NiagaraFramework

Tridium, NiagaraFramework, SCADA, HMI, PLC, Automation, SmartFAM etc.. About controls.
나이아가라 프레임워크 QnA : neverlikekami@gmail.com

2020년 8월 10일 월요일

Multi Trend in AX(HX view)

개요

고객이 실시간 멀티 트렌드를 요청했다. 그러나 시스템은 AX 버전이므로 기능을 지원하지 않았다. 그래서 다른 방법을 생각했다. "내가 만든 HTML과 함께 HX를 사용하는 것은 어떻습니까?" 아주 일시적인 해결책이나 너무 간단하다

1) 스테이션에서 HTML 파일을 만들었습니다.
2) HTML 파일에서 이 코드를 따르십시오.

Source code

<html>
<head>
<title> </title>
<script type="text/javascript">
<!--
document.write(getTimeStamp() + '<br />');
function getTimeStamp() {
  var d = new Date();

  var s =
    leadingZeros(d.getFullYear(), 4) + '년' +
    leadingZeros(d.getMonth() + 1, 2) + '월' +
    leadingZeros(d.getDate(), 2) + '일 ' +

    leadingZeros(d.getHours(), 2) + '시' +
    leadingZeros(d.getMinutes(), 2) + '분' +
    leadingZeros(d.getSeconds(), 2)+ '초';

  return s;
}



function leadingZeros(n, digits) {
  var zero = '';
  n = n.toString();

  if (n.length < digits) {
    for (i = 0; i < digits - n.length; i++)
      zero += '0';
  }
  return zero + n;
}

    
//-->
</script>
</head>
<body>
<table>
  <tr>
    <td><iframe id="Chart"  title="RealTime Histories" width="900" height="440" src="./PxFile.px"></iframe></td>
    <td><iframe id="Chart"  title="RealTime Histories" width="900" height="440" src="./PxFile.px"></iframe></td>
  </tr>
  <tr>
    <td><iframe id="Chart"  title="RealTime Histories" width="900" height="440" src="./PxFile.px"></iframe></td>
    <td><iframe id="Chart"  title="RealTime Histories" width="900" height="440" src="./PxFile.px"></iframe></td>
  </tr>
    


</body>
</html>


3) 파이어폭스 브라우저를 설치합니다. 그리고 이전에 만든 HTML에 연결합니다.

확실히, 먼저 다중 차트가 포함된 Trend.px를 만들었습니다.




변경된 데이터의 개수를 실시간으로 알려줄 수 있습니다.

댓글 없음:

댓글 쓰기

Post list