How do I load the Codesys control for Pfc100 package? - codesys

I am using Codesys v3. Sp14 patch. When I update PCF100 with V3.5.14.20. My 750-8100 firmware version is 11. I get an error Expected exit value of command failed: expected 0, received -1. I also get
Error output:ipkg * couldn't kill old gunzip process * aborting.
When I also tried with wago firmware version 12,11 and 9 via wago web browser, it also gives the same error.

Related

OpenModelica IBPSA example error spatialDistribution

I'm quite new to Modelica and I'm trying to understand some basic examples. I'm looking at the example IBPSA.Fluid.FixedResistances.Examples.PlugFlowPipe and checking this model gives me the following error
Number of classes to check: 2
Checking: model IBPSA.Fluid.FixedResistances.Examples.PlugFlowPipe... 0.2350000000001273 seconds -> FAILED!
Error String:
Error Buffer:
Warning: Requested package Modelica of version 3.2.2, but this package was already loaded with version 3.2.3. You might experience problems if these versions are incompatible.
[C:/Program Files/OpenModelica1.14.0-64bit/lib/omlibrary/IBPSA 3.0.0/Fluid/FixedResistances/BaseClasses/PlugFlowTransportDelay.mo:49:3-55:44:writable] Error: Function argument initialValues={time + pip.cor.timDel.t_in_start, time + pip.cor.timDel.t_out_start} in call to spatialDistribution has variability continuous which is not a parameter expression.
#[-], 0.2350000000001273, IBPSA.Fluid.FixedResistances.Examples.PlugFlowPipe
-------------------------------------------------------------------------
Checking skipped: package IBPSA.Fluid.FixedResistances.Examples.PlugFlowPipe.Medium...
[2] 11:48:12 Scripting Notification
Number of classes checked / failed: 2/1
It seems that the module pip.cor.timDel uses the function spatialDistributuon. My guess is that there is something wrong with pip.cor.timDel.t_in_start or pip.cor.timDel.t_out_start? It would be greatly appreciated if someone could help me with this.
P.S. I'm using OMEdit v1.14.0 on windows 10 with Modelica library v3.2.3
OpenModelica does not support the function spatialDistribution yet, i opened a ticket on Trac where you can follow for the current development status.

Cannot send command IR with HotPI

I bought a HotPi a while ago, and decided to use it. So I followed the procedure to configure the IR and after a few hours I was able to IR signals on my Raspberry 1.
But my purpose here is to send IR signals, which I tried, without any luck.
So this is the command I try to do (just for test):
irsend SEND_START devinput KEY_POWER ; sleep 3
And this is what lircd tells me:
lircd-0.9.4c[907]: Notice: accepted new client on /var/run/lirc/lircd
lircd-0.9.4c[907]: Info: Cannot configure the rc device for /dev/lirc0
lircd-0.9.4c[907]: Error: invalid send buffer
lircd-0.9.4c[907]: Error: this remote configuration cannot be used to transmit
lircd-0.9.4c[907]: Error: error processing command: SEND_START devinput KEY_POWER
lircd-0.9.4c[907]: Error: transmission failed
lircd-0.9.4c[907]: Info: removed client
Edit:
It seems I'm not using the good drivers. According to the HotPi documentation, I'm suppose to use lirc-rpi, which I'm suppos to install with
sudo modprobe lirc-rpi
Which, at least, doesn't return an error. But trying to configure the interface tells me that the driver doesn't exist:
pi#raspberrypi:~ $ mode2 --driver lirc-rpi --device /dev/lirc0
Driver `lirc-rpi' not found. (Missing -U/--plugins option?)
Available drivers:
accent
alsa_usb
asusdh
atilibusb
atwf83
audio
audio_alsa
awlibusb
bte
bw6130
commandir
creative
creative_infracd
default
devinput
dfclibusb
dsp
dvico
ea65
file
ftdi
ftdi-exp
ftdix
girs
i2cuser
irlink
irtoy
livedrive_midi
livedrive_seq
logitech
macmini
mouseremote
mouseremote_ps2
mp3anywhere
mplay
mplay2
pcmak
pinsys
pixelview
samsung
sb0540
silitek
slinke
sonyir
srm7500libusb
tira
tira_raw
udp
uirt2
uirt2_raw
usb_uirt_raw
usbx
zotac
Here is no info what lirc version you are using. There are vast differences between the legacy 0.9.0 still used in some distros and modern lirc.
That said, the logs seems pretty clear. You are using the devinput driver, right? This driver does not support sending data, reflecting the fact that also the kernel doesn't.
You then need to use another driver - first stop might be the default one. If/when using this other driver, you need another lircd.conf.
Please refer to http://lirc.org/html/configuration-guide.html
EDIT: Ah, lirc-0.9.4c says the log. Sorry, my bad. The reply should still be valid, though.
When you record the remote, use:
irrecord -d /dev/lirc0 -f name.conf
The -f uses raw mode. This then worked for me on the transmit side, before I got same error as you.

pyusb - [Error 5] on Linux, but not Windows

I'm trying to communicate with an AD9913 evaluation board (Analog Devices), which has a Cypress FX-2 USB controller. I wrote a fully functional Python library which works flawlessly on Windows 7 (using a driver generated through libusb-win32-1.2.6.0's inf-wizard.exe), but now I try to run the same software from a Raspberry Pi 3 with Raspbian Jessie and cannot seem to write or read.
The following minimal example works on Windows 7:
import os
os.environ['PYUSB_DEBUG'] = 'debug'
import usb.core
print "usb.core file:", usb.core.__file__
# get device
dev = usb.core.find(idVendor=0x0456, idProduct=0xEE25)
if dev is None:
raise ValueError("Device not found")
dev.set_configuration()
# get the firmware version
print "Write: ", dev.write(0x01, [0x00])
print "Read: ", dev.read(0x81, 7)
The ouput here is:
usb.core file: C:\Python27\lib\site-packages\usb\core.pyc
Write: 1
Read: array('B', [1, 0])
However, on the Raspberry several problems occur. First, the product ID is 0xEE24 (which I found out through dmesg), and second, the code example above gives
usb.core file: /usr/local/lib/python2.7/dist-packages/usb/core.pyc
Write:
Traceback (most recent call last):
File "usbtesting_minimal_linux.py", line 29, in <module>
print "Write: ", dev.write(0x01, [0x00])
File "/usr/local/lib/python2.7/dist-packages/usb/core.py", line 948, in write
self.__get_timeout(timeout)
File "/usr/local/lib/python2.7/dist-packages/usb/backend/libusb1.py", line 824, in bulk_write
timeout)
File "/usr/local/lib/python2.7/dist-packages/usb/backend/libusb1.py", line 920, in __write
_check(retval)
File "/usr/local/lib/python2.7/dist-packages/usb/backend/libusb1.py", line 595, in _check
raise USBError(_strerror(ret), ret, _libusb_errno[ret])
usb.core.USBError: [Errno 5] Input/Output Error
I'm executing the script by calling sudo python minimal_example.py, otherwise (as expected) I get usb.core.USBError: [Errno 13] Access denied (insufficient permissions). (For the testing described above, I removed the udev rules I added to allow access to my regular user account, and rebooted and replugged the device afterwards.)
I also noticed that on Windows, Configuration 1 (which is the only configuration) as revealed by adding
cfg = dev.get_active_configuration()
to aforementioned example script, has only one Interface 0, where as on Linux Interface 0 has no endpoints, but there are additional interfaces Interface 0, 1, Interface 0, 2 and Interface 0,3, the first of which is identical to the sole interface shown by Windows.
Detaching kernel drivers as described in this post -- which given my current understanding as a USB novice should not be necessary here -- does not resolve the problem.
I suspect that the issue stems from a difference between the Windows/libusb and Linux implementation/backend of the USB communication (already hinted at by the fact that the productID shown is different for the very same piece of hardware attached), which might require some changes to the way I'm writing to the USB endpoint.
I'm happy to provide more information if needed and welcome all hints and suggestions.
Most likely, this error caused by the firmware is not uploaded. Usually speaking, FX-2 USB controller does not save the firmware.
Although I still cannot communicate with the device on the Raspberry Pi, the Error 5 problem is resolved by explicitly selecting a suitable alternate setting with proper endpoints, e.g.
dev.set_interface_altsetting(interface = 0, alternate_setting = 1)
Then read/write requests no longer fail with Error 5, but with a timeout error (which is Error 110 for libusb1 and None for libusb0).
I now suspect that there is a problem with how the device is detected by the operating system, since not only the productID changes between Windows and Linux, but also wMaxPacketSize for the endpoints I'm interested in is given as 64 bytes on Windows and 512 bytes on Linux.
Once I'm further along in my troubleshooting, I will either open a new question and add the link as a comment to this answer (or post the whole solution here in case I can solve everything right away).

howt o fix protractor that started failing on alerts all of a sudden

I have a project that has been running well for a long time now.
Recently (couple of weeks) the system tests are failing.
After a lot of investigation we concluded that protractor fails to identify and close an alert.
The code that used to work
exports.removeFaq = function( index ){
console.log('deleting item at',index);
exports.getContent(index).$( '[ng-click="removeFAQ($index)"]').click();
browser.sleep(2000);
browser.switchTo().alert().accept();
return browser.sleep(2000);
};
is now throwing errors:
WebDriverError: unknown error: cannot determine loading status
from unexpected alert open
(Session info: chrome=52.0.2743.116)
(Driver info: chromedriver=2.21.371461 (633e689b520b25f3e264a2ede6b74ccc23cb636a),platform=Linux 4.2.0-38-generic x86_64) (WARNING: The server did not provide any stacktrace information)
and (using element explorer):
> browser.switchTo().alert().accept();
UnexpectedAlertOpenError: unexpected alert open: {Alert text : are you sure you want to remove this helper content?}
(Session info: chrome=52.0.2743.116)
(Driver info: chromedriver=2.21.371461 (633e689b520b25f3e264a2ede6b74ccc23cb636a),platform=Linux 4.2.0-38-generic x86_64) (WARNING: The server did not provide any stacktrace information)
We've tried
- waiting instead of sleeping.
- sleeping for a long period
- ignoring angular.
nothing seems to make any difference whatsoever.
how can I fix this?
We had the same issue for a couple of days. Looks like we were on chromedriver 2.21. I updated to the latest version (2.23) and that seems to have fixed the issue.
The command webdriver-manager update --chrome did not work for me so I had to download the zip and extract it to my selenium directory. Under protractor.
Note there is a new protractor major version with updated versions. So updating protractor might fix the problem too.
for protractor version 3.x
You can also modify the file node_modules/protractor/config.json with the correct version and then run webdriver-manager update
for protractor version 4.x
You should modify the file ./node_modules/protractor/node_modules/webdriver-manager/config.json instead.
How can we say for sure that sleep of 2000ms is good enough? Exactly for this reason sleeps are not recommended in tests. Instead you can use proper waits and poll for alert. This way you would know that after a certain agreed timeout, alert never showed up and test rightfully failed
//wait maximum up to lets 5s before giving up
browser.wait(protractor.ExpectedConditions.alertIsPresent(), 5000);
browser.switchTo().alert().accept();

Openocd reports "Failed with code (1)" for eclipse debugging a STM32F429 Discovery board

When I start a debugging session under eclipse (luna) for my STM32F429 Discovery board. I get the following error:
OpenOCD failed with code (1).
The information in the console pane is:
Open On-Chip Debugger 0.9.0-dev-00223-g1567cae (2015-01-12-13:43)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.sourceforge.net/doc/doxygen/bugs.html
Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
adapter speed: 2000 kHz
adapter_nsrst_delay: 100
srst_only separate srst_nogate srst_open_drain connect_deassert_srst
Started by GNU ARM Eclipse
Info : clock speed 2000 kHz
Error: open failed
in procedure 'init'
in procedure 'ocd_bouncer'
in procedure 'transport'
in procedure 'init'
The "board" file being referenced in the debug setup is: stm32f429discovery.cfg
I did have this working for another ST-Micro board and I could do a full debug session with no problems. Suddenly it just stopped being able to access the board and I get the same errors for it as I get with this board.
I was hoping to be able to use the purely open source s/w that runs on Linux to be able to work with these boards. I'm hoping that someone can get me out of this situation.
Thanks in advance.
Cheers!!
What you use the command and debugger?
try:
openocd -f interface/jlink.cfg -f target/stm32f429discovery.cfg