InformationModel.RemoteRead(variables, timeoutMilliseconds)

InformationModel.RemoteRead(variables, timeoutMilliseconds)

관심 변수 목록을 반환합니다.
static IEnumerable<RemoteVariableValue> RemoteRead(IEnumerable<RemoteVariable>
variables
, double
timeoutMilliseconds
);

인수

variables
(IEnumerable<RemoteVariable>)
관심 변수의 목록입니다.
timeoutMilliseconds
(double)
밀리초 단위로 표시되는 시간 초과 기간으로, 이 시간이 경과하면 API가 예외를 발생시킵니다.
팁: 지정하지 않을 경우 인수의 기본값은
30000
(30초)입니다.

반환

IEnumerable<RemoteVariableValue>
관심 변수 목록으로,
RemoteVariableValue
클래스의 다음 속성 쌍으로 표현됩니다.
Variable
(IUAVariable)
변수.
Value
(UAValue)
변수의 값.

예제

다음 예에서는 세 태그 변수의 값을 읽습니다. 관심 변수가
remoteVariables
목록에 있는
Get()
메서드를 사용하여 포함되고 검색되며, 이는
RemoteRead()
메서드의 인수로 전달됩니다. 읽은 값은 세 가지 다른 텍스트 상자를 사용하여 표시됩니다.
var tag1 = Project.Current.Get<Tag>("CommDrivers/CodesysDriver1/CodesysStation1/Tags/Application/PLC_PRG/VAR1"); var tag2 = Project.Current.Get<Tag>("CommDrivers/CodesysDriver2/CodesysStation1/Tags/Application/PLC_PRG/VAR1"); var tag3 = Project.Current.Get<Tag>("CommDrivers/CodesysDriver3/CodesysStation1/Tags/Application/PLC_PRG/VAR1"); var remoteVariables = new List<RemoteVariable>() { new RemoteVariable(tag1), new RemoteVariable(tag2), new RemoteVariable(tag3), }; var values = InformationModel.RemoteRead(remoteVariables).ToList(); textbox1.Text = values[0].Value; textbox2.Text = values[1].Value; textbox3.Text = values[2].Value;
의견을 작성 부탁드립니다.
이 자료에 대한 문의사항이나 요청사항이 있습니까? 여기에 요청사항을 작성 부탁드립니다.
Normal