TwinCat Sys Manager: INIT to PREOP' failed! Error: 'check product code' - plc

We have a running TwinCat project on a PC. After the restart of the machine, the following error occurs when i try to run the project in "Run Mode" or try Online Reset.
Errors:
Type Server (Port) Timestamp Message
Error (65535) 'Term 29 (EK1100)' (1006): state change aborted (requested 'PREOP', back to 'INIT').
Error (65535) 'Term 29 (EK1100)' (1006): 'INIT to PREOP' failed! Error: 'check product code'. Device 'EL1014-XXXX-XXXX' found and 'EK1100-0000-0018' expected.
Warning (65535) 'Term 33 (EL1014) (1010) - Term 34 (EL1014) (1011)' Communication interrupted
Warning (65535) 'Term 35 (EK1100) (1012) - Term 43 (EL1014) (1020)' Communication interrupted
Tree structure
Online State
The EK1100 and EL1014 were changed, but the error stays. Please, can you suggest a fix for this problem?

Very likely the problem is that the configured ethercat tree structure does not match the one found.
As you can see the Ethercat master expects 'EK1100-0000-0018' but finds 'EL1014-XXXX-XXXX'
Rescan you ethercat tree from the system manager and see if the configured and the found hardware-configuration matches.
Correct your ethercat configuration if you notice errors and reactivate the project.
Specifically take a look at TERM29.
There you can probably find the source of your error.
Either a wrong card has been swapped or the ethercat connection is faulty there.

Related

Commands invalid after 'import_board_preset' command

Currently I am trying to follow the MathWorks tutorial 1 to register a TE0720 with a TE0701-6 carrier board in Matlab. I followed the instructions, designed the block design and exported it as advised. Using the Matlab HDL Workflow Advisor I can follow unitl step 4.1 Create Project. Here, I get the following error message:
invalid command name "CONFIG.PCW_INCLUDE_ACP_TRANS_CHECK"
while executing
"CONFIG.PCW_INCLUDE_ACP_TRANS_CHECK {0} CONFIG.PCW_IOPLL_CTRL_FBDIV {30} CONFIG.PCW_IO_IO_PLL_FREQMHZ {1000.000} CONFIG.PCW_IRQ_F2P_INTR {1} CONFIG..."
(procedure "create_root_design" line 49)
invoked from within
"create_root_design """
(file "vivado_custom_block_design.tcl" line 986)
while executing
"source vivado_custom_block_design.tcl"
(file "vivado_create_prj.tcl" line 15)
This is regarding the exported block design in the corresponding *.tlc file.
After deleting the line mentioned in the error, the error persists, but for the following line. This holds true until I deleted all lines following
CONFIG.PCW_IMPORT_BOARD_PRESET {preset}
It seems to me that once the preset for the board is imported, all following commands are seen as invalid. If I put this line in the end of the list though, I get the error
ERROR [Common 17-69] Command failed: Missing name/value pair in -dict argument.
If I remove this line, I get the error
ERROR [BD 41-1811] The interconnect </axi_interconnect_0> is missing a valid master interface connection
ERROR [Common 17-39] 'validate_bd_design' failed due to earlier errors.
Is there a way to fix this or what is the problem here?
EDIT: I am using Vivado 2017.4 from the Vivado HL WebPACK. Could it be that there is a feature not available in this version for rebuilding the project as MATLAB intends to do?
EDIT 2: I started the complete tutorial fresh from scratch again and now I only get the error
ERROR: [BD 41-1811] The interconnect </axi_interconnect_0> is missing a valid master Interface connection
when going throught the HDL Workflow Advisor. As far as I understand the issue, Vivado searches for something to connect the axi_interconnect to. But isn't this the interface port (DUT) as described later in the tutorial (end of step 2 in Register the custom reference design in HDL Workflow Advisor, where the compiled simulink model should be connected?

boofuzz - Target connection reset, skip error

I am using boofuzz to try to fuzz a specific application. While creating the blocks etc and some testing i noticed that the target sometimes closes the connection. This causes procmon to terminate the target process and restarts it. However this is totally unnecessary for this target.
Can i somehow tell boofuzz to not handle this as an Error (so target is not restarted)
[2017-11-04 17:09:07,012] Info: Receiving...
[2017-11-04 17:09:07,093] Check Failed: Target connection reset.
[2017-11-04 17:09:07,093] Test Step: Calling post_send function:
[2017-11-04 17:09:07,093] Info: No post_send callback registered.
[2017-11-04 17:09:07,093] Test Step: Sleep between tests.
[2017-11-04 17:09:07,094] Info: sleeping for 0.100000 seconds
[2017-11-04 17:09:07,194] Test Step: Contact process monitor
[2017-11-04 17:09:07,194] Check: procmon.post_send()
[2017-11-04 17:09:07,196] Check OK: No crash detected.
Excellent question! There isn't (wasn't) any way to do this, but there really should be. A reset connection does not always mean a failure.
I just added ignore_connection_reset and ignore_connection_aborted options to the Session class to ignore ECONNRESET and ECONNABORTED errors respectively. Available in version 0.0.10.
Description of arguments available in the docs: http://boofuzz.readthedocs.io/en/latest/source/Session.html
You may find the commit that added these arguments informative for how some of the boofuzz internals work (relevant lines 182-183, 213-214, 741-756): https://github.com/jtpereyda/boofuzz/commit/a1f08837c755578e80f36fd1d78401f21ccbf852
Thank you for the solid question.

Backport installation script for Broadcom 14e4:43ae wifi controller fails

I recently bought a Lenovo 500-15ACZ notebook and installed Ubuntu 16.04 on it. After the installation I found I couldn't connect to Wifi. When I googled the issue, this seemed to be a common problem for Broadcom wifi cards. I found this question on askubuntu and followed the steps of the answer by Luis Alvarado.
The command lspci -nn -d 14e4: showed me that the pci.id of my device is 14e4:43ae rev 02, which is not yet supported in Linux.
However, there is a script (link to project) on git that tries to solve this via backport:
#!/bin/bash
cd /tmp
git clone https://github.com/kvalo/ath10k-firmware.git
cd ath10k-firmware/QCA9377/hw1.0
sudo mkdir -p /lib/firmware/ath10k/QCA9377/hw1.0
sudo cp board.bin /lib/firmware/ath10k/QCA9377/hw1.0
sudo cp firmware-5.bin_WLAN.TF.1.0-00267-1 /lib/firmware/ath10k/QCA9377/hw1.0/firmware-5.bin
sudo modprobe -r ath10k_pci
cd /tmp
wget https://www.kernel.org/pub/linux/kernel/projects/backports/2015/11/20/backports-20151120.tar.gz
tar -xf backports-20151120.tar.gz
cd backports-20151120
make defconfig-ath10k
make
sudo make install
But when I tried to run this, make threw the following error:
Building backport-include/backport/autoconf.h ... done.
CC [M] /tmp/backports-20151120/compat/main.o
In file included from /tmp/backports-20151120/backport-include/backport/backport.h:7:0,
from :0:
./include/asm-generic/qrwlock.h: In function ‘__qrwlock_write_byte’:
/tmp/backports-20151120/backport-include/linux/kconfig.h:25:28: error: implicit declaration of function ‘config_enabled’ [-Werror=implicit-function-declaration]
#define IS_BUILTIN(option) config_enabled(option)
^
./include/asm-generic/qrwlock.h:156:26: note: in expansion of macro ‘IS_BUILTIN’
return (u8 *)lock + 3 * IS_BUILTIN(CONFIG_CPU_BIG_ENDIAN);
^
./include/asm-generic/qrwlock.h:156:37: error: ‘CONFIG_CPU_BIG_ENDIAN’ undeclared (first use in this function)
return (u8 *)lock + 3 * IS_BUILTIN(CONFIG_CPU_BIG_ENDIAN);
^
/tmp/backports-20151120/backport-include/linux/kconfig.h:25:43: note: in definition of macro ‘IS_BUILTIN’
#define IS_BUILTIN(option) config_enabled(option)
^
./include/asm-generic/qrwlock.h:156:37: note: each undeclared identifier is reported only once for each function it appears in
return (u8 *)lock + 3 * IS_BUILTIN(CONFIG_CPU_BIG_ENDIAN);
^
/tmp/backports-20151120/backport-include/linux/kconfig.h:25:43: note: in definition of macro ‘IS_BUILTIN’
#define IS_BUILTIN(option) config_enabled(option)
^
cc1: some warnings being treated as errors
scripts/Makefile.build:294: recipe for target '/tmp/backports-20151120/compat/main.o' failed
make[6]: *** [/tmp/backports-20151120/compat/main.o] Error 1
scripts/Makefile.build:567: recipe for target '/tmp/backports-20151120/compat' failed
make[5]: *** [/tmp/backports-20151120/compat] Error 2
Makefile:1524: recipe for target '_module_/tmp/backports-20151120' failed
make[4]: *** [_module_/tmp/backports-20151120] Error 2
Makefile.build:6: recipe for target 'modules' failed
make[3]: *** [modules] Error 2
Makefile.real:88: recipe for target 'modules' failed
make[2]: *** [modules] Error 2
Makefile:40: recipe for target 'modules' failed
make[1]: *** [modules] Error 2
Makefile:30: recipe for target 'default' failed
make: *** [default] Error 2
CC [M] /tmp/backports-20151120/compat/main.o
In file included from /tmp/backports-20151120/backport-include/backport/backport.h:7:0,
from :0:
./include/asm-generic/qrwlock.h: In function ‘__qrwlock_write_byte’:
/tmp/backports-20151120/backport-include/linux/kconfig.h:25:28: error: implicit declaration of function ‘config_enabled’ [-Werror=implicit-function-declaration]
#define IS_BUILTIN(option) config_enabled(option)
^
./include/asm-generic/qrwlock.h:156:26: note: in expansion of macro ‘IS_BUILTIN’
return (u8 *)lock + 3 * IS_BUILTIN(CONFIG_CPU_BIG_ENDIAN);
^
./include/asm-generic/qrwlock.h:156:37: error: ‘CONFIG_CPU_BIG_ENDIAN’ undeclared (first use in this function)
return (u8 *)lock + 3 * IS_BUILTIN(CONFIG_CPU_BIG_ENDIAN);
^
/tmp/backports-20151120/backport-include/linux/kconfig.h:25:43: note: in definition of macro ‘IS_BUILTIN’
#define IS_BUILTIN(option) config_enabled(option)
^
./include/asm-generic/qrwlock.h:156:37: note: each undeclared identifier is reported only once for each function it appears in
return (u8 *)lock + 3 * IS_BUILTIN(CONFIG_CPU_BIG_ENDIAN);
^
/tmp/backports-20151120/backport-include/linux/kconfig.h:25:43: note: in definition of macro ‘IS_BUILTIN’
#define IS_BUILTIN(option) config_enabled(option)
^
cc1: some warnings being treated as errors
scripts/Makefile.build:294: recipe for target '/tmp/backports-20151120/compat/main.o' failed
make[5]: *** [/tmp/backports-20151120/compat/main.o] Error 1
scripts/Makefile.build:567: recipe for target '/tmp/backports-20151120/compat' failed
make[4]: *** [/tmp/backports-20151120/compat] Error 2
Makefile:1524: recipe for target '_module_/tmp/backports-20151120' failed
make[3]: *** [_module_/tmp/backports-20151120] Error 2
Makefile.build:6: recipe for target 'modules' failed
make[2]: *** [modules] Error 2
Makefile.real:88: recipe for target 'modules' failed
make[1]: *** [modules] Error 2
Makefile:40: recipe for target 'install' failed
make: *** [install] Error 2
**Does anyone know how to fix this?**
Please let me know if you need any other info.
Thanks in advance!
Update:
I installed the broadcom-sta-dkms package as you suggested. Unfortunately, you were right; this didn't work.
When I tried the wl driver, dmesg | grep -i wl returned [
12.459884] wl: loading out-of-tree module taints kernel.
[ 12.459890] wl: module license 'MIXED/Proprietary' taints kernel.
[ 12.468203] wl: module verification failed: signature and/or required key missing - tainting kernel
[ 12.487603] wl driver 6.30.223.271 (r587334) failed with code 1001
[ 12.487606] ERROR #wl_cfg80211_detach :
[ 12.487607] NULL ndev->ieee80211ptr, unable to deref wl
However, I'm afraid I am not sure what this means. For the other drivers, dmesg returned nothing.
Well, I'd suggest to be consistent. You have a Wi-Fi device and you know its PCI vendor ID (which stands before the colon) and device ID - 14e4:43ae. In your question you don't provide a complete excerpt from your lspci, so it's not clear whether your device is indeed identified as Broadcom. However, if we assume it's true, we can search for it.
Here is what WikiDevi page says:
802.11a/b/g/n/ac WLAN + Bluetooth 4.0 NGFF 2230 Mini Card
WI1 chip1: Broadcom BCM43162
Probable Linux driver unknown
PCI ID not yet observed in any mainline kernel / this list
So, as you might see, this page sheds light on such important things like chip naming and current observation of kernel code awareness of such PCI ID. The latter means that, according to their research, no one driver in the main kernel tree has such an ID in the corresponding PCI ID table by means of which the kernel makes a decision to probe a specific driver for a given device. Nothing known about the PCI ID.
But now we know for sure that this one is indeed a Broadcom device.
Looking at your excerpt from the script (which you are trying to make use of) baffles me a lot since it's for Qualcomm Atheros, not for Broadcom. It tries to grab QCA firmware from (possibly) untrusted repository and compile ath10k backported driver. So, at this point we know that the question merely about the compilation errors is unhelpful from the very beginning. But, of course, one may suppose that either Linux kernel headers package is not installed or the version of backported ath10k is not compatible with your current kernel. That's it.
So, it's clear that we shall look for Broadcom drivers (and, possibly, for Broadcom firmware) instead. From this perspective I can tell you that three types of drivers are available for Broadcom devices: b43 (mostly legacy), vendor-licensed broadcom-sta (wl) and in-tree brcm80211. The latter one is a common name for brcmsmac and brcmfmac.
Here are the authoritative pages with up-to-date info:
b43 - http://linuxwireless.org/en/users/Drivers/b43/
brcm80211 - https://wireless.wiki.kernel.org/en/users/drivers/brcm80211
Also, a more or less descriptive page for the vendor-licensed wl:
https://wiki.debian.org/wl
I can't find your PCI ID on either of the pages. This indeed confirms that corresponding support has not been added yet. However, we can confirm this further by just trying the drivers on hands. It's obvious that in-kernel b43 and brcm80211 don't work for you, but it might be useful to take a look at dmesg - perhaps, brcm80211 is loaded but can't find FW.
If nothing useful is found, then it would be nice to try wl. This driver is distributed by means of broadcom-sta package (Debian, Ubuntu), and I can mention the corresponding description on Ubuntu website.
So, to try wl you need to make sure that you have proper Linux headers and then just install broadcom-sta-dkms package.
apt-get update
apt-get install linux-headers-$(uname -r)
apt-get install broadcom-sta-dkms
Hopefully, it will compile and install it. Then you should do a reboot and take a look at what happens with your Wi-Fi. Most likely, this won't help (since I suppose that your device is really not supported yet), but if it works, you will be able to use it. Even if you see for sure that your device doesn't work with wl, again, like in the case of brcm80211, it's worth taking a look at dmesg output. However, in example, seeking for a valid FW image (if dmesg complains about it) is a separate question and should be discussed accordingly.
Also, I can expand on this topic and mention that in certain mailing lists on the net some folks have already asked about plans to add support for this device. Here is one of the links. So, if neither brcm80211 nor wl (broadcom-sta-dkms) help you, you may consider sending an email to one of brcm80211 supporters. Their names and email addresses are listed on the page. There are Broadcom employees among them. If you ask them for a good piece of advice, you will also help other people.
UPDATE
So, you say that b43 (also b43_legacy) and brcm80211 keep silence in dmesg. This could mean that your PCI ID is not supported by these drivers.
What's for wl output, I can share my output for comparison:
wl: loading out-of-tree module taints kernel.
wl: module license 'MIXED/Proprietary' taints kernel.
Disabling lock debugging due to kernel taint
wlan0: Broadcom BCM43a0 802.11 Hybrid Wireless Controller 6.30.223.271 (r587334)
This obviously means that your output minus this one gives some sort of silence again. However, it's too murky to say for sure whether your device is unsupported or there is some FW issue.
So, it seems like no options remain here.
However, you still may consider ndiswrapper solution. In two words, it's a special tool/driver which enables you to install a proper inf and sys files from the Windows driver (i.e. you should obtain it for your card somewhere, eg. extract from the CD or download from Broadcom webside) in such a way that the driver would operate in Linux as it was in Windows environment. This type of solution has its drawbacks and limitations. First of all, only Windows XP versions of wireless drivers are supported, so if you've got, say, a ZIP package from the vendor's website, you need to extract inf and sys files from the directory named after Windows XP (not Vista/7/10), and you need to pay attention to CPU architecture choice (32 bit / 64 bit). Here is an article from Debian which could fit Ubuntu as well. But this kind of solution overall may face some extra drawbacks and suddenly bad operation (it's a topic for a separate talk) and also in general it is considered as bad solution for missing driver. So, many people in such a situation just prefer to swap their unsupported card with some other one or just wait until the missing support is added to one of the native drivers. It's up to you.

Metadata.framework error while running root in jupyter

I am running a code in jupyter notebook (here is the code for reference):
import ROOT as root
f = root.TFile("160721_0828.root")
for event in f.tree.events:
print (1)
It should be a simple code, looping through a file. But when I run it, the kernel crushes and I have to restart everything. I also get in terminal many errors of this kind:
2016-08-08 18:25:20.439 atos[99872:272f] Metadata.framework [Error]: couldn't get the client port
0x0000000100000cc4 in start (in python) + 52
before the program crushes. I am using a Mac, version 10.9.5. What could be the cause?
Perhaps your Spotlight indexing is disabled and necessary metadata is inaccessible.
Try to turn Spotlight indexing On and the error message:
"Metadata.framework [Error]: couldn't get the client port"
disappears and kernel will be stable.

GConf Error: "Failed to contact configuration server ... 1: Not running within active session"

I have installed Gnumeric in CentOS 6.5, then use ssconvert command to convert .xls/.xlsx file to CSV, but I still get the following error:
$ ssconvert
GConf Error: Failed to contact configuration server; some possible causes are that you need to enable TCP/IP networking for ORBit, or you
have stale NFS locks due to a system crash. See
http://projects.gnome.org/gconf/ for information. (Details - 1: Not
running within active session)
GConf Error: Failed to contact configuration server; some possible causes are that you need to enable TCP/IP networking for ORBit, or you
have stale NFS locks due to a system crash. See
http://projects.gnome.org/gconf/ for information. (Details - 1: Not
running within active session)
** (ssconvert:5725): WARNING **: Configured default font 'Sans 10.000000' not available, trying fallback...
** (ssconvert:5725): WARNING **: Fallback font 'Sans 10.000000' not available, trying 'fixed'...
** (ssconvert:5725): WARNING **: Even 'fixed 10' failed ?? We're going to exit now,there is something wrong with your font
configuration
Can you help me?
As this is an old question, the answer is in case someone will get the same error (like me today on CentOS 6.8), you missed to install the Sans font:
yum install gnu-free-sans-fonts
For docker alpine images this might help:
RUN apk add --update \
msttcorefonts-installer fontconfig \
ttf-opensans