Why am I getting the error 0x4626 when using MC_TorqueControl in simulation mode in TwinCAT? - twincat

I'm trying to run MC_TorqueControl in simulation mode, but I get the following error:
Group function is rejected with error-code 0x4626 or the function is not supported ! and The axis function 'TorqueControl' has been declined because it's not possible to read the currend generic drive operation mode (error: 0x4626) (sic).
Why is that?

Simulation mode is not supported for TwinCAT versions <3.1.4024.35. To make it work, update both your TwinCAT XAR (runtime) and TwinCAT XAE (engineering) to version >=3.1.4024.35.

Related

Sample executable hanging after fresh Windows OMNeT++ Installation

I was trying to use OMNeT++ earlier today but I was unable to get any simulation to run. I tried numerous model simulations but they began hanging at the same place during initialization. I deleted and re-installed OMNeT++, but the problem persists. So even after a fresh install of OMNeT++ v5.5.1 on a Windows 10 v1903 machine, I am unable to run any simulation. This is what I saw when I ran the Aloha sample simulation executable directly after following all the OMNeT++ installation steps:
The Qtenv simulation window starts up but it's completely blank, and I can't actually focus on it, which leads me to believe there's something up with Qt. The program hangs indefinitely at this point. OMNeT++ was configured using the default values found in configure.user.
Any suggestions?
EDIT:
This is the last console output I receive after running QT_LOGGING_RULES="*.debug=true" ./aloha.
This is the last console output I receive after running QT_DEBUG_PLUGINS=1 ./aloha.
Did you connect additional monitor to your computer? Sometimes Windows remember position of an application on non-existed screen. Try to change your screen properties or connect second screen and look for Qtenv window of Aloha simulation.
Besides the above, delete .qtenvrc from samples/aloha.

TwinCat issue : state change to op mode failed master state preop is insufficient

I am using TwinCat to connect to my slaves , once I am running TwinCat in config mode all slaves go to op mode. When I switch running TwinCat to run mode : error box : state change to op mode failed master state preop is insufficient. I tried to run TwinCat in ‘’ run mode’’ in order to run the plc code.
The plc code is running fine without any error . Do I need to link something? How can I resolve this problem thanks in advance
Same problem, but I had problem with task. I imported another one, linked one variable, and it worked.

"The operating system is not presently configured to run this application" Error when Running MAPI App

Thank you for your reply and comments.
Let me describe the situation more detailedly.
I use Visual C++ 2008 to write a small application that will invoke MAPI. I use MAPIStubLibrary to support both 32bit and 64bit MAPI. MAPIStubLibrary can be found at https://msdn.microsoft.com/en-us/library/office/cc963763.aspx#sectionSection2 . It works on other versions of Outlook and most of the systems. However, under Windows 10(32bit) with Office 2016(32bit) installed, when I execute the following statement to initialize MAPI:
MAPIInitialize(NULL);
I will get the above error message "The operating system is not presently configured to run this application". And there will be an unhandled exception raised from the function GetDefaultMapiHandle(), which is in StubUtils.cpp, part of the MAPIStubLibrary.
The exact line that cause the exception is:
hinstMapi = LoadLibraryW(wzPath);
It seems that MAPIStubLibrary is trying to load 32bit MAPI but fails. wzPath is pointing to olmapi32.dll instead of msmapi32.dll.
In the error message, if I click “OK” button in the error messagebox, the application will continue running without problems. However, the error message is still frustrating and confusing the users. Therefore, how to eliminate the error?
Thank you very much.
This usually happens when you are either loading a wrong MAPI dll (e.g. olmapi32.dll instead of msmapi32.dll) or if your app is running in the compatibility mode (do you include a manifest?) and the MAPI system ends up patching wrong Windows API functions assuming an older version of Windows.

"dos: Memory allocation error" while loading 'mingw-0.9.3-0'

"dos: Memory allocation error" occurs while loading 'mingw-0.9.3-0' on Scilab 5.5.2.
How can I get rid of these messages?
ATOMS (Scilab's Module Manager) prompted me to install MinGW because some Scilab demos are available only when gcc is installed.
My Machine is 64-bit Windows10 and my Scilab is also a 64-bit version, so I chose a 64-bit version of MinGW.
After that, I installed the interface between them through ATOMS, and restarted Scilab. Then, I got this message:
Startup execution:
loading initial environment
Mingw Compiler support for Scilab
Load macros
Warning !!!
Scilab has found a critical error (EXCEPTION_ACCESS_VIOLATION)
with "stacksize" function.
Save your data and restart Scilab.
Converting Libraries.
Build libblasplus.a
atomsLoad: An error occurred while loading 'mingw-0.9.3-0':
dos: Memory allocation error.
... I searched a solution and all I found is this thread:
https://atoms.scilab.org/toolboxes/mingw
Although their error messages (Undefined operation) are different from mine (Memory allocation error), this seems to be a bug which has not been fixed yet. Incidentally, I already started Scilab with "Run as Administrator" option and no luck. Is there any solution?
I'm also fighting with this problem for a while. Seems to be a incompatibility of the stacksize function on win10 machines.
This fix is working for me:
Find the mingw.start file, it is probably in the directory "scilab-5.5.2\contrib\mingw\0.9.3-0\etc".
Comment out the row #49 with the stacksize('max') order by placing "//" in front of the row
Start scilab, at the first run scilab builds up some libs with mingw so it needs more time than usual

Different behaviour of code (debugging or not & different computers)

I have created a program which runs 2 threads synchronized using events (SetEvent(), WaitForSingleObject(), WaitForMultipleObjects()) in Visual Studio 2010. The following happens:
when I run this program using the debugger it runs for a certain time and then crashes
when I run this program without debugging (.exe file) it crashes directly
when I run this program in another computer using the debugger it crashes immediately and via .exe file it crashes after some time
The following error has been reported when debugging:
Unhandled exception at 0x5eafcaf7 (msvcr100d.dll) in test.exe: 0xC0000005: Access violation reading location 0x0036f000.
Could somebody bring some light to this topic as I don't know where to start searching? Which is the difference between running the code in the debugger or without? (Which kind of code is added?) Why do the different computers have different behaviours when running the same code?
In both computers there is exactly the same operating system (Windows 7) and I assume the same libraries and patches.
Thank you for your help!
EDIT 11.12.2012
I have installed Application Verifier and get in Visual Studio some errors displayed as this:
===========================================================
VERIFIER STOP 0000000000000013: pid 0x1E18: first chance access violation for
current stack trace
000000000874F000 : Invalid address being accessed
000000005201CAF7 : Code performing invalid access
000000000009E440 : Exception record. Use .exr to display it.
000000000009DF50 : Context record. Use .cxr to display it.
===========================================================
Does somebody know how I can see which address belongs to which line of code to know exactly where the exception occurs? I have also read in the Help of the program that using the command "!heap p -a ACCESS_ADDRESS" should give details about the nature of the error and what heap block is overrun. Where should I place this command using Visual Studio?
When working in a multi-threaded environment, things can happen at different speeds on different threads. Trying to identify the possible cause without the relevant code is quite difficult.
The error is a general memory access violation error. This usually occurs when a variable being returned from a function is bigger than expected, or different type.
Can we see the code please?

Resources