CSV Bulk Upload
Screen for registering multiple OPC + tags at once. Imports a tag catalog defined in Excel or external tools. The fastest method for sites with 50+ tags.
Home → Protocol Connection → top-right 📥 CSV Bulk Upload, or directly /ui/connect/csv.
1. Screen Layout
📥 CSV 일괄 업로드 [← 뒤로] [💾 업로드]
⚠ 주의사항 패널 (빨강)
- CSV 형식 [,로 구분]
- 빈 공백 금지
- 1행 = 헤더 (절대 삭제 금지)
- OPC: 드라이버명/IP/포트 정확히
- TAG: PLC_ADDRESS 정확히 (잘못 입력 시 수집 실패)
- 이미 등록된 TAG_ID → 업데이트 안 함 (중복 무시)
📊 OPC
────────────────
[CodeMirror 에디터 — 150px]
헤더: OPC_ID,OPC_NAME,OPC_TYPE,OPC_AGENT_IP,OPC_AGENT_PORT,TIMECYCLE,ASYNC,AUTO_COLLECT,DESCRIPTION
🏷 TAG
────────────────
[CodeMirror 에디터 — 400px]
헤더: OPC_ID,TAG_ID,TAG_NAME,DATA_TYPE,PLC_ADDRESS,FORMAT,LINKED_ASSET_ID,ALIAS_NAME,DESCRIPTION
2. OPC CSV Columns (9)
| Order | Column | Description | Example |
|---|---|---|---|
| 1 | OPC_ID | Unique identifier (alphanumeric/underscore) | OPC_LS_LINE1 |
| 2 | OPC_NAME | User display name | 라인1 LS PLC |
| 3 | OPC_TYPE | Gateway code (LS / MELSEC / S7 / MODBUS / OPCUA / EIP / LOGIX / HTTP, etc.) | LS |
| 4 | OPC_AGENT_IP | PLC IP address | 192.168.100.50 |
| 5 | OPC_AGENT_PORT | TCP port | 2004 |
| 6 | TIMECYCLE | Collection period (ms) | 1000 |
| 7 | ASYNC | Asynchronous read | true / false |
| 8 | AUTO_COLLECT | Start collection after boot | true / false |
| 9 | DESCRIPTION | Free memo | 라인1 메인 PLC |
Refer to the comparison table in the PLC Type Guide for port/IP tables by OPC_TYPE.
3. TAG CSV Columns (9)
| Order | Column | Description | Example |
|---|---|---|---|
| 1 | OPC_ID | Matches OPC_ID in the OPC table above | OPC_LS_LINE1 |
| 2 | TAG_ID | Unique ID (alphanumeric/_) | TAG_LINE1_TEMP |
| 3 | TAG_NAME | User display name | 라인1 온도 |
| 4 | DATA_TYPE | Integer / Long / Float / Double / String / Boolean | Integer |
| 5 | PLC_ADDRESS | Driver-specific address (e.g., D00309 LS, DB1.DBW0 S7, holding-register:1 Modbus) | D00309 |
| 6 | FORMAT | Format helper (DW / REAL / STR[10] / BIN[3], etc.) | DW |
| 7 | LINKED_ASSET_ID | (Optional) Asset mapping | ASSET_PUMP_01 |
| 8 | ALIAS_NAME | (Optional) Alias for external systems | temp_01 |
| 9 | DESCRIPTION | Free memo | 라인1 메인 펌프 온도(℃) |
For precise PLC_ADDRESS and FORMAT input, see PLC Address Input (Complete Guide for 44 Drivers).
4. Example (Practical)
4.1 2 OPC + 5 TAG
OPC section (header + 2 rows):
OPC_ID,OPC_NAME,OPC_TYPE,OPC_AGENT_IP,OPC_AGENT_PORT,TIMECYCLE,ASYNC,AUTO_COLLECT,DESCRIPTION
OPC_LS_LINE1,라인1 LS PLC,LS,192.168.100.50,2004,1000,false,true,라인1 메인 PLC
OPC_S7_LINE2,라인2 S7 PLC,S7,192.168.100.60,102,1000,false,true,라인2 메인 PLC
TAG section (header + 5 rows):
OPC_ID,TAG_ID,TAG_NAME,DATA_TYPE,PLC_ADDRESS,FORMAT,LINKED_ASSET_ID,ALIAS_NAME,DESCRIPTION
OPC_LS_LINE1,TAG_LINE1_TEMP,라인1 온도,Float,D00450,REAL,,,라인1 메인 펌프 온도(℃)
OPC_LS_LINE1,TAG_LINE1_QTY,라인1 누적생산량,Integer,D00600,DW,,,32-bit 누적
OPC_LS_LINE1,TAG_LINE1_RUN,라인1 가동상태,Boolean,M02704,,,,
OPC_S7_LINE2,TAG_LINE2_PRESS,라인2 압력,Float,DB1.DBD0,REAL,,,bar
OPC_S7_LINE2,TAG_LINE2_FAULT,라인2 알람,Boolean,DB1.DBX2.0,,,,
,,, is an empty column — LINKED_ASSET_ID, ALIAS_NAME not used.
4.2 Creating from Excel
- Paste the table above directly into Excel (1 header row + data)
- Save As → CSV UTF-8 (Comma delimited) format (default
cp949Korean character corruption warning) - Open the CSV file in a text editor and check whether commas inside cells are auto-quoted (
"...") - Paste the CSV content exactly as-is into the OPC or TAG section
5. Upload Flow
| Step | Action |
|---|---|
| 1. Click 💾 Upload | POST /connect/csv-upload (body: {opcs, tags} two text fields) |
| 2. Server validation | Validates header / column count / type / OPC_ID matching |
| 3. DB registration | pe.app_opc + pe.app_tag upsert (existing TAG_ID is not updated — skipped) |
| 4. Toast | "Once you restart the server, collection for the registered OPC connections and tags will begin." |
After upload — restart recommended so the gateway cache (OPCAndTagsCache) reads the new OPC/tags (bin/restart-app.sh, 30–90 seconds). OPCs registered with auto-start (AUTO_COLLECT=true) will begin collection immediately after restart.
6. Common Pitfalls
| Symptom | Cause / Fix |
|---|---|
| 0 records after upload | Missing header / column count mismatch / encoding (UTF-8 BOM) |
| Korean characters corrupted | Excel default cp949 saved. Force UTF-8 — Save As → CSV UTF-8 |
| Same TAG_ID not updated | Normal behavior — duplicate TAG_IDs are skipped. To change, use Tag Registration screen or REST PUT /api/v1/tag/{tagId} |
| OPC registered but TAGs not visible | TAG CSV's OPC_ID doesn't exactly match OPC CSV's OPC_ID. Case / whitespace |
ASYNC, AUTO_COLLECT treated as false | True / TRUE are fine, but empty cells become false. Explicitly enter true |
| PLC_ADDRESS column registered empty | Commas inside cells in CSV split the line. If a cell contains a comma, quote it with "..." |
| Trailing space at end of line → column mismatch | Trailing spaces may be added during Excel → CSV conversion. Trim in a text editor |
| Upload succeeds but no values on chart | Registered with OPC AUTO_COLLECT=false but Start not clicked after restart. Use ▶ Start in /ui/connect/list |
7. Further Reading
- Single registration (interactive): Tag Registration
- Address notation: PLC Address Input (Complete Guide for 44 Drivers)
- Real-time monitoring after registration: Connection List / Tag List
- Bulk modification (REST): REST API
PUT /api/v1/tag/{tagId}iteration