TwinCAT3xml存储配置文件程序
TwinCAT3xml存储配置⽂件程序//写⼊配置信息步
CASE nWriteStep OF
ENUM_config_xml.nInitial://复位动作
XmlSrvWriteByNameFb.bExecute:=FALSE;
l.bWrite THEN
configXml.status.bError:=FALSE;
configXml.status.sComment:="";
configXml.status.bWriteDone:=FALSE;
nWriteStep:=ENUM_config_xml.nWrite;
END_IF
ENUM_config_xml.nWrite://写⼊数据
XmlSrvWriteByNameFb.bExecute:=TRUE;
IF XmlSrvWriteByNameFb.bBusy THEN
nWriteStep:=ENUM_config_xml.nWhetherWrite;
END_IF
ENUM_config_xml.nWhetherWrite://判断数据是否写⼊
IF XmlSrvWriteByNameFb.bError THEN
configXml.status.bError:=TRUE;
configXml.status.sComment:="写配置失败";
nWriteStep:=ENUM_config_xml.nInitial;
END_IF
IF NOT XmlSrvWriteByNameFb.bBusy AND NOT XmlSrvWriteByNameFb.bError THEN
运动会宣传语
configXml.status.bWriteDone:=TRUE;
configXml.status.sComment:="写配置写⼊完成";
nWriteStep:=ENUM_config_xml.nInitial;
END_IF
END_CASE
//读取配置信息步
胶原蛋白的主要功效CASE nReadStep OF
ENUM_config_xml.nInitial://复位动作
XmlSrvReadByNameFb.bExecute:=FALSE;
l.bRead THEN
血月现象女孩为什么不能看
configXml.status.bError:=FALSE;
configXml.status.sComment:="";
configXml.status.bReadDone:=FALSE;
nReadStep:=ENUM_config_xml.nRead;
顺丰快递单号查询网END_IF
ENUM_config_xml.nRead://读取数据
XmlSrvReadByNameFb.bExecute:=TRUE;
IF XmlSrvReadByNameFb.bBusy THEN
nReadStep:=ENUM_config_xml.nWhetherRead;
END_IF
ENUM_config_xml.nWhetherRead://判断数据是否读取
IF XmlSrvReadByNameFb.bError THEN
configXml.status.bError:=TRUE;
纳税筹划税收筹划
configXml.status.sComment:="读配置失败";
nReadFail:=nReadFail+1;
IF nReadFail<5 THEN
END_IF
nReadStep:=ENUM_config_xml.nInitial;
END_IF
IF NOT XmlSrvReadByNameFb.bBusy AND NOT XmlSrvReadByNameFb.bError THEN
configXml.status.bReadDone:=TRUE;
configXml.status.bReadDone:=TRUE;
configXml.status.sComment:="读配置读取完成";  nReadStep:=ENUM_config_xml.nInitial;
END_IF
END_CASE
//功能块
XmlSrvReadByNameFb(
sNetId:='',
ePath:=,
nMode:=,
sSymName:=configXml.parameter.sSymName , sFilePath:=configXml.parameter.sFilePath ,
sXPath:=configXml.parameter.sXPath ,
bExecute:=,
追女孩子的短信tTimeout:=T#10S ,
bBusy=>,
bError=>,
nErrId=>);
XmlSrvWriteByNameFb(
sNetId:='',
ePath:=,
nMode:=XMLSRV_ADDMISSING ,
sSymName:=configXml.parameter.sSymName , sFilePath:=configXml.parameter.sFilePath ,
sXPath:=configXml.parameter.sXPath ,
bExecute:=,
tTimeout:=T#10S ,
bBusy=>,
bError=>,
nErrId=>);

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。