TwinCat Run Mode failing to start with adswarning 4131 - twincat

I am trying to start a twincat project on my pc in order to debug it. I've disabled the EtherCAT device and isolated a CPU on my windows 10 with an 8-core ADM processor. After trying to start the run mode, I get a fatal error on the target system. With following message:
'TwinCat System' (10000): Sending ams command >> Init4
RTime: Start Interrupt: Ticker started >> AdsWarning: 4131 (0x1023, RTIME: Intel CPU required) << failed!
I've searched the internet and am not able to find a solution to this problem. There seems to be little information about this. Anyone of you having an idea?

Answering my own question, just in case anyone else would come across the same problem: make sure when you isolate a CPU to emulate the PLC on that you also check it as the default one to be used. Just isolating isn't enough, you have to explicitly indicate the one to use.

Your answer appears to be right there in the message: Intel CPU required, but you stated you're trying to run it on an ADM (I assume AMD) processor.

Related

BG95 reboot by itself

I am building IOT device using a LTE modem form Quectel, the BG95, together with NXP imx6, running Linux. The sim card I am using has the technology of eMTC.
Normally the device is working fine, the issue I am having now, is that the device lost LTE communication randomly (typically after 3-6 days uptime).
My setup
I have disabled echo mode in the BG95 at my init procedure.
I have a periodical call to send AT command "AT+CREG?" toward BG95, and read the response.
What I am seeing from the debugging is following:
My periodical at command "AT+CREG" toward BG95 is not responding.
Linux kernel reports ttyUSB towards BG95 is disconnected.
3-4 seconds, the kernel reports ttyUSB toward BG95 is connected again.
My periodical AT command "AT+CREG" toward BG95 is returning ERROR.
I see from the serial reading from the BG95 has "APP RDY".
I see from the serial reading from the BG95 has echo mode enabled.
Form what I am seeing, I am assuming that the BG95 is somehow "rebooted".
Is there any reason why the BG95 will reboot itself? Or how to confirm this?
I checked the datasheet of BG95, but I cannot find a AT command or other way to check the boot reason.
Do you have other suggestion on how to debug this further? Or similar experience with BG95?
Thanks

TWINCAT 3 BECKHOFF CONFIGURATION PROBLEM CHANGING RUN MODE

I have a problem trying to change to run mode when the target device is the PLC (in local mode the problem disappears). It gives me the error: AdsError: 4115 (0x1013, RTIME: system clock setup fails). I have tried to execute win8settick.bat as administrator and rebooting so many times. I have checked the Hyper-V config and BIOS visualizator too. There is nothing that works for me. Any idea? Thank you
Ive only had this problem when trying to start it locally.
But one problem might be that the PLC time is way off. One suggestion to start troubleshooting would be to check the actual time on the PLC.
You can do this by either remotely accessing it via RDP or by plugging in a monitor and keyboard.
Sounds for me like a incompatibitility between TwinCAT-Realtime-System and the hardware. More exatly the CPU. What type of hardware do you use on your target system? Is it Beckhoff-Hardware or Third-Party. If third-party, which CPU?
Another topic could be the TC-Version related with the Target OS. Can you provide more information about this.

TwinCAT3 AdsWarning 4115: system clock setup fail

I've got problem with TwinCAT3 (Win10 64bit) when I try to active TC3.
Error message is :
Severity Code Description Project File Line Suppression State Error
19-Jan-19 11:42:34 AM 545 ms | 'TwinCAT System' (10000): Sending ams
command >> Init4\RTime: Start Interrupt: Ticker started >> AdsWarning:
4115 (0x1013, RTIME: system clock setup fails. Hint: On Windows8
system and above execute win8settick.bat in TwinCAT\3.1\System as
administrator and reboot.) << failed!
I also try to run "win8settick.bat" and reboot TC but it doesn't work!
Is there any recommend to solve this ? Thanks a lot!
I have had the problem few times. In all those situations, the BIOS settings have been OK. Executing the .bat file didn't help, until I ran it as an administrator and rebooted. Few times I have had to do it couple of times before it started working.
So try this
Open start menu and search for "Command prompt"
Right click it and select run as administrator
Navigate to "C:\TwinCAT\3.1\System" by writing "cd C:\TwinCAT\3.1\System"
Execute .bat by writing "win8settick.bat"
Reboot - Repeat if not working
For me, this has always fixed the problem. If you have incorrect BIOS settings, you would get different error that states something about virtualization (as far as I know).
You need to adjust your BIOS-settings according to:
http://www.contactandcoil.com/twincat-3-tutorial/quick-start/
(read chapter BIOS settings).
I suspect you may have Hyper-V enabled. Because of the way that 64-bit TwinCAT interacts with the processor (using Intel VT-x), it doesn't play well when hypervisors are running at the same time. Most hypervisors, like VMware, stop running when you close their window. However, Hyper-V (if enabled) is always running in the background so it must be disabled before using TwinCAT.
To Enable or Disable Hyper-V:
Right click on the Windows button and select ‘Apps and Features’.
Select Programs and Features on the right under related settings.
Select Turn Windows Features on or off.
Check or Uncheck Hyper-V and click OK.
source
In my case, installing TwinCAT 2 on top of an existing TwinCAT 3 installation was the problem.
According to Beckhoff, you need to "deactivate" TwinCAT 3 via "SwitchRuntime.exe" before installing TwinCAT 2, if installed in this order. In case of installing TwinCAT 3 on top of TwinCAT 2, you don't need this step.
https://infosys.beckhoff.com/english.php?content=../content/1033/tc3_installation/179471755.html&id=
If forgot this, which probably destroyed parts of my TwinCAT 3 installation in the background.
Even tough I set the installation directory to a new folder "C:\TwinCAT\TwinCAT_2" and not the default "C:\TwinCAT".
The installation process locked fine at first, only after trying to set a project into RUN while having TwinCAT 3 active as runtime, I got the above mentioned "AdsWarning: 4115".
Running "win8settick.bat" as admin and rebooting did not help, neither via explorer or command line.
Only re-installing TwinCAT3 did the trick for me.
What worked for me was to disable the Virtual machine platform in Windows Features.
In addition to the other answers, you'll get this error if you haven't setup the real-time cores to match the computer you're activating to:
I got the same issues. But I didn't try any of the above methods.
bcz I am scared about warning 'BitLocker trigger' from a user above!
Then I changed the real-time system settings:
error :
Severity Code Description Project File Line Suppression State
Error 27/08/2022 16:40:58 279 ms | 'TwinCAT System' (10000): Sending ams command >> Init4\RTime: Start Interrupt: Ticker started >> AdsError: 4115 (0x1013, RTIME: system clock setup fails.
Hint: On Windows8 system and above execute win8settick.bat in TwinCAT\3.1\System as administrator and reboot.) << failed!
settings: shared core 80%
new real-time setting: Isolated core 100 %
No error:
I didn't know the reason behind this!

Determining why kernel hangs on boot

hi :
i was building kernel for my gentoo linux . when i start the kernel , i
got this message , and can't going on.
pci_hotplug: PCI Hot Plug PCI Core version: 0.5
non-volatile memory driver v1.3
i don't know how to solve this problem . and i need help . thanks .
Why don't you try to disable pci hotplug support in kernel (if I recall correctly is in main config menu / PCI support)? You probably don't need this.
I'm going to have to disagree with those voting to close, because I think there really is a question here, and the question is "How to debug this?"
I'm going to propose two approaches:
1) Studious approach: Learn about mechanisms intended for handling boot problems. See if you can increase the kernel debug message level. Disable un-needed drivers as Quizzo suggested.
2) Cowboy approach: grep the kernel sources for strings seen in the final messages, and start shotgunning all possibly relevant bits of code with your own "still alive at" printk messages. Once you know where it's hanging, figure out why and either remove that mechanism or fix it.
At an extreme there's also a tool for debugging the kernel - kgdb - which you could set up if you have a second machine available.
If you already have linux running on this box, see if there's a config.gz in /proc or in a boot folder which you can extract and compare to the configuration you are trying to compile. It might not be a bad idea to first recompile and test exactly the same version and configuration as you have running, and then make desired changes one by one.
Also you might see if there's odd hardware in your system you could temporarily remove. For example, an older PC I have has a bios that hangs during drive enumeration if I have a large USB external drive plugged in during boot.
i have solved the problem by enable all pci hotplug flag in kernel config file.
thinks all.

Can a simple program be responsible for a BSOD?

I've got a customer who told me that my program (simple user-land program, not a driver) is crashing his system with a Blue Screen Of Death (BSOD). He says he has never encountered that with other program and that he can reproduce it easily with mine.
The BSOD is of type CRITICAL_OBJECT_TERMINATION (0x000000F4) with object type 0x3 (process): A process or thread crucial to system operation has unexpectedly exited or been terminate.
Can a simple program be responsible for a BSOD (even on Vista...) or should he check the hardware or OS installation?
Just because your program isn't a driver doesn't mean it won't use a driver.
In theory, your code shouldn't be able to BSOD the computer. It's up to the OS to make sure that doesn't happen. By definition, that means there's a problem somewhere either in hardware or in code other than your program. That doesn't preclude there being a bug in your code as well though.
The easiest way to cause a BSOD with a user-space program is (afaik) to kill the Windows subsystem process (csrss.exe). This doesn't need faulty hardware nor a bug in the kernel or a driver, it only needs administrator privileges1.
What is your code exactly doing? The error message ("A process or thread crucial to system operation has unexpectedly exited or been terminate.") sounds like one of the essential system processes terminated. Maybe you are killing a process and unintentionally got the wrong process?
If somehow possible you could try to get a memory dump from that customer. Using the Debugging Tools for Windows you can then further analyze that dump as described here.
1Windows doesn't prevent you from doing so because it "keeps administrators in control of their computer". So this is by design and not a bug. Read Raymond's articles and you will see why.
Short answer is yes. Long answer depends on what is you program is suppose to do and how it does it?
Normally, it shouldn't. If it does, there must be either
A bug in the Windows kernel (possible but very unlikely)
A bug in a device driver (not necessarily in a device your program uses, this could get quite complicated)
A fault in the hardware
I would bet on option number two (device driver) but it would be interesting if you could get us a more detailed dump.
Well, yes it can - but for many different reasons.
That's why we test on different machines, operating systems, hardware etc..
Have you set some requirements for your program and is your user following them?
If you can't duplicate it yourself, and your program doesn't need admin to run, I'd be a bit suspicous about
The stability of that system's hardware
The virus/malware status of that system.
If you can get physical access to the client box, it might be worth running a full virus scan with an up-to-date scanner, and running a full memtest on it.
I had a system once that seemed stable, except that a certian few programs wouldn't run on it (and would sometimes crash the box). Memtest showed my RAM had some bad bits, but they were in higer sims, so they only got accessed if a program tried to use a lot of RAM.
No, and that is pretty much by definition. The worst thing that you can say is that a user-land application may have "triggered" a Windows bug or a driver bug. But a modern desktop Operating System is fully responsible for its own integrity; a BSOD is a failure of that integrity. Therefore the OS is responsible, and only the OS.
(Example of a BSOD bug that your application alone could expose: a virus scanner implemented as a driver, that crashes when executing a file from sector 0xFFFFFFFF, a sector that on this one machine just happens to contain one DLL of your application)
I had problems when exit my app without stopping all the processes and BD connections when the program ends (I crashed the entire IDE). I place the "stopping and disconnecting" code in the "Terminate" of "Form_Closed" event of my main form and the problem wa solved, I don't know it this is your situation.
Another problem can be if the user is trying to access the same resources your app is using (databases, hardware, sockets, etc). Ask him/her about what apps he/she is using when the BSOD happens.
A virus can't be discarded.

Resources