기능
로봇 제어기에서 Flange Serial 통신 포트를 열기 위한 명령어이다.
해당 명령어는 신규 플랜지 버전(v2)에서 사용 불가
인수
|
인수명 |
자료형 |
기본값 |
설명 |
|---|---|---|---|
|
baudrate |
Int |
115200 |
Baudrate 2400, 4800, 9600, 19200, 38400, 57600, 115200 etc |
|
bytesize |
enum.BYTE_SIZE |
BYTE_SIZE_EIGHTBITS |
상수 및 열거형 정의 참조 |
|
parity |
enum.PARITY_CHECK |
PARITY_CHECK_NONE |
상수 및 열거형 정의 참조 |
|
stopbits |
enum.STOP_BITS |
STOPBITS_ONE |
상수 및 열거형 정의 참조 |
리턴
|
값 |
설명 |
|---|---|
|
0 |
오류 |
|
1 |
성공 |
예제
C++
Drfl.flange_serial_open(115200);
Drfl.flange_serial_write(8, "test1234");
LPFLANGE_SER_RXD_INFO temp = Drfl.flange_serial_read(4.5);
cout << "serial read : " << temp->_cRxd << endl;
cout << "serial cnt : " << (int)temp->_iSize << endl;
Drfl.flange_serial_close();