Twincat 3: Modbus error 4 "ads mailbox full" turns on immediately in previously working project - modbus

I recently had a frustrating problem:
Modbus-connection throws in bError 4 as soon as bExecute is turned on. No variables could be read, and error persisted until reboot.
Previously working project stopped working over the weekend.
I might have fiddled around inside PLC, uninstalling couple libraries mainly, but logically thinking nothing should be wrong and I didnt do much at all. Its still possible I done goofed on friday, and didnt notice until after weekend.
On to the troubleshooting:
Reboot both machines
State machine is fine. Even made stripped-down project with one input and output and previously working minimalist state machine.
Reinstalled Modbus library in PC and PLC
Git revert the code couple weeks to a time when I 100% knew it worked.
PLC can ping PC in 1ms
Had an old project zipped in store, including "original" libraries
Reboot again
I still could wipe out PLC OS and start anew, but lets save that off for now.
"Thats all a mere mortal can do." I thought, and shot off a mail to Beckhoff.

Lets shoot off a mail to Beckhoff support.
Troubleshooting ensues:
Strip down the program even further, so only FB_MBReadInputs stays and bExecute can be flipped on or off manually.
Running only MBReadInputs, only MBWriteCoils, both at the same time
bError 4 problem persists no matter how much is stripped or ran.
Running the same project Locally on PC works just fine. Inputs can be read and output bits can be written.
In the end, flashing new image ended up being the solution.
Still in process of fiddling that out, so the actual problem isnt yet solved.
Update: Stuff works as it should. Some cosmic ray must have hit SD-card just right so during the weekend things got awry and problems surfaced.
Beckhoff image repo in my case: https://download.beckhoff.com/download/software/embPC-Control/CX90xx/CX9020/CE/TC3
Thats it, in the end wiping out SD-card is pretty basic thing to do when facing larger problems, but I just wanted to go through all the troubleshooting steps and end results for anyone struggling with Modbus and Twincat as much as I have.

I just reached out the same problem on CX8180. In my case there was some program uploaded before mine. I've activate my configuration and run PLC - get bError 4. TwinCAT errors code list says that is something with ADS mailbox and too much ADS calls. My program works fine on the same hardware elsewhere. Restart origin and activate configuration doesn't work.
I need to login with CeRHost and make a reboot of PLC. After that move communication works like a charm. The problem was the previous modbus communication.

Related

Pyscipopt (in Google Collab) does not show/print any output for the large-size network optimization problem in Google Collab

I am working on a non-linear network-optimization problem. When I run a large problem instance on the lab high-performance computers (imposing the time limit of 1 or 2 hours), those computers give me the output when the time is exhausted.
I wanted to use Google Collab to run the same code and to share it with my supervisors (they don't have Pyscipopt installed on their computers). However, when the problem size is small – all is good, but when the problem size is large, it says that the execution is completed (on the bottom of the screen) along with the time it took and a small red exclamation mark BUT it does not show any output for the large-size network optimization problems (neither it prints the solution nor it explains what is the reason/error of this behaviour).
Again, the same code works perfectly fine on high-performance computers, so I do not think there are any problems with syntax.
Please let me know if there are any solutions to the problem described.
Kind regards,
Lidiia
I tried to change "None" in the hardware accelerator to GPU and CPU. I tried to proofread the code in order to find any mistakes. I tried to not leave the Google Collab to run the code at night (I read somewhere that kernel stops working if there is inactivity) so I tried to click on something there to prevent the execution from stopping. Nothing worked.

Visual Studio Code keeps crashing while working

My visual studio code seems fine and all of the sudden boom its crashed. Searched google for the error code No solution found. Any help would be appreciated.
error code = -536870904
Whenever anything stops working for no apparent reason then think:
Did it work before?
No, it is new or it has not worked yet.
Check your download, ensure it is compatible with your operating system and other running programs.
Yes, it used to work, but now it doesn't.
Look at the next step
Did you recently update the program, your operating system or any other programs?
Yes, I updated something.
Try rolling back your updates to see if it works again. New versions of software tend to be more error prone than the older, established versions.
No, I don't think I changed anything.
Either you are unaware of changes made to your system or some subscription has ran out. At this phase, the best option is to use common sense or uninstall and reinstall.
Another issue that you might be having is if you're running too many programs at once and your computer is force closing programs to protect itself. Try monitoring your Task Manager you may see a spike right before the crash. Also, make sure the crash isn't caused because of trying to run code (especially with code that has infinite loops)

Unity machine learning using internal brain for pre-trained networks results in crash

I try to get the machine learning project of Unity running. The project can be found here: https://github.com/Unity-Technologies/ml-agents
Following all the necessary steps to set everything up, everything works fine until I try to use a pre-trained model in an internal brain, e.g in the 3D-Ball example. On pressing play in the editor, it says to have stopped working and the editor crashes. Same goes for a successfully compiled executable.
Since I can't find any crash logs, I absolutely don't know what's the cause to this. Anybody had the same issue and solved it, or any ideas on this?
I'll just add the steps I made to set my project up, in case somebody wants to reproduce or check for mistakes I made:
Download zipped project from github
Open project with Unity 2018.1.1f1
Add ENABLE_TENSORFLOW to predefined symbols
Download and install TensorflowSharp Plugin
In the 3DBall Scene select the brain and switch BrainType to Internal
Run in editor or compile and run, results both times in a crash
EDIT
What's making me wonder is that I got it working just fine training an external brain in python using a compiled executable. So my thoughts were it should be much more easy to just forward pass a trained net, if it's working doing forward pass and back propagation. But it says though that external brain still is experimental, so not sure if that just will not work until some future patches.
EDIT 2
So I tried using an internal brain in an older version of the githubs project, which then worked quite fine. Also I used an older version of the TensforflowSharp Plugin. I'll try to figure out, which version still works and gonna post my results here ;)
To conclude, the problem was actually the recent version of the TensorflowSharp Plugin. Using an older version, which I found somewhere worked fine. I don't have the link to that version anymore, but in case someone experiences the exact same problem, I could search for it or upload it somewhere.

Flash not running debugger any more. Possible socket issue in Windows-10?

Bounty Update
I am leaving the question essentially the same, but I just want to point out at the beginning here that I'm most interested in help trying to get the socket between flash (Adobe Animate) and the native debugger working again, as I believe that is the issue I'm having. Or is it a socket between flash and Windows?
Original Question
I've apparently turned something off? Even when I write really bad code (like trying to call a function that isn't there or divide an integer into a fraction), the flash player boots, shows a background color and stops there. No messages in the output window or compiler errors window. If I fix my code, it all runs fine, but for about 30 minutes (ever since I started trying to work with bitmaps for a sprite sheet) I get no runtime errors no matter what kind of mistake I type in my code. Anyone know how to turn it back on?
I've checked my actionscript settings and I have both warning mode and strict mode checked on.
Could it be a socket issue? I admit I have little to no experience working with sockets and only a surface understanding of what that even means. I've added the socket tag. If someone can see that this is clearly nothing to do with sockets, by all means, I'll remove the tag.
UPDATE: 6/22/16
I just reinstalled Adobe Animate CC 2015.2 and no change. I'll try compiling it in flash builder when I get a chance to help pigeon hole the problem. (Edit 6/24: flash builder worked! But my trial version expired the next day so is no longer a viable option).
And I just tried something in the command prompt in Windows 10 as an administrator:
netsh winsock reset catalog
netsh int ip reset reset.log hit
which I found another user on flashdevelop.org used to fix a similar issue, but no change.
And I just tried debugging in Flash Builder. It worked fine (debugger caught bugs) but my trial version expired the next day.
update 6/24
I've tried launching debugger for AIR from within the Adobe Animate CC IDE and it works fine if there are no bugs; it fails to do anything visible (no Iphone emulator, no swf window) if I put a typo or error in the code.
I also just deleted winsock and winsock2, rebooted Windows, then reinstalled winsock and winsock2. No change.
update 6/25
Just tried a system restore in Windows to set all my files and settings and drivers etc. to the way it was a week and a half ago... Also completely uninstalled all Adobe products and reinstalled. No change. I can only imagine that wiping my hard drive and reinstalling Windows would do the trick, but come on, it hasn't come to that has it?
As VC.One suggested, I checked the compile error window (cannot believe I didn't check before! Maybe when I checked before there were no compile errors... Only runtime errors?) and the errors are showing up there. Does this mean that it's catching compile errors but just not runtime errors?
When you force/test a runtime error... make sure you check
Compiler Errors (ALT+F2) and also Output (F2). By Output I mean the window that shows traces (and runtime issues). One of those two should have some feedback for you.
A possible solution is to save a new Workspace. So with those windows for Compiler Errors and Output both open (or tabbed, I tab them next to my Timeline) go to Window (in top options like File/Edit/Debug etc) and choose Workspace, then into that you choose New Workspace. Give it a name in the pop-up and okay everything.
Flash should always load that current workspace (next time, go to Workspace option again, check that your specified workspace [by name] has a tick next to it...).
Possible pitfalls:
1 - Use the debug player
2 - Make sure there isn't somewhere a try/catch enclosing the portion of code that triggers the event that may lead to an error
3 - Socket issue: may be exported in debug mode but swf cannot connect to debugger (it waits in a blank state for 60 seconds I guess)
4 - Does it compile ok? If there are compilation errors you may get an SWF anyway but then it will not start
...

OS Booting Issue

Because my work will get lighter for the next month or so, I decided to mess around with OS's, just to see how they work. I found this website, and I'm trying to run the code he provided. I am following the instructions exactly (to the best of my ability), but when I go to try booting with QEMU, I get this text:
SeaBios (version-blahblah)
Booting from Hard Disk...
Boot failed: could not read the boot disk.
Booting from Floppy...
And it never actually boots. I am relatively new to Ubuntu, and hoping that somebody would be able to point me towards where I made a mistake. I hope this is enough information to diagnose my error, and thanks in advance!
EDIT: Alright, I tried another tutorial which took me through very similar steps (but with slightly different code), and I still had the same issue. I also booted MikeOS from the floppy image it comes with, and it worked fine.
EDIT 2: Aaaaah! I just realized that when I pressed Ctrl+C, the text that was supposed to appear appeared for just a moment, then went away, along with QEMU. What can I do to make the text appear sooner? I've tried moving the infinite loop to after the display command, but to no avail.
I want to start by saying that I didn't read the entire page you provided (as I don't have enough time). However, the error that you cannot boot from HDD, regardless of the OS, usually (always in my previous experiences) means that either the MBA (Master Boot Record) is messed up/incorrect or you don't have a partition with a boot flag on it.
When I have some time I'll look deeper into that page and see if i can find exactly what the problem could be.
Do you have the bytes 0x55, 0xAA at offset 510 of your MBR?