commands:builtin
차이
문서의 선택한 두 판 사이의 차이를 보여줍니다.
| 양쪽 이전 판이전 판다음 판 | 이전 판 | ||
| commands:builtin [2026/08/31 22:32] – 바깥 편집 127.0.0.1 | commands:builtin [2026/10/25 11:33] (현재) – 바깥 편집 127.0.0.1 | ||
|---|---|---|---|
| 줄 1: | 줄 1: | ||
| ====== ILOGICS 내장 명령어 설명서 ====== | ====== ILOGICS 내장 명령어 설명서 ====== | ||
| - | ILOGICS 보드에서는 ILOGICS에서 제작한 내장 명령어를 사용할 수 있습니다. | + | ILOGICS 보드를 |
| ===== 내장 명령어를 사용하는 방법 ===== | ===== 내장 명령어를 사용하는 방법 ===== | ||
| - | - [[https:// | + | - [[https:// |
| - | - Arduino IDE에서 | + | - Arduino IDE의 **도구 → 보드**에서 사용할 보드를 선택해주시기 바랍니다. |
| - | - 내장 명령어를 사용합니다. | + | - 아래에서 필요한 |
| ===== 내장 명령어 리스트 ===== | ===== 내장 명령어 리스트 ===== | ||
| - | ^ 하고 싶은 작업 ^ 사용할 명령어 ^ | + | 예제에 표시된 |
| - | | 입력 노이즈와 스위치 채터링 | + | |
| - | | 입력이 변하는 순간 한 번만 실행 | [[commands: | + | |
| - | | 버튼을 누를 때마다 출력 ON/OFF 전환 | [[commands: | + | |
| - | | 일정 시간 뒤 출력 ON/OFF | [[commands: | + | |
| - | | 일정 시간만 펄스 출력 | [[commands: | + | |
| - | | 동작 횟수와 데이터 순서 관리 | [[commands: | + | |
| - | | 센서값 범위 변환 | [[commands: | + | |
| - | | NTC·PT100 온도 측정 | [[commands: | + | |
| - | | 아날로그·PWM 출력 | [[commands: | + | |
| - | | 목표값 자동 제어 | [[commands: | + | |
| - | | 주기적인 작업 실행 | [[commands: | + | |
| - | | 표시 장치와 RTC 사용 | [[commands: | + | |
| - | | 디버그와 Watchdog 사용 | [[commands: | + | |
| - | | 고속펄스 입력 카운트 | [[commands: | + | |
| - | | 통신으로 HMI·PLC 연결 | [[commands: | + | |
| - | ===== 기본 제어 | + | **카테고리별 보기** |
| + | |||
| + | * [[commands: | ||
| + | * [[commands: | ||
| + | * [[commands: | ||
| + | * [[commands: | ||
| + | |||
| + | ^ 카테고리 ^ 명령어 ^ 설명 ^ | ||
| + | | 디지털 입력 필터 | [[commands: | ||
| + | | ::: | [[commands: | ||
| + | | ::: | [[commands: | ||
| + | | ::: | [[commands: | ||
| + | | 에지 검출 | [[commands: | ||
| + | | ::: | [[commands: | ||
| + | | 상태 반전 | [[commands: | ||
| + | | 범위 변환 | [[commands: | ||
| + | | ::: | [[commands: | ||
| + | | 타이머 | [[commands: | ||
| + | | ::: | [[commands: | ||
| + | | ::: | [[commands: | ||
| + | | ::: | [[commands: | ||
| + | | ::: | [[commands: | ||
| + | | 타이머 상태 | [[commands: | ||
| + | | ::: | [[commands: | ||
| + | | 콜백 타이머 | [[commands: | ||
| + | | ::: | [[commands: | ||
| + | | ::: | [[commands: | ||
| + | | ::: | [[commands: | ||
| + | | ::: | [[commands: | ||
| + | | 카운터 | [[commands: | ||
| + | | ::: | [[commands: | ||
| + | | ::: | [[commands: | ||
| + | | ::: | [[commands: | ||
| + | | ::: | [[commands: | ||
| + | | ::: | [[commands: | ||
| + | | 데이터 버퍼 | [[commands: | ||
| + | | ::: | [[commands: | ||
| + | | 아날로그 입력 | [[commands: | ||
| + | | ::: | [[commands: | ||
| + | | ::: | [[commands: | ||
| + | | ::: | [[commands: | ||
| + | | 아날로그 입력 필터 | [[commands: | ||
| + | | 아날로그 범위 변환 | [[commands: | ||
| + | | ::: | [[commands: | ||
| + | | 4~20mA 입력 | [[commands: | ||
| + | | ::: | [[commands: | ||
| + | | ::: | [[commands: | ||
| + | | 4~20mA 범위 변환 | [[commands: | ||
| + | | ::: | [[commands: | ||
| + | | 온도 입력 | [[commands: | ||
| + | | ::: | [[commands: | ||
| + | | ::: | [[commands: | ||
| + | | 아날로그 출력 | [[commands: | ||
| + | | ::: | [[commands: | ||
| + | | ::: | [[commands: | ||
| + | | ::: | [[commands: | ||
| + | | ::: | [[commands: | ||
| + | | ::: | [[commands: | ||
| + | | 4~20mA 출력 | [[commands: | ||
| + | | ::: | [[commands: | ||
| + | | ::: | [[commands: | ||
| + | | PWM 출력 | [[commands: | ||
| + | | ::: | [[commands: | ||
| + | | ::: | [[commands: | ||
| + | | ::: | [[commands: | ||
| + | | 펄스 출력 | [[commands: | ||
| + | | ::: | [[commands: | ||
| + | | PID 제어 | [[commands: | ||
| + | | ::: | [[commands: | ||
| + | | ::: | [[commands: | ||
| + | | ::: | [[commands: | ||
| + | | ::: | [[commands: | ||
| + | | ::: | [[commands: | ||
| + | | 7세그먼트 FND(TM1637 I.C) | [[commands: | ||
| + | | ::: | [[commands: | ||
| + | | ::: | [[commands: | ||
| + | | ::: | [[commands: | ||
| + | | ::: | [[commands: | ||
| + | | ::: | [[commands: | ||
| + | | ::: | [[commands: | ||
| + | | CHARACTER LCD 사용설명서 | [[commands: | ||
| + | | ::: | [[commands: | ||
| + | | ::: | [[commands: | ||
| + | | ::: | [[commands: | ||
| + | | ::: | [[commands: | ||
| + | | ::: | [[commands: | ||
| + | | ::: | [[commands: | ||
| + | | ::: | [[commands: | ||
| + | | ::: | [[commands: | ||
| + | | ::: | [[commands: | ||
| + | | ::: | [[commands: | ||
| + | | ::: | [[commands: | ||
| + | | ::: | [[commands: | ||
| + | | ::: | [[commands: | ||
| + | | ::: | [[commands: | ||
| + | | ::: | [[commands: | ||
| + | | RTC | [[commands: | ||
| + | | ::: | [[commands: | ||
| + | | ::: | [[commands: | ||
| + | | ::: | [[commands: | ||
| + | | ::: | [[commands: | ||
| + | | ::: | [[commands: | ||
| + | | ::: | [[commands: | ||
| + | | ::: | [[commands: | ||
| + | | ::: | [[commands: | ||
| + | | ::: | [[commands: | ||
| + | | ::: | [[commands: | ||
| + | | ::: | [[commands: | ||
| + | | ::: | [[commands: | ||
| + | | ::: | [[commands: | ||
| + | | 디버그 | [[commands: | ||
| + | | ::: | [[commands: | ||
| + | | ::: | [[commands: | ||
| + | | ::: | [[commands: | ||
| + | | ::: | [[commands: | ||
| + | | Watchdog | [[commands: | ||
| + | | ::: | [[commands: | ||
| + | | ::: | [[commands: | ||
| + | | 고속카운터 | [[commands: | ||
| + | | ::: | [[commands: | ||
| + | | Modbus RTU Slave | [[commands: | ||
| + | | ::: | [[commands: | ||
| + | | ::: | [[commands: | ||
| + | | ::: | [[commands: | ||
| + | | Modbus RTU Master | [[commands: | ||
| + | | ::: | [[commands: | ||
| + | | ::: | [[commands: | ||
| + | | ::: | [[commands: | ||
| + | | LS산전 Cnet Slave | [[commands: | ||
| + | | ::: | [[commands: | ||
| + | | ::: | [[commands: | ||
| + | | ::: | [[commands: | ||
| + | | Mitsubishi MC Protocol | [[commands: | ||
| + | | ::: | [[commands: | ||
| + | | ::: | [[commands: | ||
| + | | ::: | [[commands: | ||
| + | |||
| + | ===== 디지털 입력 필터 ===== | ||
| + | |||
| + | ^ 명령어 | ||
| + | | [[commands: | ||
| + | | [[commands: | ||
| + | | [[commands: | ||
| + | | [[commands: | ||
| + | |||
| + | '' | ||
| + | |||
| + | ===== 에지 검출 | ||
| ^ 명령어 형식 ^ 반환값 ^ 설명 ^ | ^ 명령어 형식 ^ 반환값 ^ 설명 ^ | ||
| - | | '' | + | | [[commands: |
| - | | '' | + | | [[commands: |
| - | | '' | + | |
| - | | '' | + | |
| - | | '' | + | |
| - | '' | + | '' |
| + | |||
| + | ===== 상태 반전 ===== | ||
| + | |||
| + | ^ 명령어 형식 ^ 반환값 ^ 설명 ^ | ||
| + | | [[commands: | ||
| + | |||
| + | 다음 예제는 MPAINO-8A8R(T)의 첫 입력 '' | ||
| <code cpp> | <code cpp> | ||
| bool lampState = false; | bool lampState = false; | ||
| + | |||
| + | void setup() {} | ||
| void loop() { | void loop() { | ||
| 줄 49: | 줄 187: | ||
| </ | </ | ||
| - | ===== 디지털 입력과 노이즈 필터 | + | ===== 범위 변환 |
| - | ^ 명령어 형식 ^ 반환값 ^ 사용 기준 | + | ^ 명령어 형식 ^ 반환값 ^ 설명 |
| - | | '' | + | | [[commands: |
| - | | '' | + | | [[commands: |
| - | | '' | + | |
| - | | '' | + | |
| - | | '' | + | |
| - | '' | + | ===== 타이머 ===== |
| - | + | ||
| - | ===== PLC 스타일 | + | |
| ^ 명령어 형식 ^ 동작 ^ | ^ 명령어 형식 ^ 동작 ^ | ||
| - | | '' | + | | [[commands: |
| - | | '' | + | | [[commands: |
| - | | '' | + | | [[commands: |
| - | | '' | + | | [[commands: |
| - | | '' | + | | [[commands: |
| - | | '' | + | |
| - | PLC 스타일 타이머는 '' | + | PLC 스타일 타이머는 '' |
| + | |||
| + | 다음 예제는 MPAINO-8A8R(T)의 첫 입력 '' | ||
| <code cpp> | <code cpp> | ||
| + | void setup() {} | ||
| + | |||
| void loop() { | void loop() { | ||
| bool run = Ibounce(0, 30); | bool run = Ibounce(0, 30); | ||
| 줄 80: | 줄 216: | ||
| </ | </ | ||
| - | ===== 주기 | + | ===== 타이머 상태 ===== |
| + | |||
| + | ^ 명령어 형식 ^ 반환값 ^ 설명 ^ | ||
| + | | [[commands: | ||
| + | | [[commands: | ||
| + | |||
| + | ===== 콜백 타이머 ===== | ||
| ^ 명령어 형식 ^ 설명 ^ | ^ 명령어 형식 ^ 설명 ^ | ||
| - | | '' | + | | [[commands: |
| - | | '' | + | | [[commands: |
| - | | '' | + | | [[commands: |
| - | | '' | + | | [[commands: |
| - | | '' | + | | [[commands: |
| - | | '' | + | | [[commands: |
| - | 콜백 함수는 인터럽트 안에서 실행됩니다. 콜백에서는 플래그나 짧은 카운트만 변경하고 '' | + | 콜백 함수는 인터럽트 안에서 실행됩니다. 콜백에서는 플래그나 짧은 카운트만 변경하고 '' |
| <code cpp> | <code cpp> | ||
| 줄 112: | 줄 254: | ||
| </ | </ | ||
| - | ===== 카운터와 데이터 버퍼 | + | ===== 카운터 ===== |
| ^ 명령어 형식 ^ 설명 ^ | ^ 명령어 형식 ^ 설명 ^ | ||
| - | | '' | + | | [[commands: |
| - | | '' | + | | [[commands: |
| - | | '' | + | | [[commands: |
| - | | '' | + | | [[commands: |
| - | | '' | + | | [[commands: |
| - | | '' | + | |
| - | | '' | + | |
| - | 카운터 명령어는 '' | + | 카운터 명령어는 '' |
| - | ===== 아날로그 입력과 범위 변환 ===== | + | ===== 데이터 버퍼 ===== |
| + | |||
| + | ^ 명령어 형식 ^ 설명 ^ | ||
| + | | [[commands: | ||
| + | | [[commands: | ||
| + | |||
| + | ===== 아날로그 입력 | ||
| + | |||
| + | ^ 명령어 형식 ^ 반환값·용도 ^ | ||
| + | | [[commands: | ||
| + | | [[commands: | ||
| + | | [[commands: | ||
| + | |||
| + | ===== 아날로그 입력 필터 ===== | ||
| + | |||
| + | ^ 명령어 형식 ^ 반환값·용도 ^ | ||
| + | | [[commands: | ||
| + | |||
| + | ===== 아날로그 범위 변환 ===== | ||
| + | |||
| + | ^ 명령어 형식 ^ 반환값·용도 ^ | ||
| + | | [[commands: | ||
| + | |||
| + | ===== 4~20mA 입력 ===== | ||
| + | |||
| + | ^ 명령어 형식 ^ 반환값·용도 ^ | ||
| + | | [[commands: | ||
| + | | [[commands: | ||
| + | |||
| + | ===== 4~20mA | ||
| ^ 명령어 형식 ^ 반환값·용도 ^ | ^ 명령어 형식 ^ 반환값·용도 ^ | ||
| - | | '' | + | | [[commands: |
| - | | '' | + | |
| - | | '' | + | |
| - | | '' | + | |
| - | | '' | + | |
| - | | '' | + | |
| - | | '' | + | |
| - | MPAINO에서는 장착된 아날로그 입력 모듈과 딥스위치의 전압·전류 범위를 먼저 확인합니다. 샘플링 속도를 높이면 응답은 빨라지지만 노이즈와 측정 특성이 달라질 수 있습니다. | + | MPAINO에서는 장착된 아날로그 입력 모듈과 딥스위치의 전압·전류 범위를 먼저 확인해야 |
| <code cpp> | <code cpp> | ||
| 줄 154: | 줄 317: | ||
| ^ 명령어 형식 ^ 반환값 ^ 대상 ^ | ^ 명령어 형식 ^ 반환값 ^ 대상 ^ | ||
| - | | '' | + | | [[commands: |
| - | | '' | + | | [[commands: |
| - | | '' | + | | [[commands: |
| - | NTC와 PT100은 센서 종류와 입력 회로가 다릅니다. 서로 바꾸어 사용하지 | + | NTC와 PT100은 센서 종류와 입력 회로가 다릅니다. 서로 바꾸어 사용하지 |
| - | ===== 아날로그 출력과 PWM ===== | + | ===== 아날로그 출력 ===== |
| ^ 명령어 형식 ^ 설명 ^ | ^ 명령어 형식 ^ 설명 ^ | ||
| - | | '' | + | | [[commands: |
| - | | '' | + | | [[commands: |
| - | | '' | + | | [[commands: |
| - | | '' | + | | [[commands: |
| - | | '' | + | |
| - | | '' | + | |
| - | | '' | + | |
| - | | '' | + | |
| - | | '' | + | |
| - | PWM, 고속펄스, | + | ===== 4~20mA 출력 ===== |
| + | |||
| + | ^ 명령어 형식 ^ 설명 ^ | ||
| + | | [[commands: | ||
| + | | [[commands: | ||
| + | |||
| + | ===== PWM 출력 ===== | ||
| + | |||
| + | ^ 명령어 형식 ^ 설명 ^ | ||
| + | | [[commands: | ||
| + | | [[commands: | ||
| + | | [[commands: | ||
| + | |||
| + | ===== 펄스 출력 ===== | ||
| + | |||
| + | ^ 명령어 형식 ^ 설명 ^ | ||
| + | | [[commands: | ||
| + | |||
| + | PWM, 고속펄스, | ||
| ===== PID 제어 ===== | ===== PID 제어 ===== | ||
| ^ 명령어 형식 ^ 설명 ^ | ^ 명령어 형식 ^ 설명 ^ | ||
| - | | '' | + | | [[commands: |
| - | | '' | + | | [[commands: |
| - | | '' | + | | [[commands: |
| - | | '' | + | | [[commands: |
| - | | '' | + | | [[commands: |
| - | | '' | + | | [[commands: |
| <code cpp> | <code cpp> | ||
| 줄 197: | 줄 373: | ||
| </ | </ | ||
| - | PID 출력은 계산값일 뿐 안전장치가 아닙니다. 센서 단선, 과온, 출력 고착과 비상정지는 별도의 안전회로로 처리하십시오. | + | PID 출력은 계산값일 뿐 안전장치가 아닙니다. 센서 단선·과온·출력 고착·비상정지는 별도의 안전회로로 처리해야 합니다. |
| - | ===== 표시 장치와 RTC ===== | + | ===== 7세그먼트 FND(TM1637 I.C) ===== |
| - | ^ 기능 ^ 주요 명령어 ^ 설명 ^ | + | [[guide: |
| - | | TM1637 4자리 FND | '' | + | |
| - | | PCF8574 문자 LCD | '' | + | |
| - | | DS3231 RTC | '' | + | |
| - | 표시 | + | ^ 대상 ^ 주요 명령어 ^ 설명 ^ |
| + | | TM1637 4자리 FND | [[commands: | ||
| - | ===== Debug와 Watchdog ===== | + | ===== CHAREACTER LCD 사용설명서 ===== |
| + | |||
| + | [[guide: | ||
| + | |||
| + | ^ 대상 ^ 주요 명령어 ^ 설명 ^ | ||
| + | | PCF8574 문자 LCD | [[commands: | ||
| + | |||
| + | ===== RTC ===== | ||
| + | |||
| + | ^ 대상 ^ 주요 명령어 ^ 설명 ^ | ||
| + | | DS3231 RTC | [[commands: | ||
| + | |||
| + | 표시 장치와 RTC를 사용하기 전에 각각의 '' | ||
| + | |||
| + | ===== 디버그 ===== | ||
| + | |||
| + | ^ 명령어 형식 ^ 설명 ^ | ||
| + | | [[commands: | ||
| + | | [[commands: | ||
| + | | [[commands: | ||
| + | |||
| + | ===== Watchdog ===== | ||
| ^ 명령어 형식 ^ 설명 ^ | ^ 명령어 형식 ^ 설명 ^ | ||
| - | | '' | + | | [[commands: |
| - | | '' | + | | [[commands: |
| - | | '' | + | |
| - | | '' | + | |
| - | | '' | + | |
| - | Watchdog를 활성화한 뒤 '' | + | Watchdog를 활성화한 뒤 '' |
| ===== 고속카운터 ===== | ===== 고속카운터 ===== | ||
| ^ 명령어 형식 ^ 설명 ^ | ^ 명령어 형식 ^ 설명 ^ | ||
| - | | '' | + | | [[commands: |
| - | | '' | + | | [[commands: |
| 현재 타이머 외부 클럭 방식의 전용 고속카운터 지원 제품은 MPINO-8A8R과 MPINO-16A8R8T입니다. 다른 제품은 제품별 인터럽트 입력을 확인해 '' | 현재 타이머 외부 클럭 방식의 전용 고속카운터 지원 제품은 MPINO-8A8R과 MPINO-16A8R8T입니다. 다른 제품은 제품별 인터럽트 입력을 확인해 '' | ||
| - | ===== 산업용 통신 | + | ===== Modbus RTU Slave ===== |
| - | ^ 프로토콜 | + | ^ 초기 설정 ^ '' |
| - | | Modbus RTU Slave | '' | + | | [[commands: |
| - | | Modbus RTU Master | '' | + | |
| - | | LS산전 Cnet Slave | '' | + | |
| - | | Mitsubishi MC Protocol Slave | '' | + | |
| <code cpp> | <code cpp> | ||
| 줄 247: | 줄 436: | ||
| </ | </ | ||
| - | 제품별 RS-232, RS-485와 UART의 '' | + | ===== Modbus RTU Master ===== |
| + | |||
| + | ^ 초기 설정 ^ 실행 명령어 ^ | ||
| + | | [[commands: | ||
| + | |||
| + | ===== LS산전 Cnet Slave ===== | ||
| + | |||
| + | ^ 초기 설정 ^ '' | ||
| + | | [[commands: | ||
| + | |||
| + | ===== Mitsubishi MC Protocol ===== | ||
| + | |||
| + | ^ 초기 설정 ^ '' | ||
| + | | [[commands: | ||
| + | |||
| + | 제품별 RS-232, RS-485와 UART의 '' | ||
| ===== 통합 입출력 예제 ===== | ===== 통합 입출력 예제 ===== | ||
| 줄 257: | 줄 461: | ||
| const uint8_t outputChannel = 64; | const uint8_t outputChannel = 64; | ||
| - | void setup() { | + | void setup() {} |
| - | pinMode(inputChannel, | + | |
| - | pinMode(outputChannel, | + | |
| - | } | + | |
| void loop() { | void loop() { | ||
| 줄 271: | 줄 472: | ||
| ===== 문제가 생겼을 때 ===== | ===== 문제가 생겼을 때 ===== | ||
| - | * **명령어를 찾을 수 없음:** ILOGICS 보드 패키지 설치와 제품 보드 선택을 확인합니다. | + | * **명령어를 찾을 수 없음:** ILOGICS 보드 패키지 설치와 제품 보드 선택을 확인해주시기 바랍니다. |
| - | * **입출력이 반응하지 않음:** MPINO 핀 번호와 MPAINO 논리 채널을 혼동하지 않았는지 확인합니다. | + | * **입출력이 반응하지 않음:** MPINO 핀 번호와 MPAINO 논리 채널을 혼동하지 않았는지 확인해주시기 바랍니다. |
| - | * **타이머·카운터가 멈춤:** 명령어를 '' | + | * **타이머·카운터가 멈춤:** 명령어를 '' |
| - | * **PWM 주파수가 이상함: | + | * **PWM 주파수가 이상함: |
| - | * **아날로그값이 다름:** 전압·전류·NTC·PT100 딥스위치와 채널, 샘플링 속도를 확인합니다. | + | * **아날로그값이 다름:** 전압·전류·NTC·PT100 딥스위치 |
| - | * **통신이 되지 않음:** Serial 포트, RS-232/RS-485 방식, 보레이트, 국번, 패리티와 배선을 확인합니다. | + | * **통신이 되지 않음:** Serial 포트·RS-232/RS-485 방식·보레이트·국번·패리티·배선을 확인해주시기 바랍니다. |
| - | * **보드가 반복 재시작됨: | + | * **보드가 반복 재시작됨: |
| ===== 필수 주의사항 ===== | ===== 필수 주의사항 ===== | ||
| - | * 과거 ''# | + | * 과거 ''# |
| - | * 전원과 배선을 변경할 때는 장비 전원을 | + | * 전원과 배선을 변경할 때는 장비 전원을 |
| - | * 릴레이와 트랜지스터 출력의 전기적 특성 및 허용전류를 구분합니다. | + | * 릴레이와 트랜지스터 출력의 전기적 특성 및 허용전류를 구분해야 |
| - | * 프로그램 출력만 비상정지나 과전류 보호수단으로 사용하지 않습니다. | + | * 프로그램 출력만 비상정지나 과전류 보호수단으로 사용하지 않아야 합니다. |
| - | * 제품별 핀맵, 전기 사양과 지원 타이머는 해당 제품 설명서를 최종 기준으로 확인합니다. | + | * 제품별 핀맵·전기 사양·지원 타이머는 해당 제품 설명서를 최종 기준으로 확인해야 |
| ===== 관련 문서 ===== | ===== 관련 문서 ===== | ||
| * [[products: | * [[products: | ||
| - | * [[products:mpino|MPINO 제품 특징과 사용 흐름]] | + | * [[products:mpino_series|MPINO 제품 특징과 사용 흐름]] |
| * [[products: | * [[products: | ||
| * [[guide: | * [[guide: | ||
| - | * [[guide: | + | * [[guide: |
| - | * [[safety|안전 및 설치 주의사항]] | + | * [[:safety|안전 및 설치 주의사항]] |
commands/builtin.1788183136.txt.gz · 마지막으로 수정됨: 저자 127.0.0.1
