commands:builtin
차이
문서의 선택한 두 판 사이의 차이를 보여줍니다.
| 양쪽 이전 판이전 판다음 판 | 이전 판 | ||
| commands:builtin [2026/08/31 22:32] – 바깥 편집 127.0.0.1 | commands:builtin [2026/09/15 11:47] (현재) – 바깥 편집 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: | ||
| + | | TM1637 FND | [[commands: | ||
| + | | ::: | [[commands: | ||
| + | | ::: | [[commands: | ||
| + | | ::: | [[commands: | ||
| + | | ::: | [[commands: | ||
| + | | ::: | [[commands: | ||
| + | | ::: | [[commands: | ||
| + | | 문자 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: |
| 콜백 함수는 인터럽트 안에서 실행됩니다. 콜백에서는 플래그나 짧은 카운트만 변경하고 '' | 콜백 함수는 인터럽트 안에서 실행됩니다. 콜백에서는 플래그나 짧은 카운트만 변경하고 '' | ||
| 줄 112: | 줄 254: | ||
| </ | </ | ||
| - | ===== 카운터와 데이터 버퍼 | + | ===== 카운터 ===== |
| ^ 명령어 형식 ^ 설명 ^ | ^ 명령어 형식 ^ 설명 ^ | ||
| - | | '' | + | | [[commands: |
| - | | '' | + | | [[commands: |
| - | | '' | + | | [[commands: |
| - | | '' | + | | [[commands: |
| - | | '' | + | | [[commands: |
| - | | '' | + | |
| - | | '' | + | |
| 카운터 명령어는 '' | 카운터 명령어는 '' | ||
| - | ===== 아날로그 입력과 범위 변환 ===== | + | ===== 데이터 버퍼 ===== |
| + | |||
| + | ^ 명령어 형식 ^ 설명 ^ | ||
| + | | [[commands: | ||
| + | | [[commands: | ||
| + | |||
| + | ===== 아날로그 입력 | ||
| + | |||
| + | ^ 명령어 형식 ^ 반환값·용도 ^ | ||
| + | | [[commands: | ||
| + | | [[commands: | ||
| + | | [[commands: | ||
| + | |||
| + | ===== 아날로그 입력 필터 ===== | ||
| + | |||
| + | ^ 명령어 형식 ^ 반환값·용도 ^ | ||
| + | | [[commands: | ||
| + | |||
| + | ===== 아날로그 범위 변환 ===== | ||
| + | |||
| + | ^ 명령어 형식 ^ 반환값·용도 ^ | ||
| + | | [[commands: | ||
| + | |||
| + | ===== 4~20mA 입력 ===== | ||
| + | |||
| + | ^ 명령어 형식 ^ 반환값·용도 ^ | ||
| + | | [[commands: | ||
| + | | [[commands: | ||
| + | |||
| + | ===== 4~20mA | ||
| ^ 명령어 형식 ^ 반환값·용도 ^ | ^ 명령어 형식 ^ 반환값·용도 ^ | ||
| - | | '' | + | | [[commands: |
| - | | '' | + | |
| - | | '' | + | |
| - | | '' | + | |
| - | | '' | + | |
| - | | '' | + | |
| - | | '' | + | |
| MPAINO에서는 장착된 아날로그 입력 모듈과 딥스위치의 전압·전류 범위를 먼저 확인합니다. 샘플링 속도를 높이면 응답은 빨라지지만 노이즈와 측정 특성이 달라질 수 있습니다. | MPAINO에서는 장착된 아날로그 입력 모듈과 딥스위치의 전압·전류 범위를 먼저 확인합니다. 샘플링 속도를 높이면 응답은 빨라지지만 노이즈와 측정 특성이 달라질 수 있습니다. | ||
| 줄 154: | 줄 317: | ||
| ^ 명령어 형식 ^ 반환값 ^ 대상 ^ | ^ 명령어 형식 ^ 반환값 ^ 대상 ^ | ||
| - | | '' | + | | [[commands: |
| - | | '' | + | | [[commands: |
| - | | '' | + | | [[commands: |
| NTC와 PT100은 센서 종류와 입력 회로가 다릅니다. 서로 바꾸어 사용하지 말고 선택 제품에 해당 입력 기능이 있는지 확인하십시오. | NTC와 PT100은 센서 종류와 입력 회로가 다릅니다. 서로 바꾸어 사용하지 말고 선택 제품에 해당 입력 기능이 있는지 확인하십시오. | ||
| - | ===== 아날로그 출력과 PWM ===== | + | ===== 아날로그 출력 ===== |
| ^ 명령어 형식 ^ 설명 ^ | ^ 명령어 형식 ^ 설명 ^ | ||
| - | | '' | + | | [[commands: |
| - | | '' | + | | [[commands: |
| - | | '' | + | | [[commands: |
| - | | '' | + | | [[commands: |
| - | | '' | + | |
| - | | '' | + | ===== 4~20mA 출력 ===== |
| - | | '' | + | |
| - | | '' | + | ^ 명령어 형식 ^ 설명 ^ |
| - | | '' | + | | [[commands: |
| + | | [[commands: | ||
| + | |||
| + | ===== PWM 출력 ===== | ||
| + | |||
| + | ^ 명령어 형식 ^ 설명 ^ | ||
| + | | [[commands: | ||
| + | | [[commands: | ||
| + | | [[commands: | ||
| + | |||
| + | ===== 펄스 출력 ===== | ||
| + | |||
| + | ^ 명령어 형식 ^ 설명 ^ | ||
| + | | [[commands: | ||
| PWM, 고속펄스, | PWM, 고속펄스, | ||
| 줄 178: | 줄 354: | ||
| ^ 명령어 형식 ^ 설명 ^ | ^ 명령어 형식 ^ 설명 ^ | ||
| - | | '' | + | | [[commands: |
| - | | '' | + | | [[commands: |
| - | | '' | + | | [[commands: |
| - | | '' | + | | [[commands: |
| - | | '' | + | | [[commands: |
| - | | '' | + | | [[commands: |
| <code cpp> | <code cpp> | ||
| 줄 199: | 줄 375: | ||
| PID 출력은 계산값일 뿐 안전장치가 아닙니다. 센서 단선, 과온, 출력 고착과 비상정지는 별도의 안전회로로 처리하십시오. | PID 출력은 계산값일 뿐 안전장치가 아닙니다. 센서 단선, 과온, 출력 고착과 비상정지는 별도의 안전회로로 처리하십시오. | ||
| - | ===== 표시 장치와 RTC ===== | + | ===== TM1637 FND ===== |
| - | ^ 기능 | + | ^ 대상 |
| - | | TM1637 4자리 FND | '' | + | | TM1637 4자리 FND | [[commands: |
| - | | PCF8574 문자 LCD | '' | + | |
| - | | DS3231 RTC | '' | + | ===== 문자 LCD ===== |
| + | |||
| + | ^ 대상 ^ 주요 명령어 ^ 설명 ^ | ||
| + | | PCF8574 문자 LCD | [[commands: | ||
| + | |||
| + | ===== RTC ===== | ||
| + | |||
| + | ^ 대상 ^ 주요 명령어 ^ 설명 ^ | ||
| + | | DS3231 RTC | [[commands: | ||
| 표시 장치와 RTC는 각각의 '' | 표시 장치와 RTC는 각각의 '' | ||
| - | ===== Debug와 Watchdog | + | ===== 디버그 |
| ^ 명령어 형식 ^ 설명 ^ | ^ 명령어 형식 ^ 설명 ^ | ||
| - | | '' | + | | [[commands: |
| - | | '' | + | | [[commands: |
| - | | '' | + | | [[commands: |
| - | | '' | + | |
| - | | '' | + | ===== Watchdog ===== |
| + | |||
| + | ^ 명령어 형식 ^ 설명 ^ | ||
| + | | [[commands: | ||
| + | | [[commands: | ||
| Watchdog를 활성화한 뒤 '' | Watchdog를 활성화한 뒤 '' | ||
| 줄 222: | 줄 410: | ||
| ^ 명령어 형식 ^ 설명 ^ | ^ 명령어 형식 ^ 설명 ^ | ||
| - | | '' | + | | [[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> | ||
| 줄 246: | 줄 431: | ||
| } | } | ||
| </ | </ | ||
| + | |||
| + | ===== Modbus RTU Master ===== | ||
| + | |||
| + | ^ 초기 설정 ^ 실행 명령어 ^ | ||
| + | | [[commands: | ||
| + | |||
| + | ===== LS산전 Cnet Slave ===== | ||
| + | |||
| + | ^ 초기 설정 ^ '' | ||
| + | | [[commands: | ||
| + | |||
| + | ===== Mitsubishi MC Protocol ===== | ||
| + | |||
| + | ^ 초기 설정 ^ '' | ||
| + | | [[commands: | ||
| 제품별 RS-232, RS-485와 UART의 '' | 제품별 RS-232, RS-485와 UART의 '' | ||
| 줄 257: | 줄 457: | ||
| const uint8_t outputChannel = 64; | const uint8_t outputChannel = 64; | ||
| - | void setup() { | + | void setup() {} |
| - | pinMode(inputChannel, | + | |
| - | pinMode(outputChannel, | + | |
| - | } | + | |
| void loop() { | void loop() { | ||
| 줄 290: | 줄 487: | ||
| * [[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
