Repository navigation
Expand file tree
/
Copy pathdemo-sfc.html
More file actions
126 lines (126 loc) · 6.08 KB
/
Copy pathdemo-sfc.html
File metadata and controls
126 lines (126 loc) · 6.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
<!doctype html>
<html lang="ko">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>L5X Ladder Studio — SFC Sample</title>
<link rel="stylesheet" href="app.css?v=20260916sfc4">
</head>
<body>
<div class="app-shell">
<header class="topbar">
<div class="brand">
<span class="brand-mark" aria-hidden="true"><i></i><i></i><i></i></span>
<div><strong>L5X Ladder Studio</strong><small>Sample sequential function chart</small></div>
</div>
<div class="top-actions">
<span id="fileBadge" class="file-badge">샘플 SFC 자동 로드</span>
<button id="textImportBtn" class="button dark">RLL 텍스트 → LD</button>
<label class="button primary" for="fileInput">L5X 열기</label>
<input id="fileInput" type="file" accept=".l5x,.xml,text/xml" hidden>
<a class="button ghost" href="index.html">스튜디오</a>
</div>
</header>
<div class="workspace">
<aside class="sidebar">
<section class="import-card" id="dropZone">
<div class="upload-icon" aria-hidden="true">⇧</div>
<strong>L5X 프로젝트 가져오기</strong>
<span>샘플 대신 실제 프로젝트를 보려면 파일을 여세요.</span>
</section>
<div id="projectSummary" class="summary-grid" hidden>
<div><b id="routineCount">0</b><span>루틴</span></div>
<div><b id="rungCount">0</b><span>Rung</span></div>
<div><b id="tagCount">0</b><span>태그</span></div>
</div>
<div class="search-wrap">
<span aria-hidden="true">⌕</span>
<input id="searchInput" type="search" placeholder="프로그램 또는 루틴 검색" aria-label="루틴 검색" disabled>
</div>
<label class="nav-fold toggle"><input id="navCollapse" type="checkbox" checked><span></span>프로그램 목록 접기</label>
<nav id="routineTree" class="routine-tree" aria-label="프로젝트 루틴">
<div class="empty-side">샘플 SFC가 자동으로 변환됩니다.</div>
</nav>
</aside>
<main class="main-panel">
<div id="welcome" class="welcome" hidden></div>
<section id="viewer" class="viewer">
<div class="viewer-head">
<div class="breadcrumb" id="breadcrumb">Sample / Machine_SFC</div>
<div class="viewer-title-row">
<div>
<div class="title-line"><h1 id="routineTitle">Machine_SFC</h1><span id="typeBadge" class="type-badge">SFC</span></div>
<p id="routineMeta">샘플 Sequential Function Chart</p>
</div>
<div class="export-actions">
<button id="exportSvg" class="button ghost">SVG</button>
<button id="exportTxt" class="button ghost">TXT</button>
<button id="printBtn" class="button ghost">인쇄 · PDF</button>
</div>
</div>
<div class="tabs" role="tablist">
<button class="tab active" data-tab="ladder" role="tab">SFC</button>
<button class="tab" data-tab="source" role="tab">원본 로직</button>
<button class="tab" data-tab="report" role="tab">변환 리포트 <span id="warningCount"></span></button>
</div>
</div>
<div id="ladderPanel" class="tab-panel">
<div class="ladder-toolbar">
<label>확대 <input id="zoomRange" type="range" min="60" max="150" value="100"><output id="zoomValue">100%</output></label>
<label>배율
<select id="scaleMode" aria-label="래더 배율">
<option value="fit">시트 너비에 맞춤</option>
<option value="fixed">최소 가로 유지 · 노트용</option>
</select>
</label>
<label class="toggle"><input id="showRungMeta" type="checkbox" checked><span></span>라인 번호·상태</label>
<label class="toggle"><input id="showRaw" type="checkbox"><span></span>명령어 표시</label>
<span id="conversionBadge" class="conversion-badge"></span>
</div>
<div id="ladderCanvas" class="ladder-canvas"></div>
</div>
<div id="sourcePanel" class="tab-panel source-panel" hidden>
<pre id="sourceCode"></pre>
<div id="stView" class="st-view" hidden></div>
</div>
<div id="reportPanel" class="tab-panel report-panel" hidden></div>
</section>
</main>
</div>
</div>
<dialog id="textDialog" class="text-dialog">
<form method="dialog" id="textLogicForm">
<header>
<div><strong>RLL 텍스트를 LD로 변환</strong><span>Rockwell Neutral Text(RLL)를 붙여 넣으세요.</span></div>
<button type="button" id="textDialogClose" class="dialog-close" aria-label="닫기">×</button>
</header>
<div class="dialog-fields">
<label>루틴 이름
<input id="textRoutineName" value="Text_Logic" maxlength="80">
</label>
</div>
<label class="logic-input-label">로직 원문
<textarea id="textLogicInput" spellcheck="false"></textarea>
</label>
<footer>
<span>입력 내용은 브라우저 밖으로 전송되지 않습니다.</span>
<button type="button" id="textConvertBtn" class="button primary">LD로 변환</button>
</footer>
</form>
</dialog>
<div id="toast" class="toast" role="status" aria-live="polite"></div>
<script src="st.js?v=20260916sfc4"></script>
<script src="sfc.js?v=20260916sfc4"></script>
<script>
window.LD_PRELOAD_NAME = 'sample-sfc.xml';
fetch('sample-sfc.xml').then(function (r) { return r.text(); }).then(function (xml) {
window.LD_PRELOAD_L5X = xml;
var s = document.createElement('script');
s.src = 'app.js?v=20260916sfc4';
document.body.appendChild(s);
}).catch(function (e) {
document.getElementById('ladderCanvas').innerHTML = '<div class="report-card"><h3>샘플 SFC를 읽지 못했습니다.</h3><p>' + String(e) + '</p></div>';
});
</script>
</body>
</html>