Beckhoff TwinCAT Frequently Asked Questions and Answers(Part25)

 Q: Can the background color of the rectangular box in PLC-HMI be set to transparent (no fill color) in TwinCAT3?

A: Select the rectangular box, and in the Properties pane, navigate to Colors -> Normal state -> Fill color -> Transparency. The default value is 255; changing it to 0 will result in a no-fill color state.



Q: After modifying the PLC task, there is no error reported upon activation, but the login program controller crashes. What should I do?

A: First, revert the PLC task back to the default 10ms and re-activate it. Check if the CPU utilization rate is close to the set 80% upper limit. Then, gradually increase the PLC task speed, while monitoring the CPU utilization rate every time you log in. If the utilization rate becomes too high, you should not increase the task speed any further.


Q: After modifying the PLC task, there is no error reported upon activation, but the login program controller crashes. What should I do?

A: First, revert the PLC task back to the default 10ms and re-activate it. Check if the CPU utilization rate is close to the set 80% upper limit. Then, gradually increase the PLC task speed, while monitoring the CPU utilization rate every time you log in. If the utilization rate becomes too high, you should not increase the task speed any further.


Q: How to create multiple user groups for user management in TwinCAT 3 PLC HMI?

A: To create multiple user groups for user management in TwinCAT 3 PLC HMI, first create a default user group and then select the option to export in the format suitable for TwinCAT versions 4018 and later. This ensures compatibility with the TwinCAT 3 PLC HMI system.


  1. Export the CSV file. Then, manually add the desired user group, and you can modify the specific permissions within TwinCAT later.


  1. After making the modifications, import into TwinCAT.


  1. The storage path for the user management file is: C:\TwinCAT\3.1\Boot\Plc\Port_851\Visu\port_851_visuusermgmtdb.csv

Q: How do I add a custom data type and use it for novram or EAP after defining a custom array?

A: In TC2, the way to add a custom data type is as follows:



Q: How to create an interface for an array type in TwinCAT C++?

A: If you need to create an interface for an array variable, you need to follow these steps:

  1. Create a new custom data type in the PLC variables section. After creating it, right-click on it and select the option to generate the necessary code (the exact option may vary depending on TwinCAT's version and IDE). Once successful, the variable type will be available in the list of data types.



  2. Here, you can then select "New" in the type system to create a variable of this type. In the C++ tmc file editor,
  3. After successful creation, the variable type will appear here. Then, in the type system, select "New" to create a variable of this type. You will also be able to select this array variable in the C++ tmc file editor.

Q: MATLAB Error: ADS error 0x274d

A: Check if the local TwinCAT service is running properly.

Q: How to get the EtherCAT timestamp time DC System Time (DCsystime) DC Sync Clock (64 bit)?

A:


There must be at least one module that supports DC functionality, such as the AX5000 series drives or the EL1259 module, otherwise, this tab will not be available.

Q: I encountered an error when trying to add a library file, and it prompted that "it is being used by another process."

A:


The error message indicates that there is already a library file with the same name but a different version installed on your computer, and this library has been referenced in your current project. To resolve the issue, you can either remove the reference from your project and try reinstalling the library, or create a new empty project to install the library file.

Q: When attempting to use fullscreen display in TC2 on a wes7 controller, an error message appears stating "please install gClient.dll first" during the installation of the supplement.

A: To resolve the issue of fullscreen display on a wes7 controller with TwinCAT 2, follow these steps:

  1. Locate a computer with a full installation of TwinCAT 2 and copy the gClient.dll file from the C:/twincat/Plc directory to the C:/twincat/Plc directory on the controller (you may need to create the Plc directory on the controller). Start with just copying this one file.

  2. Install the supplement on the controller.

  3. Configure the fullscreen display in your TwinCAT project. Ensure that you log in and download the program first, save it, and then copy the complete project to the controller.

  4. When running the .exe file, you may encounter additional errors indicating missing DLLs. Similar to step 1, locate these DLLs on your computer and copy them to the controller. There may be approximately 4-5 files required. Copying these files will resolve the remaining errors.

Q: When using the F12 shortcut to navigate to the definition of a Function Block, can TwinCAT3 automatically expand the folder path of the FB in the directory tree when the corresponding FB is opened?

A: Yes, this can be achieved by enabling a setting in Visual Studio.

  1. In the tree list, select "Project and Solutions" -> "General," and check the "Track Active Item in Solution Explorer" option.

  2. In the tree list, select "Project and Solutions" -> "General," and check the "Track Active Item in Solution Explorer" option.

    Like my work? Consider a donation! 👇