Commit Graph

312 Commits

Author SHA1 Message Date
akira 5c3568d4b8 Merge pull request #19 from nbuchwitz/fix/scope-bitaddress
Scope bit address with byte address
2021-10-16 10:47:07 +02:00
Nicolai Buchwitz 665b989217 fix: scope bit address with slc_address
Scope bit address with byte address in order to allow replace_io on
datatypes bigger than 8 bit (like WORD)
2021-10-14 18:15:10 +02:00
akira 577e764741 Next release 2.5.8 2021-09-23 16:33:35 +02:00
akira 8999e71d2e Bugfix with shared process image in cycle loop
Shared outputs was written after reading the process image for current cycle. So the values for the outputs was one cycle in the past.
2021-09-22 16:25:12 +02:00
akira 9c7c679abc Bugfix on handle default values of type byte (frm="*s") in export_file 2021-09-09 12:31:21 +02:00
akira 8607f25b37 Bugfix for offset check in piCtory file 2021-08-22 17:10:31 +02:00
akira 0edfb4ef85 Check device offsets in piCtory file and ignore IOs with wrong offsets
The modbus 150 Device has a memory gap and piCtory does not calculate the right offset of the following device - We will warn the user.
2021-07-28 07:38:34 +02:00
akira 498d200e41 The replace_io file can handle default values of type byte (frm="*s") now. 2021-07-28 07:37:20 +02:00
akira af15bd36cd Internal change RevPi*IOSelected search method
Internal device search is more flexible to expand the search functions of
RevPi*IOSelected in the future. There are no changes in usage.
2021-05-03 09:56:12 +02:00
akira a05770e4f8 Added MIO memory value mappings 2021-05-01 08:12:45 +02:00
akira 17666edb85 Merge pull request #12 from nbuchwitz/feature/product-type
introduce ProductType enum
2021-05-01 07:56:56 +02:00
Nicolai Buchwitz 10f30721c1 introduce ProductType enum and use it 2021-04-30 18:48:19 +02:00
akira ae8dcf7866 Next release 2.5.7 2021-04-18 09:14:58 +02:00
akira 89a447abb9 Bugfix: Calculate correct lengths despite IO gaps in incorrect piCtory file 2021-04-14 09:09:10 +02:00
akira 687c7ab91a Flat: Switch and Relais as real io of core class, added MEMs to pictory.py 2021-02-12 19:43:11 +01:00
akira d35b09e209 Next release 2.5.6 2021-01-31 19:35:29 +01:00
akira 6608bd965c Sync write of outputs with autorefresh/cycle or .writeprocimg, if shared_procimg=True
If shared_procimg=True, ModIO wrote the new set values directly to the process
image without cycle sync mechanisms. As a result, the IOs could change status
several times within the cycleloop, which is wrong.
2021-01-31 13:31:05 +01:00
akira 57c56ce207 Corrected misleading message 2021-01-17 10:21:33 +01:00
akira 2904c7b187 Next release 2.5.5 2021-01-14 19:08:28 +01:00
akira 38b655ad29 Merge branch 'develop' 2021-01-14 19:02:59 +01:00
Sven Sager 3540676f73 Merge pull request #9 from nbuchwitz/feature/structio-exportflag
feature: make export flag configurable for StructIO
2021-01-14 18:46:51 +01:00
akira cc9b4521e9 Only write export flag to replace_io_file, if the value was set during runtime 2021-01-13 10:36:36 +01:00
Nicolai Buchwitz 186406623b feature: make export flag configurable for StructIO
replaceable IOs should also allow the configuration of the export flag
2021-01-12 19:10:13 +01:00
akira dc731afafd Parameter shared_procimg can be set per device
The shared_procimg Parameter is still a global parameter, but can now be set
per device as well with .shared_procimg(...) of all devices.
2020-12-16 18:46:45 +01:00
akira 6beb05577e Add blocking parameter to .cycleloop
If you want to use a cycleloop function and your own tasks, you can set
blocking=False in .cycleloop(...) call. Same as .mainloop(...) call.
2020-12-14 19:50:48 +01:00
akira 4ac1283c5b Bugfix: Set A1 - A5 LED did not work with shared_procimg=True 2020-12-14 19:41:56 +01:00
akira 79164bd41b Add support for RevPi Flat 2020-10-10 14:14:57 +02:00
akira beb7a36cc7 Set values in process image AND buffer with shared_procimg=True 2020-09-30 16:04:29 +02:00
akira 9460c4f106 Cycleloop does not raise Exception, run_plc accept debug flag.
User has to use maxioerrors = n, if the program should crash on process
image errors.
If the ProcimgWriter helper is running but get no new data for 2500 ms,
the cycleloop will print just a warning. Cycle function is paused for
that time. Most interesting for RevPi NET classes.
2020-09-09 09:47:55 +02:00
akira 6f5415a567 Add piCtory value mappings for RevPi Compact memories in pictory.py. 2020-09-08 07:26:44 +02:00
akira 963e173dc2 Redesign netio.py to prevent errors and provide clean source code 2020-08-30 10:41:52 +02:00
akira ff0f84bb03 Next release 2.5.3 2020-08-29 14:59:05 +02:00
akira f34d1a1a38 Restore fix c20caaa5d5 2020-08-29 14:00:37 +02:00
akira e27318f49d Merge branch 'master' of https://github.com/naruxde/revpimodio2 2020-08-29 11:39:58 +02:00
akira 8cef5222ac Next release 2020-08-29 11:39:03 +02:00
akira 990647a160 Bugfix: writeprocimg did not flush buffer on network error 2020-08-29 11:16:14 +02:00
akira c20caaa5d5 Bugfix: Wrong buffer size after network error 2020-08-26 23:27:05 +02:00
akira 5a0d88efe1 Include classes from pictory module to package __init__.py. 2020-08-17 19:52:16 +02:00
Sven Sager 674b2bb264 Create FUNDING.yml 2020-08-13 20:36:40 +02:00
Théo Rozier 507e407add Added a "pictory" module to register all aliases used by Pictory (#8)
* Added a "pictory" module to register all aliases used by Pictory (mainly in dropdown lists for I/O ranges).

* Added all AIO aliases found in .rap file.

* Listing already checked RAP files and made aliases for DI 1.0 and DO 1.0 to DIO 1.0

* Removed versions from class names and separated DIO into DI & DO classes, and made DIO extending these two classes.
2020-08-09 19:24:33 +02:00
akira 5e32bd12ff Add .changed(io, edge) -> bool function to CycleTools.
You can detect changes of IO values between two cycles. The function will
return True or False.
On bit IO objects you can also use parameter edge RISING or FALLING.
2020-07-19 18:20:39 +02:00
akira 85c4babc2a Add library const PROCESS_IMAGE_SIZE should it change some day in future. 2020-07-14 19:35:50 +02:00
akira 110a366e14 IOs are callable to get or set values.
You do not have to use the .value property. Just call
the IO .io.io_name() to get the value. If you like to set a value
just pass the value to the call .io.io_name(new_value).
2020-07-11 17:13:09 +02:00
akira bf4b450bc6 Bug fix for NetIO with autorefresh=True 2.5.1 2020-06-24 18:24:18 +02:00
akira a7802178e9 Added .device to Cycletools, added revpimodio2.run_plc shortcut to run cycleloop
Changed readinto buffer in ProcimgWriter
2.5.0
2020-05-16 11:25:08 +02:00
akira a6a227e99e Watchdog for all RevPis, cycletools with .core/.io/.runtime, bugfix on MemIO for str()
All RevPis got .core.wd for Software-Watchdog with RevPiPyLoad
All RevPis has .core.wd_toggle() function to toggle watchdog bit
Cycletools has .core and .io attribute to be independent of rpi object
Cycletools has .runtime to get the actual runtime of function
2020-05-03 13:43:09 +02:00
akira d54a588a78 Return all IOs of base devices in the .io object as int() not bytes() when using .value
close #7
2020-04-29 21:20:06 +02:00
akira 9d31bb5002 Add support for RevPi Compact, better calculation of A1, A2, A3 on core object 2020-04-29 20:52:09 +02:00
akira 421cc17dbd Cleanup and new version number 2.4.5 2020-04-12 08:09:21 +02:00
akira c11b43507c DeprecationWarning when using direct_output - replaced by shared_procimg
close #3
2020-04-08 18:43:40 +02:00