- Adjusts the address of the relay contact on the Connect 4. An LED was switched instead of the relay.
- Adjusts the properties of .core.A1 – .core.A5 on Connect 4. The colors of the LEDs were not according to the constants revpimodio2. GREEN, . RED, . BLUE switched.
- Outputs a clear indication on the Connect 4 that the hardware Watchdog from KUNBUS is no longer implemented in the process image.
Version 2.7.1
Bugfix for context managers.
Version 2.7.0
- Add context manager for ios
- Remove deprecated parameter ‘direct_output’ from ModIO classes
- Check offset values of the devices for integers
- Check if the length of the previous IO overlaps with the new IO
- Add support for RO device
- Add context manager for modio instance
With the new context managers, the IOs can be more easily combined with your own cycles. When entering the context manager, the inputs are read, within the context manager outputs are stable and will not change on hardware and when exiting, all outputs are written.
import revpimodio2 revpi = revpimodio2.RevPiModIO() with revpi.io: revpi.io.O_1.value = not revpi.io.O_1.value
The autorefresh=True
argument does not have to be set in this case, as the context manager takes care of updating the process image.
Version 2.6.1
Important update
- Fixes an error when using autofrefresh and
shared_procimg
. Under certain circumstances, it could happen that an output was set, but the internal buffer still returned the previous value. - Fixes an error when using
autofrefresh
andshared_procimg
. In which all outputs were always written, even if a device had not activatedautorefresh
. - Texts written more clearly for warnings.
Version 2.6.0
- The
replace_io
function now accepts the keywordwordorder
. This makes it now possible to put several words, e.g. from a Modbus device, in the correct order. - The new function
run_net_plc
can be used likerun_plc
to use the Revolution Pi directly as a PLC over the network. - License was changed from LGPLv3 to LGPLv2 with the consent of all contributors.
- The RevPi Connect 4 is now supported.
- Fixes a bug for switching the LEDs on the Revolution Pi (all)
Version 2.5.10
- Replace IO file is applied before the start of Auto-Refresh, otherwise there could be cycle warnings.
- Improved output in the texts of warnings when the same device names are used.
Version 2.5.9
Important update
It is strongly recommended to install this update when using .cycleloop
!
- The
.cycleloop
did not maintain its defined cycle time under certain circumstances (different runtimes of the cycle function)! Depending on the case, the cycle function was executed too often or too seldom than expected. With this version, the cycle time is adhered to exactly and a warning is issued if the cycle function takes to long. - Fixes bug in
.replace_io
to replace more than 8 bits of a >1 byte long IO object (thanks Nico) - The
prefire
parameter can now also be passed to the.reg_timerevent
function. This is analogous to.reg_event
Version 2.5.8
Important update
- Fixes errors when using
shared_procimg
when querying the output status, especially in.cycleloop(...)
. The status of set outputs was one cycle behind. So the values of the outputs in the next cycle were still at the old status. - Offset check of the entire process image and omission of overlapping IOs. When using several old Modbus 150 devices, the offsets of the IOs do not match. Overlapping is now prevented by omitting the IOs.
- The export file can now handle replaced IOs in byte format (s).
- MIO memory mapping values added.
Version 2.5.7
Important update
- Corrects errors in the length specifications of the memory areas from the process image if the piCtory configurations have gaps. This has been discovered so far with the “Modbus Master 150” module. The error means that the IOs of modules behind the incomplete module are not correctly synchronized.
- Flat: Switch button and relay are now available as real IO objects in the
.core
class:
.core.relais
.core.switch
Version 2.5.6
Important update!
- Fixes cycle problem with
shared_procimg=True
As soon as a new value was assigned to an output, RevPiModIO immediately wrote it into the process image. Outputs may only be written to the process image after the cycle function has been completely processed (when using.cycleloop
) or after calling.writeprocimg
.
The error is not relevant when using.mainloop
.