You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

49 lines
959 B
Arduino

String Prcss_AI(){
String str = "";
for (int i = 0; i < Size_AI; i++) {
char formattedNumber[5]; // 4자리 숫자 + 널 종료 문자
sprintf(formattedNumber, "%04X", Values_AI[i]); // 4자리로 고정된 형식의 문자열 생성
str += formattedNumber; // 형식화된 문자열 추가
//str += String(AI_VALUES[i]);
str += ',';
}
str += RcvOK;
return str;
}
String Prcss_AO(unsigned int data[], int dataSize){
String str = "";
for(int i=0 ; i<dataSize ; i++){
str += String(data[i]);
str += "\t";
}
Serial.println(str);
return RcvOK;
}
String Prcss_RS(String message){
Serial.println(message);
return RcvOK;
}
String Prcss_PV(){
String str = "PV ";
digitalWrite(RS485_OE_1, Snd_485);
Serial1.print("485 Read!!"); //Serial Write ADC_Value to RS-485 Bus
str += RcvOK;
return str;
}
String Prcss_SV(){
String str = "SV ";
str += RcvOK;
return str;
}