2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

BECKOFF TwinCAT メモ

Last updated at Posted at 2023-03-12

ロボットポータル
https://qiita.com/carpenders/items/1a653b1ca831547c92d3

リンク集

技術資料入口
https://infosys.beckhoff.com/index_en.htm
TwinCAT 3 操作方法解説 / PLC開発環境 / C/C++
https://sites.google.com/site/twincathowto/home
PLC 開発環境
https://sites.google.com/site/twincathowto/twincat-3-plc?authuser=0
C/C++
https://sites.google.com/site/twincathowto/cc?authuser=0
TE1000 | TwinCAT 3 ADS-DLL C++ / C++ API
https://infosys.beckhoff.com/english.php?content=../content/1033/tc3_adsdll2/2880722187.html&id=
TR3042 | TwinCAT 3 C/C++ トレーニング申込み
https://www.beckhoff.com/ja-jp/support/training-offerings/tr3042/
TR3010 | TwinCAT 3 PLC 入門トレーニング申込み
https://www.beckhoff.com/ja-jp/support/training-offerings/tr3010/
pyads
https://pyads.readthedocs.io/
TwinCAT 3 | User Interface Archiving options
https://infosys.beckhoff.com/content/1033/tc3_userinterface/6818132747.html

PLC言語仕様

TwinCAT 3 | PLC ST Expressions
https://infosys.beckhoff.com/content/1033/tc3_plc_intro/2528237963.html?id=8642866414100594287
TwinCAT 3 | PLC Instructions IF FOR ...
https://infosys.beckhoff.com/content/1033/tc3_plc_intro/2528270219.html?id=4479193884139273617
TwinCAT 3 | PLC Operators
https://infosys.beckhoff.com/content/1033/tc3_plc_intro/2528853899.html?id=5626537595795891802
TwinCAT 3 | PLC CAL
https://infosys.beckhoff.com/content/1033/tc3_plc_intro/2529031307.html?id=5085925878371694093
TwinCAT 3 | PLC Extending a function block
https://infosys.beckhoff.com/content/1033/tc3_plc_intro/3537333899.html?id=8892074947972780295
TwinCAT 3 | PLC Numeric operators ABS SIN COS SQRT
https://infosys.beckhoff.com/content/1033/tc3_plc_intro/3998088715.html?id=4768942979681021174
TwinCAT 3 | PLC Arithmetic operators MOD
https://infosys.beckhoff.com/content/1033/tc3_plc_intro/3998062475.html?id=6375624531406308193
TwinCAT 3 | PLC Data types BOOL integer real
https://infosys.beckhoff.com/content/1033/tc3_plc_intro/2529388939.html?id=3451082169760117126
TwinCAT 2 | PLC Library: TcMC MC_Power MC_Reset ...
https://infosys.beckhoff.com/content/1033/tcplclibmc/10988439307.html?id=5159006294322695977
TwinCAT 3 | PLC Library: Tc2_MC2 Axis functions MC_Power MC_Reset
https://infosys.beckhoff.com/content/1033/tcplclib_tc2_mc2/70048011.html?id=4811118121030935517
TwinCAT 3 | PLC Library: Tc2_MC2 External set value generator MC_ExtSetPointGenEnable ...
https://infosys.beckhoff.com/content/1033/tcplclib_tc2_mc2/70075275.html?id=5677839607235691340
TwinCAT 3 | PLC Library: Tc2_Math LMOD
https://infosys.beckhoff.com/content/1033/tcplclib_tc2_math/68433291.html?id=5875956355134920105
NC Error Code
https://infosys.beckhoff.com/english.php?content=../content/1033/tcdiagnostics/2409379979.html&id=7981118574971453408

Tips

プロジェクトを比較

[TwinCAT] - [TcProjectCompare] .tsprojファイルを比較する

ライブラリを追加

[Solution] - [PlcProject4*] - [PLC] - [PLC1*] - [PLC1Project*] - [References] - 右クリック - [Add library] - [Motion] - [PTP] - [Tc2_MC2]
[Solution] - [PlcProject4*] - [PLC] - [PLC1*] - [PLC1Project*] - [References] - 右クリック - [Add library] - [Math] - [Tc2_Math]
*は各々のプロジェクト名称

質問

Q. コメント行がイタリックになるのを無効にするには?

[Tools]-[Options]-[TwinCAT]-[PLC Environment]-[Syntax highlighting]-[Display items]-[Comment]

Q. ADSによる変数アクセスとPLCプログラムによる変数アクセスは競合する?
A. ADS通信処理はリアルタイムタスクの隙間時間に実行されるため、考慮は不要です。

HyperV問題への対応

https://infosys.beckhoff.com/content/1033/tc3_overview/6162419083.html
下記の、PCおよびWindowsでリアルタイム機能を実行するための準備
https://sites.google.com/site/twincathowto/insutoruto-ji-ben-she-ding/runmodoheno-yi-xing?authuser=0

TwinCAT/PLCの設定

cpu-core-setting.jpg

BIOSの設定

Virtualizationを無効にする
ローカルPCでTwinCAT-PLCプログラムを実行する場合に必要

Intel Core CPUの場合

ThinkPad P14s Gen 3
Corei7-1260Pの場合

Intel Virtualization Technology = OFF これが必要
Intel VT-D Feature = ON

gpedit.exeを起動が必要かも

ローカルコンピューターポリシー > コンピューター構成 > 管理用テンプレート > システム > デバイスガード(DeviceGuard)
「仮想化ベースのセキュリティを有効にする」=「無効」

AMD Ryzen CPUの場合

HP ProBook 445 14 inch G10 Notebook PC
AMD Ryzen 7 7730U with Radeon Graphicsの場合

BIOS - Advanced - System options
SVM CPU Virtualization = OFF

HP ProBook 445 14 inch G11 Notebook PC
AMD Ryzen 7 7735U with Radeon Graphicsの場合
参考 https://support.hp.com/jp-ja/document/ish_5637156-5698290-16
参考 https://support.hp.com/us-en/document/ish_7755410-7692466-16

NOTE: Beginning in 2024, this setting is only available on PCs with Enterprise Security Edition. 
HPに確認したらこの機種ではBIOSでは変更できない、なんやねん

DELL Inspiron 14 5445
AMD Ryzen 7 8840U w/ Radeon 780M Graphicsの場合

BIOS - Advance
Virtualization = Disabled

TwinCATのツールを実行

TwinCATのActivateConfigurationでエラーの時は以下を実行し、Windows再起動

C:\TwinCAT\3.1\System> win8settick.bat

参照
https://qiita.com/k_ide/items/3c1f049179e8c280bee1
https://tsuna-can.hateblo.jp/entry/2021/02/19/080000

2
2
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
2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?