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 and shared_procimg. In which all outputs were always written, even if a device had not activated autorefresh.
  • Texts written more clearly for warnings.

Version 2.6.0

  • The replace_io function now accepts the keyword wordorder. 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 like run_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

DOWNLOAD

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.

DOWNLOAD

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

DOWNLOAD

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.

DOWNLOAD

Version 2.5.5

Important update

  • Implementation of RevPi Flat (still without .core IOs).
  • Hardening of NetIO (process image over the network).
  • The call .cycleloop now accepts an optional blocking parameter. If you do not want the Cycleloop to be executed exclusively, blocking=False can be set – Same as blocking parameter of the .mainloop.
  • shared_procimg can now be set per device. This makes it possible, for example, to use only the core module as shared and the rest as exclusive.
    Each device now has the function .device.device_name.shared_procimg(activate: bool).
  • If shared_procimg=True, the new values are now also immediately set in the .io variables.
  • Bugfix: When shared_procimg=True, the .core.An LEDs were not set.
  • The .export flag of replaced IOs can be adjusted in the program at runtime. This setting is will be saved by .export_replaced_ios() in the configuration file – read from there.

DOWNLOAD