Version 2.1.3

This update improves error messages and introduces byte summary with .replace_io(...) function:

  • 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.

DOWNLOAD

Version 2.1.2

Important update!

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 plcserver=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.

DOWNLOAD

Version 2.0.7 / 1.0.3

Interesting update

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.

    # (...)
    try:
        rpi.cycleloop(cyclefunction)
    except:
        # 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.

    # (...)
    try:
        rpi.mainloop()
    except:
        # 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.

DOWNLOAD

Version 2.0.6

Important update!

This update fixes the following errors:

  • Bug fix when using duplicate device names in piCtory. The devices and IOs were not accessible!
    NOTE: The naming of the devices should always be unique, without special characters and comply with the Python guidelines!!!
  • The .cycleloop() could not be restarted after exiting. This bug has been fixed.
  • VirtualDevices in the very old piCtory 1.0 version are now incremented from position number 64 (Kunbus default). These got previously position -1 and smaller.
  • The device functions .get_allios(), .get_inputs() and .get_outputs() will not provide None objects. This occurred if not all bits of a byte were replaced with .replace_io(“name”, frm = “?”).
  • The bool() conversion of an IO object now properly returns False if the value is 0.
  • The .frm attribute of a replaced IO returns the pure formatting character.
  • The .wait(…) function of the IOs checks the parameters passed.
  • Further improvements to the code.
  • Complete code check with unittest including coverage check.

DOWNLOAD

Version 2.0.5

Minor update:

  • Access to the RevPi core temperature via .core.temperature
  • Troubleshooting when using simulator=True on instantiation
  • Improved performance during instantiation

DOWNLOAD

Version 2.0.2

Version 2.0.2 is stable!

After many test hours and a few minor improvements, RevPiModIO 2 is now FINAL! 😀

INFOS about the new version will be available soon!

In addition to the new, simplified syntax, we have added a new parameter “delay” for .reg_event (...) and the new function .reg_timerevent (...).

DOWNLOAD

Version 1.0.0 – final!

After many months of development and new features, we have now released the final version!

RevPiModIO Version 1

In addition to a few refinements and a bugfix with the byte order of the default values, this version is worthy to get the version number 1 😀

This version is still maintained, but we have learned by the development and the version 2 is in the starting holes! Look at the new syntax, which also offers many advantages in an interactive Python shell on the RevPi!

RevPiModIO version 2

Version 0.16.1 – analog module

There is a new update for the use of the analog module AIO.

  • IOs of the analog module are instantiated with “signed=True”. This activates the value calculation with a sign. Otherwise, the value -1 would be 65535 and negative values would not be allowed in assignments.

DOWNLOAD

Version 0.16.0 – Less Python, more PLC

With this update you can program more PLC with less Python code.

We introduce: cycleloop(cyclefunction)

  • The new cycleloop reads the inputs, executes the passed function and writes the outputs in the set cycle time “auto_refresh“.
    If you call .devices.cycleloop(cyclefunction) in your program, it blocks at this point and cyclically executes the function “cyclefuntkion“. To this function an instance of class RevPiCycletools() is passed, which includes tools such as clock markers, edge flags, or timer objects.
  • New function for easy exit a cyclic or event-based program .handlesignalend(cleanupfunc)
  • If the set update rate of the process image (auto_refresh) is exceeded, you will get a warning – each time!
  • auto_refresh values ​​greater than 1000 milliseconds could produce errors with .wait(...) and mainloop()
  • Module closes faster with .cleanup() or .exit()
  • The module no longer blocks exit when using the Python shell’s interactive mode

DOWNLOAD