Beckhoff TwinCAT Frequently Asked Questions (Part10)

Q: How to use Novram in TwinCAT3?

A: In TwinCAT3, novram provides a new and fast method to achieve power-off data retention by directly mapping instances to novram after declaring Retain variables. For detailed configuration, please refer to the info link.

The Novram space of CX9020 is 128KB, but due to data consistency issues, the official recommendation is to store data less than 63KB in Novram.

https://infosys.beckhoff.com/content/1033/cx9020_hw/34647782514569642507.html?id=6490672501385759635


Export/Import Data

"Auto init linked outputs" means that after binding variables for the first time, the Novram area will be initialized to store the variables (this option is generally not checked for the new method).

If you want to clear the data in the Novram area, you can export it, set the data inside to 0, and then import it back.

Q: No program on the controller! Should I download the new program?
A: After downloading the program in TwinCAT2, it prompts that there is no program code every time after reboot, requiring re-download.

  1. First, confirm that the program has been successfully downloaded by checking the code file TCPLC_P_x.wbp and its modification date in the boot folder located in the TwinCAT directory on the local system drive of the controller.

  2. If there is no file or the download time does not match, it is necessary to check if the FBWF (File-Based Write Filter) and EWF (Enhanced Write Filter) file protection features are enabled. Confirm that the status of both tools on the desktop is set to "disable". If they are enabled, disable them before downloading.
  3. If none of the above issues exist, then confirm whether the boot port used by this controller is enabled in the system manager.
    Q: How do I create a custom variable type when configuring the network using TC2 software?

    A: 
    Please see the screenshot for specific settings.

Q: The EL1918 and EL2904 modules cannot be recognized when configuring them in the safety logic.
A: The issue is that the modules have been identified and their status is OP (Operational) during the IO scan in configuration mode, but they cannot be normally recognized in the SAFETY (Safety Logic) configuration:

The solution is to go to the EtherCAT device of the IO in the configuration mode, find the abnormal module, right-click to delete it, manually add a module of the same model in the original location, and then reload the IO to recognize the safety configuration again.


If the module cannot be recognized even after manual addition, please note that the operation shown in Figure 1 should not be performed before the manual addition.
Q: When entering a password in Visualization, how can I keep the content secret and display it as asterisks () instead?
A: Steps to achieve this: 1. When using the rectangle control to input a variable, check the "password field" option, so that the content you enter will be displayed as asterisks ().

Step 2: After the output is completed, if you want the content of the data box to also be displayed as asterisks (*), you need to map the output to another string variable.

This variable can be associated with a logic that converts the input content into a string, and then uses the len function to get the length and writes the corresponding number of asterisks (*).

  1. Modify the input variable in the input configuration; you cannot use the same variable for both input and display.



  2. Add logic to the output variable Voutput

Q: How to read the controller's operating system information, TwinCAT version, and other related information?
A:You can use the function block FB_GetDeviceIdentificationEx (from the TC_utility library) to achieve this. With this function block, you can retrieve various information about the controller's system version, hardware model, hardware version, serial number, image version, TwinCAT version, and more, as shown in the figure below.


Like my work? Consider a donation! 👇