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?

CODESYS OPCUA Client

Last updated at Posted at 2024-08-13

データソースマネージャーで接続できなかったので
ストアからexampleを持ってきて接続することにした。
CODESYS Control Winが32bit版だったので32Bit版も入れた。

OPCUAClient Example

image.png
今のバージョンで開く

image.png
image.png
image.png
image.png
image.png
参照しているものは更新した

image.png
こっちもデバイスの更新をして更新

image.png
UAServerDataは使わないのでビルドから除いておいた
ビルドしてログイン

Visualization画面

Visualization画面で値を見るような感じになっていたので
Ua Expertのように設定するようになっていた。

image.png
ラズパイの設定に合わせてユーザーパスを入力してConnectする
image.png
ラズパイ側のセキュリティ設定でTrustedに入れて
再度Connectしたところ接続できた。

image.png

モニタ

image.png
address Spaceで表示された画面から
browser DownでPLC_PRGまで表示した

image.png

iSignalを選んでMonitor Valueを押すと
Monitored Items欄に表示された

書き込み

image.png
address SpaceでiRateを選んで
Attributes of selected nodeで
300と設定してWrite Valueで書き込み成功
CODESYS内では画面が小さくて使いずらいので
よく使う場合はブラウザで127.0.0.1:8080/webvisu.htmにアクセス

追記 AutoConnect

自動で接続するようにしてみた
UAClient内のVer inputにセキュリティ設定があったので変更
image.png
//Method Callingに接続の状態があったのでPrepareConnectに変更
image.png
ポリシーはOPCUAPolicy内のSelectPolicyを2と設定したら自動で接続できるようになった。
image.png

おまけ CODESYS Control Win 64Bit

image.png
32Bitは勝手に作られた気がしたけどなかったので
追加した
image.png
ConnectしてAcceptしたら同じように接続できた。

参考URL

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?