1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

CODESYS ラズパイ OPCUA Server

Posted at

ラズパイにてOPCUA serverを設定して繋ぐ

client

Ua Expert Version 1.7.1 540

プログラム

image.png

変数部分
VAR
	iCount:INT;
	bOnoff:BOOL;
	bUpDown:BOOL:=FALSE;
	iRate:INT:=100;
	iSignal:INT:=1000;
END_VAR
プログラム部分
iCount:=iCount+1;
//ONOFF
IF iCount MOD 20 = 0 THEN
	bOnoff:=NOT(bOnoff);
END_IF

//Sig
IF iSignal > 11000 OR iSignal < -1000 THEN
	iRate:=iRate*((2*TO_SINT(bUpDown))-1);
	bUpDown:=NOT(bUpDown);
END_IF
iSignal:=iSignal+iRate;

なんか動くやつを作っておきました。

image.png
シンボルってやつを作ってOPC UA機能をサポートにしておく

image.png
本来であればセキュリティなしで設定し
動かしたかったがなぜか繋がらなかったので
参考URLを見てセキュリティ有で接続

image.png
接続に成功上がUaExpart下がCODESYS

参考URL

https://www.unified-automation.com/products/development-tools/uaexpert.html
https://misoji-engineer.com/archives/opc-ua-security.html

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?