This update fixes minor common errors and critical errors in network functions!
- Fixed an issue with all RevPiNetIO classes that prevented a reconnect under certain circumstances.
- Bug fix when using
- Error correction in export file for replaced IOs
- Error correction, setting delayed events to
.core.ios, such as.
- Warnings are issued once when errors occur and after the errors have been eliminated. No more warning floods in the console!
- Error counter on process image improved.
- The function
.reg_event(...) accepts parameter
prefire=True and will execute this event immediately on entering the
- All RevPiNetIO classes require RevPiPyLoad version at least 0.8.0!
- RevPiNetIO classes have the attribute
.reconnecting, which can be used to query whether the connection has been torn down temporarily.
- All RevPiNetIO connections are disconnected when changing piCtory or replace_ios.conf. The attribute
.config_changed will be
True and a new instantiation is needed.
- IOs exported with
.replace_io(...) can be exported to a file and used by other instances or RevPiPyLoad / Control with
replace_io_file for RevPiModIO introduced, for the import of the exported file. With RevPiNetIO
:network: can be used to import this data via RevPiPyLoad over the network.
- Added parameter
direct_output at instantiation [Doc].
- Indexed access to IOs via
.device possible (
This version mainly fixes errors in counter IOs
- Counter IOs 8 – 16 can now also be reset with
- Runtime warnings have better error hints
debug argument introduced to get complete error messages
- Format check implemented by
.replace_io(...) for specific types
Thanks to Nicolai Buchwitz
- Improved argument checking on instantiation
This update introduces the counter-reset of DI / DIO modules!
- Counter IOs now have the function
.reset() to reset the counters on the DI / DIO modules.
Note: The Wheezy (7) system does not support this in the piControl!
- Counter can also be reset via RevPiNetIO over the network (RevPiPyLoad at least version 0.7.5).
- Iterators now issue Python-conforming exceptions.
- The function
.replace_io(...) was offered for all IO objects, but can only be used with gateway or virtual devices. It is now only available on IOs that support this feature.
.mainloop(...) now accepts the
no_warn=True parameter to disable runtime warnings.
Important update + RevPi Connect
- Core LEDs will not be switched off after instantiation.
- For next generation of virtual devices we now can create more than 16 BIT IOs per memory unit.
- You can control the LEDs on the Cores (next to
.core.a1green.value = True/False /
.core.a1red.value = True/False. These are IO objects that also offer all other functions of the IOs.
- RevPi Connect is supported now!
.core.a3red are available.
- You can control the watchdog with
.core.wd.value = True/False.
- To toggle the watchdog automatically during the program runtime, you can set
.core.wdautotoggle = True.
- Internal IOs of X2
.core.x2out are RevPiModIO.io objects than offer all their features and functions. For example, you can register an event to the internal input of X2
.core.x2in.reg_event(funktion). To set the internal output of X2 use
.core.x2out.value = True.
- For cyclic work after
.mainloop(blocking=False) you can use the new exit signal
while not instance.exitsignal.wait(0.5): to exit your own loop.
The signal is set when invoking
instance.exit() or end of program when using
- Small performance improvements.
This update improves error messages and introduces byte summary with
- Error messages were made clearer in case of missing piCtory configuration.
- Network errors with RevPiNetIO are displayed as warnings.
- Several bytes of a gateway or virtual device can be combined as a byte sequence in a new IO. The
.replace_io("neuername", frm="8s") function for the format character s now supports a number of bytes. See DOC.
This update fixes the following errors and introduces new network features:
- Revision of event monitoring (mainloop). The mainloop has been implemented more efficiently and uses less system resources.
- During event monitoring (mainloop), further events are now recognized during the execution of an event function and transferred for processing.
- Event functions specified
as_thread=True are started immediately in parallel, independent of the processing of other event functions!
- Added network function. RevPiNetIO, RevPiNetIOSelected and RevPiNetIODriver are now available. Just pass the IP address of the RevPi on which RevPiPyLoad from version 0.5.3 with activated
plcslave=1 is running as parameter on instantiation.
The process image is then exchanged over the network. The syntax and functionality of the module remain the same.
- Further improvements to the code.
This update extends our module with the following features:
- Handles errors of the function which is passed to the cycleloop.
This version manages errors thrown by the source code of the function which is passed to the cycleloop. The RevPiModIO module is put into a clean state and throws the error after that. If this error is intercepted by the programmer, the cylcleloop can be restarted.
# Handle errors, log and
# if necessary restart the cycleloop
- Handles errors of the function that are executed by the event monitoring (mainloop).
This version manages errors thrown by the source code of the event functions. The RevPiModIO module is put into a clean state and throws the error after that. If this error is intercepted by the programmer, the mainloop can be restarted.
# Handle errors, log and
# if necessary restart the mainloop
- Clear error output after incorrect instantiation of the module.
- Correction of the return value of
ioobject in device.devicename if using a IOBase or inherited object.