УкраїнськаEnglishmRussian
Вход/Новый
В теме нет новых постов

Clone controller from jlc


Автор Сообщение
Сообщение создано: 11. 09. 2025 [18:04]
walhi
Sergey Karpesh
Создатель темы
Зарегистрирован(а) с: 26.01.2016
Сообщения: 32
Good day. It is possible to clone controllers and parameters using a script on javalikecalc. According to the documentation, I have sketched out a simple code for an example. Is it possible to do such a manipulation with a remote host? I can do this through qtcfg, but I did not understand how to access the elements of a remote workstation.

JAVASCRIPT
src = SYS.DAQ.ModBus.Test;
target = SYS.DAQ.ModBus;
targetName = "NewPLC";
req = SYS.XMLNode("copy");
req.setAttr("path", src.nodePath() + "/obj".replace("/", "%2f"));
req.setAttr("src", src.nodePath());
if (typeof(src) == "TCntrNode:TController"){
	pref = "cntr_";
} else {
	pref = "prm_";
}
req.setAttr("dst", target.nodePath() + pref + targetName);
SYS.cntrReq(req);


By the way, the project wiki is not working at the moment.
Сообщение создано: 12. 09. 2025 [08:16]
roman
Roman Savochenko
Moderator
Contributor
Developer
Зарегистрирован(а) с: 12.12.2007
Сообщения: 3778
"walhi" wrote:

Good day. It is possible to clone controllers and parameters using a script on javalikecalc. According to the documentation, I have sketched out a simple code for an example. Is it possible to do such a manipulation with a remote host?

See to the argument "stat" of the SYS.cntrReq() function!

"walhi" wrote:

I can do this through qtcfg, but I did not understand how to access the elements of a remote workstation.

Just see to traffic from QTCfg to the remote host for understanding — http://oscada.org/wiki/Special:MyLanguage/Documents/Program_manual#TrDiagnostic

"walhi" wrote:

By the way, the project wiki is not working at the moment.

It is working but under a highly DDoS, so its can be restarted time from time in process of blocking hundred thousands of attacking hosts.

Learn, learn and learn better than work, work and work.



13669