Moderator: RevPiModIO

 
sofiene
Topic Author
Posts: 17
Joined: 24 Dec 2019, 15:36

DIO module simulation

25 Jun 2020, 13:14

is there any way to simulate the DIO module inputs and outputs via a graphical interface by using buttons and indicators
i need to test my code on my computer before setting it on RevPi.
 
User avatar
RevPiModIO
Posts: 243
Joined: 20 Jan 2017, 08:44
Contact:

Re: DIO module simulation

25 Jun 2020, 19:28

At the moment not as fine as is should be :D

You can "sudo apt-get install revpipyload" on your Revolutoin Pi and set the XML-RPC service on. At the new version just run "sudo revpipyload_secure_installation" and say YES to "allow from local network" and YES to "setup ACL". Than you can install RevPiPyControl on your network computer and connect to your revpi.

With this Program you can watch die IOs and switch outputs.

To simulate Inputs, you have to stop the piBridge bei "piTest -S". Than run your program with RevPiPyLoad (upload it via RevPiPyControl). If the program is running, you can start python3 on your RevPi and import revpimodio2 and type rpi=revpimodio2.RevPiModIO(autorefresh=True, simulator=True). Now you can set Inputs to values with rpi.io.InputName.value = True, which your control program will see and to the work :D

You will have the logs in RevPiPycontrol and a "PLC Developer" Mode to easily upload your python files, check it out in the "PLC" menu.
https://revpimodio.org/revpipyplc/

The next version will have an simulator mode, to set Inputs with the GUI :D
python3-RevPiModIO - https://revpimodio.org/ || Der RevPi ist das Beste, was passieren konnte!
 
sofiene
Topic Author
Posts: 17
Joined: 24 Dec 2019, 15:36

Re: DIO module simulation

26 Jun 2020, 11:43

At the moment not as fine as is should be :D

You can "sudo apt-get install revpipyload" on your Revolutoin Pi and set the XML-RPC service on. At the new version just run "sudo revpipyload_secure_installation" and say YES to "allow from local network" and YES to "setup ACL". Than you can install RevPiPyControl on your network computer and connect to your revpi.

With this Program you can watch die IOs and switch outputs.

To simulate Inputs, you have to stop the piBridge bei "piTest -S". Than run your program with RevPiPyLoad (upload it via RevPiPyControl). If the program is running, you can start python3 on your RevPi and import revpimodio2 and type rpi=revpimodio2.RevPiModIO(autorefresh=True, simulator=True). Now you can set Inputs to values with rpi.io.InputName.value = True, which your control program will see and to the work :D

You will have the logs in RevPiPycontrol and a "PLC Developer" Mode to easily upload your python files, check it out in the "PLC" menu.
https://revpimodio.org/revpipyplc/

The next version will have an simulator mode, to set Inputs with the GUI :D
thanks for the quick response
but what i need is to simulate revpimodio from a computer when i can't access Kunbus core3 Device using configrsc and procimg files like so :
self.revpi = revpimodio2.RevPiModIO(autorefresh=True, direct_output=True, configrsc=root + "\opt\KUNBUS\_config.rsc", procimg=root + "\dev\piControl0")
so what i need is something that basically modifies the procimg file content when i click a button in a user interface.
is that possible ?
 
User avatar
RevPiModIO
Posts: 243
Joined: 20 Jan 2017, 08:44
Contact:

Re: DIO module simulation

03 Jul 2020, 07:50

Oh, I see!

This function will be added in RevPiPyControl. In the next release, you can select a piCtory file and use the "PLC watch mode".

The system will create a "process image" on your local machine, which you can use with RevPiModIO(procimg="filename", configrsc="selected_pictory_file". In the "PLC watch mode" you will be able to set the INPUTS of your process image, so your ModIO software will control the outputs.

https://revpimodio.org/en/revpipyplc-2/

Regards, Sven
python3-RevPiModIO - https://revpimodio.org/ || Der RevPi ist das Beste, was passieren konnte!
 
User avatar
RevPiModIO
Posts: 243
Joined: 20 Jan 2017, 08:44
Contact:

Re: DIO module simulation

08 Jul 2020, 17:58

Hi sofiene!

Do you like to beta test the new Software with the simulator function? There are some things to to, but I think I could release a beta next week...
python3-RevPiModIO - https://revpimodio.org/ || Der RevPi ist das Beste, was passieren konnte!

Who is online

Users browsing this forum: No registered users and 1 guest