Beckhoff TwinCAT Frequently Asked Questions and Answers(Part27)

 Q: When importing TwinCAT into MATLAB, errors such as "FPU invalid operation" and "SSE invalid operation" occur.

A:Exception 'FPU invalid operation' in module 'arm.sys',start= 0x992ac000

offset= 0x52902

Code P1:0x00 P2:0x992fe902

P3:0x0000f881 P4:0xb271eeec

Stack 0x992fe365 <-0xaf1400a7 

<-0xaf18d3c5<-0xaf190043

Version: ?


Exception SSE invalid operation' in module 'niyundongxue2.sys.

start= fffff802afc70000 offset=0x1a94c

Code P1:0x10 P:fff028fc8a94c

P030000000000001d21 P4:0ffff987e72a2ec20

Stack 000000000000000< 0000000000000000

Version: ?



This solution applies to all FPU, SSE errors, and errors similar to page faults. Please check for calculation errors in the MATLAB program or corresponding programs.


For example, using an initial number as a divisor, which leads to direct division by zero, array data type overflow, taking the square root of a negative number, etc. The check function will not check for taking the square root of a negative number, so please write conditions to avoid it.

Q:Using the 64-bit TwinCAT software for online programming of BC9000 and BC9100 controllers (Port 800)

When utilizing the 64-bit TwinCAT 2 to control the BC9000 as demonstrated in the video,

I encountered a missing activation step, resulting in the inability to select Port 800 during the Choose Runtime process.


A:To address this, you can manually add a route directly on your local machine, which will then enable the selection of Port 800.

The routing information is as follows:

Box1(BC9000)_Device(Virtual-Ethernet)

IP Address: 172.16.17.3

Subnet Mask: 255.255.255.0 (Note: This is inferred from the IP address provided, as the original did not specify the subnet mask, which is crucial for routing)

Default Gateway (if applicable and known): 172.16.17.1 



Q:The error "target port not found" encountered during switching to runtime mode in TC3 programs is typically caused by:

A:The program has not been activated, or an attempt was made to manually switch to runtime mode without successful activation.

To resolve this, ensure that the program has been successfully activated before attempting to run it.


How do I perform multi-line indentation (alignment) in TwinCAT3?

To indent multiple lines of code in TwinCAT3, you can highlight (select) the desired lines and press the TAB key.

To reduce the indentation, you can use the combination Shift + TAB keys.

Q:When uploading a program using TwinCAT3, a warning appears stating, "Warning: An application 'Port_851' is currently in RUN mode on the PLC. As there is no matching compile information."



A:In the case where code exists, it is advisable to first conduct a program comparison. After obtaining the comparison information, proceed with the upload process.

Question: After license activation, the license status displays: "license issue time in the future"

Answer:

  1. Check the controller path at C:\TwinCAT\3.1\Target\License

    Remove the temporary license file "TrialLicense.tclrs" by cutting it out of the directory.

  2. Confirm the system time of the controller remotely or using a display to ensure it has not reverted to the factory default due to a dead battery. Manually synchronize the system time to the actual time.

    This issue can also cause newly created projects to display "wrong system id" in the online licenses section.


Question: win32 error: 1062

Answer:

  1. The TwinCAT 2 operation kernel is being used on a controller that is intended for TwinCAT 3.

  2. There is an authorization issue in the TwinCAT 2 controller, specifically with the XAR service being abnormal.

Question: Are there any function blocks in TwinCAT3 that provide a blinking functionality?

Answer:
Yes, starting from TwinCAT3 version 4024, there is a library named Util, which contains a function block called Blink that provides the blinking functionality.



The usage method is illustrated in the screenshot below:


ENABLE refers to the enable signal, TIMELOW represents the duration of the low level, and TIMEHIGH indicates the duration of the high level.

The OUT pin serves as the final output level.

Question: How do you add comments (using * *) to a program in TwinCAT 3 Ladder Diagram (LD)?

Answer:
Right-click on the program line and select "Toggle Network Comment State" to add or remove comments marked with * *.