网站首页 > 开源技术 正文
测试机台生存的Yield(Rdson/leakage)以.spd格式保存到本地硬盘,工程师会从本地查找需要的数据进行分析和追踪良率,
如果能写个脚本,自动获取硬盘,并存到数据库,可以很方便。
下面是利用R进行log的导入合并和存到数据库,不过还是无法通过网络涂胶去获取数据。
Code:
# probe log分析:
library(dplyr)
library(tidyr)
library(RODBC)
library(readr)
#访问DB:fdc/fdc
con<-odbcConnect("FDC","fdc","fdc") #连接b1fdcrpt
# 查询数据库中的数据表
tablelist<-sqlTables(con,as.is=TRUE)
#输出MappingYield表中的内容
# AOI<-sqlFetch(con,"MappingYield")
# 从数据表中查询符合的字段
# data<-sqlQuery(con,"select * from MappingYield where LotID='MP%'")
# 路径设置:
path<-"F:/6-数据分析/Probe/Log"
filename<-dir(path)
filelist<-paste(path,filename,sep="/")
# information get:
lot<-read.table(filelist[1],header=F,sep=",",quote="",nrows=1,skip=2)
lot<-data.frame(lot[,2])
names(lot)<-c("lot")
time<-read.table(filelist[1],header=F,sep=",",quote="",nrows=1,skip=5)
time<-data.frame(time[,2])
names(time)<-c("date")
lot_infor<-data.frame(lot,time)
data<-read_csv(filelist[1],col_names =TRUE,skip=11)
data<-data%>%select(`Bin#`,nA)
data<-data.frame(min(data$nA),mean(data$nA),max(data$nA))
names(data)<-c("min","average","max")
data<-cbind(lot_infor,data)
for(t in 2:length(filelist)){
# lot ID:
lot_new<-read.table(filelist[t],header=F,sep=",",quote="",nrows=1,skip=2)
lot_new<-data.frame(lot_new[,2])
names(lot_new)<-c("lot")
lot<-rbind(lot,lot_new)
# time handle:
time_new<-read.table(filelist[t],header=F,sep=",",quote="",nrows=1,skip=5)
time_new<-data.frame(time_new[,2])
names(time_new)<-c("date")
time<-rbind(time,time_new)
lot_infor_new<-data.frame(lot_new,time_new)
#读取nA数据:
data_new<-read_csv(filelist[t],col_names=TRUE,skip=11)
data_new<-select(data_new,`Bin#`,nA)
data_new<-data.frame(min(data_new$nA),mean(data_new$nA),max(data_new$nA))
names(data_new)<-c("min","average","max")
data_new<-cbind(lot_infor_new,data_new)
data<-rbind(data,data_new)
}
probe_leakage<-data
probe_leakage<-separate(probe_leakage,lot,c("Lot","Wafer"),remove=FALSE)
probe_leakage<-probe_leakage[,-1]
probe_leakage%>%unite(wafer,Lot,Wafer,sep=".",remove=FALSE)->probe_leakage
probe_leakage<-probe_leakage[,-3]
# probe_leakage 表格写入数据库里
sqlSave(con,probe_leakage,"probe_leakage",rowsname=FALSE,append=TRUE)
# 在保存表格时RStudio 闪退,不知道为什么?
#删除表格
# sqlDrop(con,"Probe")
# 关闭数据库
odbcClose(conn)
猜你喜欢
- 2024-10-11 国产操作系统安装配置auditd审计工具 | 统信 | 麒麟 | 中科方德
- 2024-10-11 压敏电阻烧坏的原因后果及解决办法
- 2024-10-11 matlab 让日常手机成为传感器和摄像头
- 2024-10-11 程序员的 Windows 工具箱「GitHub 热点速览」
- 2024-10-11 “File Renamer 24.8.14文件重命名工具,帮助用户批量重命名文件
- 2024-10-11 【期刊导读】HBsAg清除预测新指标:sPD-L1水平
- 2024-10-11 现代CMake的设计理念和使用(cmake的优点)
- 2024-10-11 如何实现一个 Paxos(如何实现一个手机三个号码)
- 2024-10-11 spdlog与Windows事件日志实操(windows 事件日志)
- 2024-10-11 C++日志库新选择:spdlog,性能与易用性的完美结合
你 发表评论:
欢迎- 最近发表
- 标签列表
-
- jdk (81)
- putty (66)
- rufus (78)
- 内网穿透 (89)
- okhttp (70)
- powertoys (74)
- windowsterminal (81)
- netcat (65)
- ghostscript (65)
- veracrypt (65)
- asp.netcore (70)
- wrk (67)
- aspose.words (80)
- itk (80)
- ajaxfileupload.js (66)
- sqlhelper (67)
- express.js (67)
- phpmailer (67)
- xjar (70)
- redisclient (78)
- wakeonlan (66)
- tinygo (85)
- startbbs (72)
- webftp (82)
- vsvim (79)
本文暂时没有评论,来添加一个吧(●'◡'●)