Beckhoff TwinCAT Frequently Asked Questions (Part15)

Q: Scope2 prompts that it cannot find TcScopeServer.
A: 

If the scope server is not installed on the controller, you can modify the configuration and check the option to use the local server.



Q:When I start SFC programming and double-click on a step, it prompts "Copy reference" and "copy implementation". What's the difference between them?


A: When copying a step, "Copy reference" will also copy the associated action along with it. However, when using "copy implementation" to copy a step, it will create a brand new Action.


Please note that if you choose "Copy reference" but later decide to create a new Action while copying the step, you need to check the "Duplicate on copy" property.


Q: During the installation of TF6100: Integrate TF6100 OPC-UA in Microsoft Visual Studio

Answer:
After updating TF6100 to version 4.3.32.0, the default installation of the configurator prompts the need to embed into VS or shell during installation.

However, when installing the TF6100 service on a controller that only has a runtime core, there is no corresponding option. Therefore, you must select custom setup.

After removing the first configurator, click "Next" to complete the installation.

Q: After adding a route, there is no X, but a lock or S instead. (secure ADS)
A: After version 4024, when adding a route, the following options will pop up. If you check "secure ads," the symbol representing the added route will be replaced with an S or a lock instead of an X, indicating that the route has been successfully added. Using this option can encrypt ADS communication data to prevent it from being monitored by packet capture tools.

If you do not need this feature, you can right-click on the software's running icon and select "edit routes" to remove this default checkmark.




If the encryption has already been applied but needs to be removed, you need to remotely access the device's local area to clear the routing table and then re-add the route.

Q: When opening an old program in the new version of TwinCAT3, it prompts "Could not open library '#Tc3_Interfaces'. How should I handle this?"



A: "tc3_interfaces" is used in versions lower than 4024. If the new version of TwinCAT3 prompts that it is not installed when opening an old program, simply delete it.

Q: How do I read and write variables with PTCID in a program to monitor data from TwinCAT C++, MATLAB, robot models, and XTS models using a scope?


A:In projects that utilize TcCOM Objects, such as TwinCAT C++, MATLAB, robot models, and XTS models, as shown in the following diagram,

If you want to read and write these parameters in a PLC program, here's how you can do it:



There are two methods:

The first method (advantage: allows reading by variable name)

① These objects need to be bound to tasks. After establishing the corresponding tasks, select the "create symbol" option in the task settings.


It is necessary to ensure that both are running as TcCOM components in the Runtime.


The Scope service locates the data area of the corresponding variables in the TcCOM components through the Symbol, thus reading the values of the relevant variables.

② To access the PTCID variable, there is a column called CS, and you need to check the box next to CS.

If you need to monitor variables through Scope, you need to create a Symbol for the corresponding TcCOM component for the Scope service to locate. Here, taking TcC++ and TcSimulink as examples to create Symbols (the Symbol creation method for other TcCOM components in TwinCAT is the same).

Example: Double-click on the two TcCOM instance icons in the image above -> select the "Data Area" tab -> check the CS checkbox next to the variables you want to monitor -> reactivate the project, and you can then index the corresponding variables in Scope.

③ After activating the configuration, you can directly see the corresponding variable (for instance, the variable is: Object1 (untitled).CallBy) using the target browser. This method is applicable to many similar scenarios.



The second method (reading directly using variable addresses)

① As can be observed through the above method, the addresses of these variables follow a pattern. If you don't need to use variable names, you can directly use this method.





  Like my work? Consider a donation! 👇