手动调整参数

Keep Open and Learning
Post Reply
jiataifeng
Posts: 136
Joined: 30 Apr 2009 06:31

手动调整参数

Post by jiataifeng » 23 Nov 2018 03:44

动态调整参数82,83 参数map

Code: Select all

drive  AT %I* : ST_PlcDriveRef;
plcRef:ST_DriveRef;

plcRef.nDriveNo:=drive.nDriveNo;
plcRef.nDriveType:=drive.nDriveType;
plcRef.nSlaveAddr:=drive.nSlaveAddr;
plcRef.sNetId:=F_CreateAmsNetId(drive.aNetId);

IF start THEN
	write(sNetId:=plcRef.sNetId,nSlaveAddr:=plcRef.nSlaveAddr,nIdn := nIdn,nElement:=nElement,nDriveNo:=plcRef.nDriveNo,bCommand:=command,pSrcBuf:= ADR(val),cbBufLen:=SIZEOF(val),bExecute:=TRUE,bBusy=>busy);
	bError:=write.bError;
	nErrId:=write.nErrId;
ELSE
	write(sNetId:=plcRef.sNetId,nSlaveAddr:=plcRef.nSlaveAddr,nIdn := nIdn,nElement:=nElement,nDriveNo:=plcRef.nDriveNo,bCommand:=command,pSrcBuf:= ADR(val),cbBufLen:=SIZEOF(val),bExecute:=FALSE,bBusy=>busy);
END_IF

Last edited by jiataifeng on 23 Nov 2018 04:45, edited 1 time in total.


jiataifeng
Posts: 136
Joined: 30 Apr 2009 06:31

Re: 手动调整参数

Post by jiataifeng » 23 Nov 2018 04:46

MC_Power,开关

Post Reply