From 8429349d1b0f86e133e037c435864bf24d925adb Mon Sep 17 00:00:00 2001 From: Changwoo Park Date: Thu, 18 May 2023 18:11:24 +0900 Subject: [PATCH] =?UTF-8?q?[RS485]=20[Ethernet]=20[Timer]=20-=20RS485=20?= =?UTF-8?q?=20=20=E3=84=B4=20MC9=20Address=2010=20=EA=B8=B0=EC=A4=80=20PV?= =?UTF-8?q?=3F=20SV=3F=20=EC=B2=98=EB=A6=AC=20=20=20=E3=84=B4=20MC9=20resp?= =?UTF-8?q?onse=20time=20150~250ms=20=20=20=E3=84=B4=20=EC=8B=9C=EA=B0=84?= =?UTF-8?q?=20=EA=B0=90=EC=95=88=ED=95=98=EC=97=AC=20=ED=98=84=EC=9E=AC=20?= =?UTF-8?q?PV=20every=201sec,=20SV=20every=205sec=20=20=20=E3=84=B4=20?= =?UTF-8?q?=EB=A7=88=EC=A7=80=EB=A7=89=20request=20=EC=A0=80=EC=9E=A5?= =?UTF-8?q?=ED=95=98=EC=97=AC=20=EC=88=98=EC=8B=A0=EC=8B=9C=20=EB=8D=B0?= =?UTF-8?q?=EC=9D=B4=ED=84=B0=20=EC=B2=98=EB=A6=AC=20(=EC=88=98=EC=8B=A0?= =?UTF-8?q?=EB=8D=B0=EC=9D=B4=ED=84=B0=EC=97=90=20=EB=8D=B0=EC=9D=B4?= =?UTF-8?q?=ED=84=B0=20=EC=A2=85=EB=A5=98=20=EC=97=86=EB=8A=94=20=EB=AC=B8?= =?UTF-8?q?=EC=A0=9C=20=EB=B0=A9=EC=A7=80)=20-=20Ethernet=20=20=20?= =?UTF-8?q?=E3=84=B4=20=ED=98=84=20=EB=AA=85=EB=A0=B9=EC=96=B4=20AI=3F=20A?= =?UTF-8?q?O!=20PV=3F=20SV=3F=20SV!=20=EC=9E=91=EC=84=B1=20=20=20=E3=84=B4?= =?UTF-8?q?=20SV!=20=EC=9D=B8=20=EA=B2=BD=EC=9A=B0=20485=20send=20buff=20?= =?UTF-8?q?=EC=95=9E=EC=97=90=20=EC=A0=80=EC=9E=A5=ED=95=98=EC=97=AC=20?= =?UTF-8?q?=EC=B5=9C=EC=9A=B0=EC=84=A0=EC=88=9C=EC=9C=84=20=EA=B2=B0?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- FC_InferfaceBoard/.theia/launch.json | 2 +- FC_InferfaceBoard/Data_process.vi | Bin 0 -> 12840 bytes FC_InferfaceBoard/Ethernet.ino | 6 +- FC_InferfaceBoard/FC_InferfaceBoard.ino | 54 +++++++---- FC_InferfaceBoard/GPIO.ino | 8 +- FC_InferfaceBoard/MC9.ino | 16 +--- FC_InferfaceBoard/Processes.ino | 41 +++++--- FC_InferfaceBoard/RS485.ino | 122 ++++++++++++++++++++++++ FC_InferfaceBoard/TCPIP - Write Read.vi | Bin 37786 -> 39582 bytes FC_InferfaceBoard/Utils.ino | 54 +++++++++++ FC_InferfaceBoard/periodics.ino | 39 ++++---- 11 files changed, 272 insertions(+), 70 deletions(-) create mode 100644 FC_InferfaceBoard/Data_process.vi create mode 100644 FC_InferfaceBoard/RS485.ino diff --git a/FC_InferfaceBoard/.theia/launch.json b/FC_InferfaceBoard/.theia/launch.json index 7e4253b..9a49ac9 100644 --- a/FC_InferfaceBoard/.theia/launch.json +++ b/FC_InferfaceBoard/.theia/launch.json @@ -3,6 +3,6 @@ // Hover to view descriptions of existing attributes. "version": "0.2.0", "configurations": [ - + ] } diff --git a/FC_InferfaceBoard/Data_process.vi b/FC_InferfaceBoard/Data_process.vi new file mode 100644 index 0000000000000000000000000000000000000000..85673e70a4d62115dac8c89a3e1ac4c0d7e83e3f GIT binary patch literal 12840 zcmc(FbzD_V*Y*Jp-Q7rcw{%N)OShB=(j7_&f|P(XNJux*qS7fKAWAFU9m=;i;{EvE z`aSRO_xfxun?0y=+*YmA=7*9WOeuX=KBvpqmO0eCb( zu^@yHNZsO9pILmL#1o~s^gGYZs>jKrr(+@2(6u1sl+9DAfM0FYZ5s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Am%T;-bCM z>$H?qNhPuTMR~en;NDTd;tCUOLV~e=Y?@EWge1X7@IBo^Mvc}WQeyQdV#kVfB6ubU zi@1QW+f)G4??=m#qFHC+U(mGfE)eAI1-W!NdYV^*-No4Eg z?N6mlDBMLgooq%V<$P6=Z>7T>NTy`rO_8HhOnK?(1XadkZS;Ge35A-II6vGc720ep zYZZLJYlvNK{>a~NzVfYeGsSeETy`9?ut_Vnj+sA-0Z!e7bYeL75+B9_x3qMGRUMXM z+&7HasbaFl2jLyLLGI0N$IY%N1o%F#^`4ooQ3Uv@2_vr+%By>yVO+Lf`X20%7?a0v zt*49;aXx{)D-uGy%+R068AJTk!b*2l?Oome=L5Vm`uN&;^C9Z+XJM4Xam;1*+gwss zA~4~;L<@)nkwdFG`aTyJxpTruuR|qQsVAdy59Ex5N;11&+VGW=)2KDfZHYMv1oHiW z=xz4VXoYUF#KiWz>1LehX24lPO=YS=|48)wiBO+i`;XzCB~*IONT$q?#X9B#;`~N2 zyUuZuHcLsUeiw?UVXYZog8WRzuY@`0n3Q`f$!3nwV8uHy2uE}XKIoFw=R5)e2uRUL(2F%Px= zgCnF=|KZc`NUQ&9vrM($h2qJn z%X;1LjKImh#SIpbQ`eHc!Rpegzvc~UrL2DQ>uCtoOIKayX5OID$_f@%H}Tn0GXJz$ z3!L)&YO_a5=ASk{%V^)6{y?C+D*ucT9xAW!t1oyWU1{x`_TgFOv?Zl}whu4y)Bbq{ zA7R|E`M pin 22 for CH#1 -#define Snd_485 HIGH -#define Rcv_485 LOW - -void MC9_setup(){ - Serial1.setTimeout(300); - Serial1.begin(9600); - pinMode(RS485_OE_1, OUTPUT); - delay(10); - digitalWrite(RS485_OE_1, Rcv_485); -} +/* void read_mc9_req(String address){ if(!Wait_485){ String command = ""; @@ -70,4 +59,5 @@ void write_mc9(int arr[], int size){ Serial1.print("485 Write^^\r\n"); //Serial Write ADC_Value to RS-485 Bus Serial1.flush(); digitalWrite(RS485_OE_1, Rcv_485); delay(5); -} \ No newline at end of file +} +*/ \ No newline at end of file diff --git a/FC_InferfaceBoard/Processes.ino b/FC_InferfaceBoard/Processes.ino index 5cc8bd4..bc78848 100644 --- a/FC_InferfaceBoard/Processes.ino +++ b/FC_InferfaceBoard/Processes.ino @@ -1,6 +1,6 @@ // -String Prcss_AI(){ - String str = ""; +String Prcss_AI_Read(){ + String str = "AI?:"; for (int i = 0; i < Size_AI; i++) { char formattedNumber[5]; // 4자리 숫자 + 널 종료 문자 @@ -14,7 +14,7 @@ String Prcss_AI(){ } String Prcss_AO(unsigned int data[], int dataSize){ - String str = ""; + String str = "AO!:"; for(int i=0 ; i pin 22 for CH#1 +#define Snd_485 HIGH +#define Rcv_485 LOW + +#define MC9_10_PV "10DRS,08,0001CB" +#define MC9_10_SV "10DRS,08,0011CC" + +void RS485_setup(){ + Serial1.setTimeout(300); + Serial1.begin(9600); + pinMode(RS485_OE_1, OUTPUT); + delay(10); + digitalWrite(RS485_OE_1, Rcv_485); +} + +void send_485(){ + if(!Wait_485){ + String message = read_buff(Buff_485_Wr); + // Send request to return pv data + //Serial.println(Buff_485_Wr); + //Serial.print(message); + //Serial.print(" : "); + if(message != ""){ + latest_sent_msg = message; + message += "\r\n"; + digitalWrite(RS485_OE_1, Snd_485); delay(5); + Serial1.print(message); + returnTime = millis(); + Serial1.flush(); + digitalWrite(RS485_OE_1, Rcv_485); delay(5); + + Wait_485 = true; + Wait_485_cnt = 0; + } + else{ + //Serial.println("Free"); + } + + } + +} + +int read_485(){ + // Timeout code + if(Wait_485){ + Wait_485_cnt++; + if(Wait_485_cnt > 200){ // Timeout = periodic(100ms) x 200 = 2 sec + Serial.println("485 not responced... (Timeout)"); + latest_sent_msg = ""; + Wait_485 = false; + Wait_485_cnt = 0; + numOf485--; + return 0; + } + } + // Receive pv data + while(Wait_485 && (Serial1.available() > 0)) { + char c = Serial1.read(); + write_buff_c(Buff_485_Rd, c); + } + + String message = read_buff(Buff_485_Rd); + if(message != ""){ + + int addr; + String mode; + int data[8]; + int crc; + numOf485--; + //message.replace("\r\n",""); + //Serial.println(message); + if (parseMessage(message, addr, mode, data, crc)) { + + if(latest_sent_msg == MC9_10_PV){ + for(int i = 0 ; i < Size_PV ; i++){ + Values_10_PV[i] = data[i]; + } + } + if(latest_sent_msg == MC9_10_SV){ + for(int i = 0 ; i < Size_SV ; i++){ + Values_10_SV[i] = data[i]; + } + } + } else { + // OK가 아닌 경우 또는 파싱 오류가 발생한 경우 + Serial.println("error 485 read"); + } + Wait_485 = false; + Wait_485_cnt = 0; + } + return 1; +} + +int parseMessage(const String& message, int& addr, String& mode, int data[8], int& crc) { + char addrC[3], modeC[4], statusC[3]; + int dataC[8], crcC; + + if (message[0] == '\x02') { + message = message.substring(1); + } + + int ret = sscanf(message.c_str(), "%2s%3s,%2s,%4x,%4x,%4x,%4x,%4x,%4x,%4x,%4x%2x", + addrC, modeC, statusC, &dataC[0], &dataC[1], &dataC[2], &dataC[3], &dataC[4], &dataC[5], &dataC[6], &dataC[7], &crcC); + + + if (strcmp(statusC, "OK") != 0 || ret != 12) { + // 오류 처리 + return 0; + } + + // 복사 + addr = atoi(addrC); + mode = String(modeC); + for (int i = 0; i < 8; i++) { + data[i] = dataC[i]; + } + crc = crcC; + + return 1; +} + diff --git a/FC_InferfaceBoard/TCPIP - Write Read.vi b/FC_InferfaceBoard/TCPIP - Write Read.vi index 6973b410ac208da05261050538505b17c9a0fa7f..cd2adc2d87df83836ec54c1823818099a09d2c73 100644 GIT binary patch delta 19553 zcmbTcWmp`+*0u`-4Z+>rU4pwi!QEW~gFAz}yA#|Ug1ZNo;O_1&;S784_s{q9tiEd2 zy`EZKUEMR?b9Gf^ltAP(K>(FiltmG~f_;%wmsXGyQP%(iOG*O+gN6nJ10x2pJIMbc zW%dIT`mX@`1cL%gOL_&TL$RH06+8{na_F4IVmZsm|3(%iYOuK)(+`3;|1?iu; z$Y5AtV0UUiyhZRGrCTs&7)mLHK);L^^XM123R5#ddlYNQ-1q4=&h zpuO{>cYGy2uuCRhM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gFu5#m}^aSJ8hI9Ycr5Gy)gq=hD~2 z6nagSm7J3HYbqll0Q)#4O`y#7!dorl<%_%>P!f5{uD(xUs^Kq_VKVfW2McbYlLPO# zeJbBUPo3BhxoZJhN`fT%MkP&U3ZBUL$R3RfU8^gBab2AG)v|q~<_|DT4{{3NEl?ah z5Xh74it_*eD~E>GWCw`==mySi~M+5qp6tCJ8Fr!2n^g)E!JQ>3S?dC<_T1plXC>S#0V$ zFb$O5gGKBMrkGp>L=5PEge6KfmSj4a-))ZKpL2_UfmPA;EB~;rlfY$GV0U{LIu^8C?0HO*xv^sdOh)sZsH6YCE d0XteW#5uq-KtWd_yeP9IRUs%fF-5N|699a)Npt`J diff --git a/FC_InferfaceBoard/Utils.ino b/FC_InferfaceBoard/Utils.ino index e69de29..b4a5a75 100644 --- a/FC_InferfaceBoard/Utils.ino +++ b/FC_InferfaceBoard/Utils.ino @@ -0,0 +1,54 @@ +int write_buff_c(char* buff, char c) { + size_t len = strlen(buff); + if (len + 1 < BUFF_SIZE) { + buff[len] = c; + buff[len + 1] = '\0'; // 문자열의 끝을 나타내는 null 문자를 추가해야 합니다. + return 1; + } else { + Serial.println("Not enough space in buffer! (write c)"); + return 0; + } +} + + +int write_buff(char* buff, String str) { + const char* cstr = str.c_str(); + size_t len = strlen(cstr); + if (strlen(buff) + len < BUFF_SIZE) { + strcat(buff, cstr); + numOf485++; + return 1; + } else { + Serial.println("Not enough space in buffer! (write)"); + return 0; + } +} + +int write_buff_first(char* buff, String str) { + const char* cstr = str.c_str(); + size_t len = strlen(cstr); + if (strlen(buff) + len < BUFF_SIZE) { + char temp[BUFF_SIZE]; + strcpy(temp, buff); // copy existing content to temp buffer + strcpy(buff, cstr); // copy new string to buffer + strcat(buff, temp); // append old content to buffer + numOf485++; + return 1; + } else { + Serial.println("Not enough space in buffer! (prepend)"); + return 0; + } +} + +String read_buff(char* buff) { + char* pos = strstr(buff, "\r\n"); + String output = ""; + if (pos != nullptr) { + size_t len = pos - buff; + output = String(buff).substring(0, len); + + // Shift remaining string to the start + memmove(buff, pos + 2, strlen(pos + 2) + 1); + } + return output; +} \ No newline at end of file diff --git a/FC_InferfaceBoard/periodics.ino b/FC_InferfaceBoard/periodics.ino index ce01890..89b338a 100644 --- a/FC_InferfaceBoard/periodics.ino +++ b/FC_InferfaceBoard/periodics.ino @@ -1,38 +1,42 @@ // void Periodic_run(){ if(T_10ms){ - read_analog(Values_AI, Size_AI); - read_mc9(Values_PV, Size_PV); + read_analog(); T_10ms = false; } if(T_20ms){ - + read_485(); + send_485(); T_20ms = false; } if(T_50ms){ - + T_50ms = false; } if(T_100ms){ - + T_100ms = false; } if(T_200ms){ - + T_200ms = false; } if(T_500ms){ - read_mc9_req("10"); T_500ms = false; } - if(T_500ms_2){ - read_mc9_req("11"); - T_500ms_2 = false; - } if(T_1000ms){ - AnalogIn_Print(); + write_buff(Buff_485_Wr, MC9_10_PV); // 10 DRS num 8 from ch1 PV T_1000ms = false; } + if(T_2000ms){ + Serial.print("----- remain 485 buff : "); + Serial.println(numOf485); + T_2000ms = false; + } + if(T_5000ms){ + write_buff(Buff_485_Wr, MC9_10_SV); // 10 DRS num 8 from ch1 SV + T_5000ms = false; + } } void timer_10ms(){ msCnt += 10; @@ -53,11 +57,14 @@ void timer_10ms(){ if (msCnt % 500 == 0){ T_500ms = true; } - if ((msCnt+250) % 500 == 0){ - T_500ms_2 = true; - } - if (msCnt > 1000){ + if (msCnt % 1000 == 0){ T_1000ms = true; + } + if (msCnt % 2000 == 0){ + T_2000ms = true; + } + if (msCnt > 5000){ + T_5000ms = true; msCnt = 0; }