commands:reference:imodbusrtumasterinit
차이
문서의 선택한 두 판 사이의 차이를 보여줍니다.
| commands:reference:imodbusrtumasterinit [2026/09/01 20:04] – 만듦 - 바깥 편집 127.0.0.1 | commands:reference:imodbusrtumasterinit [2026/09/08 00:53] (현재) – 바깥 편집 127.0.0.1 | ||
|---|---|---|---|
| 줄 12: | 줄 12: | ||
| ^ 명령어 ^ 인수 ^ 반환값 ^ 동작 ^ | ^ 명령어 ^ 인수 ^ 반환값 ^ 동작 ^ | ||
| | '' | | '' | ||
| + | |||
| ===== 예제 ===== | ===== 예제 ===== | ||
| <code cpp> | <code cpp> | ||
| - | ImodbusRTUmasterInit(Serial2, | + | uint16_t data[10]; |
| + | uint16_t readValue0; | ||
| + | uint16_t readValue1; | ||
| + | |||
| + | void setup() { | ||
| + | | ||
| + | } | ||
| + | |||
| + | void loop() { | ||
| + | uint8_t result; | ||
| + | |||
| + | result = ImodbusRTUmaster(Serial2, | ||
| + | if (result == IMODBUS_RTU_SUCCESS) { | ||
| + | readValue0 = data[0]; | ||
| + | readValue1 = data[1]; | ||
| + | } | ||
| + | |||
| + | data[0] = 1234; | ||
| + | ImodbusRTUmaster(Serial2, | ||
| + | } | ||
| </ | </ | ||
| 줄 26: | 줄 46: | ||
| * Cnet/MC Protocol과 '' | * Cnet/MC Protocol과 '' | ||
| * 메모리 할당 함수는 성공 여부를 반환하지 않으므로 크기가 0이 아니면 '' | * 메모리 할당 함수는 성공 여부를 반환하지 않으므로 크기가 0이 아니면 '' | ||
| + | |||
| + | ===== 같은 카테고리의 내장 명령어 ===== | ||
| + | |||
| + | * [[commands: | ||
| + | * [[commands: | ||
| + | * [[commands: | ||
| [[commands: | [[commands: | ||
commands/reference/imodbusrtumasterinit.1788260661.txt.gz · 마지막으로 수정됨: 저자 127.0.0.1
