Version 2.3.1

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.
  • The .mainloop(...) now accepts the no_warn=True parameter to disable runtime warnings.

DOWNLOAD

Version 2.2.5

Important update!

  • IOs of the Core / Connect modules are now managed statically, which is very important if new IO variants of the modules should appear in piCtory.
  • If events are appended to IOs of the .core. class via .reg_event(...), the IO names are prefixed with core. . The name of the input X2 of the Connect is now “core.x2in” to avoid overlapping with other piCtory names.
  • Export flag from piCtory for RevPiStatus und RevPiLED is passed to the IOs of the .core. class.
  • Export flag for x2in was passed from RevPiLED, which is wrong. Now the export flag of RevPiStatus will be used.

DOWNLOAD

Version 2.2.3

  • Improves module performance
  • Set internal cycle time depending on the core version at instantiation. This improves the event system and responds much faster to IO changes – especially with Core3
  • Runtime monitoring integrated for event functions. Warnings are issued if functions have too long runtimes
  • The “Export” flag from piCtory can now be retrieved via .io.ioname.export
  • You can pass the parameter export=True/False to the functions  .get_allios(...) / .get_inputs(...) / .get_outputs(...) of the device class to get only IOs that have set, or not set the export flag in piCtory
  • Fixes errors that could occur under certain circumstances with reg_event(...) / unreg_event(...)
  • Improvements in RevPiNetIO classes provide better network communication with RevPiPyLoad

DOWNLOAD

Version 2.2.2

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.A1) with .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.A3 or .core.a3green / .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.x2in und .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 instance.exitsignal.is_set() or 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 .handlesignalend().
  • Small performance improvements.

DOWNLOAD

Version 2.1.5

Small update

  • The function .cycleloop() now takes over the cycle time transferred by the optional parameter cycletime before the first run.
  • Processing of defaultvalues from piCtory improved.

DOWNLOAD

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

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