Porting of TwinCAT2 to TwinCTA3 - plc

I have a running project of twinCAT 2 (made for XP 32bit ) & Its working as required. Now I tried to port this project into TwinCAT3 (windows 10 64bit) for that->
I opened twinCAT 3 Created a new project.
Then add the existing project where I added ".tsm" file of TwinCAT2.
Then I added the PLC file (which have the main program & GUI also)
Then all the mapping for input and output & also changed a few settings in twinCAT for the device.
In the end, I build the program without having any errors.
Then finally I ran the TwinCAT3 program....
The problem I'm facing
If I'm clicking the RUN button TwinCAT3 is getting hanged (don't know the maybe time-related file is creating issue)
I'm not able to see data on GUI (Maybe GUI file not linked with the main program).
Please let me know if any solution you guys have.
Thanks :)

Porting TwinCAT2 plc project with a visualization to TC3 is sometimes a little tricky. You can try to just import the visualization pictures into the plc and let the engineering do the rest automatically (bind libs etc.). Or check the lib-versions of the visu libs manually. Or check the visualization profile in the plc-project properties. In both cases the slogan is "latest greatest" in this scope.
Is the connection to other data from the target also lost? E.g. the current cpu-usage of the cores? If yes, you have a other problem. Mostly endless loop.

Related

U-boot deployment questions

I'am currently developing an application for an embedded system (RTEMS for RPI2). As you may know developing proccess on embedded systems imply:
Modifing the program
Compile it and load it into de SD card
Insert the SD card on the board
It is a tedious process, and you can even break the SD slot for the constant usage. This is the reson why i'am trying to set up a comfortable enviroment for developing and deploying the application on the RPI. My idea is to use Eclipse as IDE for all the proccess (edit, compile and execute). So far these are my ideas for solving the different problems:
Usage of U-boot for loading the application images from TFTP. [That solves the problem of plug & unplug the SD card]
Use CTD eclipse pulgin [That solves the problem of compiling]
Use of Terminal View eclipse plugin instead of putty [That solves the problem of viewing the application console prints]
As you may notice the only problem i have unsolved is the one of executing. The idea is that whenever you compile the compiled file is located at the TFTP server directory, so it is accesible for u-boot client to load. The thing i don´t know how to do is how to tell remotely u-boot to reaload the image (the image would always have the same name). I know i can just simply reset the RPI but i don´t know if that can damage something, and also i'am curious to know if there is a more elegant way to do it.
Another thing i would like to do is to somehow specify if you want to run the application on the target or on a simulator like QEMU.
Thanks in advance

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.

ACT-R is not reloading models

I am working through the tutorial files included with the ACT-R Standalone Windows distribution. This isn't part of any academics assignment; I'm working on this to learn cognitive modeling and writing production systems. I am using Lispbox, an EMACS-SLIME-LISP bundle to write my cognitive models. The distro and lispbox reside on my flash drive. Finally, the distro uses Clozure Common Lisp.
The problem is that whenever I try to reload a model after making changes, ACT-R gives me this error:
Error Reloading:
#|warning: no load file recorded |#
#|warning: cannot use reload |#
It only does this for my unit 2 assignment model. Not any other model, including the one I have written in unit 1.
Now this is a big issue for me - instead of simply pressing "reload" on ACT-R's GUI, I'm forced to close ACT-R entirely and open it again every time I want to reload the model.
I'm thinking this is a problem with EMACS. I have tried reinstalling ACT-R, and deleting any .lisp~ files or anything else that Emacs has saved in addition to the file I wrote. I still get this error.
Could you please help me understand what's going on and how I can fix this if it ever arises again in the future? I would like to get back to working on my assignment as soon as possible.
I have emailed the creator of ACT-R; He told me that I must include the statement
(clear all)
at the beginning of every file, so the software uses the most up-to-date file when reloading.

Talend freeze - Can some config suggestions help avoid freeze?

My Talend ESB (6.1.1_20151214_1327) keeps freezing ... run freeze .. resize a tab freeze .. move to another tab and come back freeze ..
So I thought there must be some problem with my windows7, so I tried in my mac laptop, exactly the same thing keeps happening. Same for 610 ESB, Same for DI version too.
Is there an option that I need to change in config to avoid that? Waiting for 10min for defreeze, or at times rebooting makes me scared of creating more artifacts in Talend (I only have 3 now). I wish not to move to python.
If you output a lot of data to the console using a tLogRow component, you will find that your Talend Studio will freeze, especially when changing tabs etc.
Try removing any tLogRows that you have and see if the avoids the freeze.
You can workaround on Two points about talend freeze.
that is
pt 1:
Please check if there are spaces in the path of product installation and the workspace, if so, try to install it without spaces in the path.
Talend recommend user to use 7-zip to unzip the products.
pt 2:
Based on source
"https://help.talend.com/display/TalendESBHandsonGuide60EN/4.5+Accessing+all+ESB+event+logs+in+Talend+Administration+Center"
We can capture exact error.and then ,work on it accordingly.
or
It is possible that
To launch product,Sometimes we may launch wrong exe for our environment.
Follow this guide
"https://help.talend.com/display/TalendESBInstallationGuide60EN/3.5.1+Installing+the+Talend+Studio"

Command line arguments for Scratch 1.4

I'm using Scratch 1.4 for preparing a course for children.
The course is about controlling real devices (self built traffic lights, modified toys having motors, sensors, etc.)
For interfacing the hardware I'm using the Remote Sensor Protocol and the control-lines of a RS232 interface (3-in/3-out, all digital).
Everything works great, except small inconveniences:
The children have to do many steps manually:
start scratch first,
load a template project which enables remote sensor protocol and defines variables
accept the warning message notifying, that remote sensor protocol is enabled
start RSP-RS232 proxy
I'd like to simplify it by starting scratch from my tool, ask Scratch to perform steps 2,3 by command-line arguments and finally connect to the RSP port.
Is it possible?
If not, is it hard to implement these parameters in Smalltalk for someone with no Smalltalk experience (but other languages like C++)?
Thank you!
Ok, after some readings I could answer my question.
Bad news is: there is obviously no command line argument in Scratch passing a project-file as a start-project.
However good news is, it is not difficult to change the scratch for own needs. Several projects do it, e.g.:
Scratch 4 Arduino
Scratch GPIO
How to do it is described here:
http://wiki.scratch.mit.edu/wiki/Scratch_1.4_Source_Code
Scratch and Squeak
...
To get started, first copy the Scratch application ("Scratch.exe" or
"Scratch.app") from your normal Scratch folder into the Scratch source
code folder. (The Scratch application is actually just a Squeak
virtual machine, so any recent Squeak virtual machine should also
work.) Also, put copy of the Squeak source code file in that folder if
needed (this file is included in the zip file starting with the 1.4
source release). Finally, drop the file "ScratchSourceCode1.4.image"
onto the Scratch application. The Squeak programming environment will
start up, allowing you to view and modify the Scratch source code.
I was able to disable the dialogue notifying that remote sensors protocol is enabled
and to enable remote sensors at start by default. Took me 2 hours.
P.S.:
For those interested, I host my project here: https://github.com/vheinitz/Qratzfest
As I've found out, my Idea was not new (I've looked for this possibility about 3 years ago, but there was nothing). What is different, the proxy-tool is for PC, and is intended to use any hardware, not dedicated only to a specially firmwared Arduino or PI. Currently only control-pins of a serial interface are supported and linked to fixed names.
Soon it will provide the possibility to map any pin to any Scratch-variable.