Moderator: RevPiModIO

 
sofiene
Topic Author
Posts: 21
Joined: 24 Dec 2019, 15:36
Answers: 0

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
KUNBUS
Posts: 303
Joined: 20 Jan 2017, 08:44
Answers: 0
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: 21
Joined: 24 Dec 2019, 15:36
Answers: 0

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
KUNBUS
Posts: 303
Joined: 20 Jan 2017, 08:44
Answers: 0
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
KUNBUS
Posts: 303
Joined: 20 Jan 2017, 08:44
Answers: 0
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!
 
Koffee-Junkee
Posts: 3
Joined: 23 Sep 2021, 17:56
Answers: 0

Re: DIO module simulation

23 Nov 2021, 18:41

I know, this Discussion in the Thread is a long time ago, but I want to reset the request about the simulation.

I have also the scenario, that I want to simulate the general program on my development (Windows) computer and later send it to the RevPi.
The genral value and state of the IOs is un intresting.

In the revpimodio2 is a flag for simulation, but the driver doesn not start

RuntimeError: can not access known pictory configurations at /etc/revpi/config.rsc, /opt/KUNBUS/config.rsc - use 'configrsc' parameter so specify location

Also it there the description, that the simulator flag switches the in- and outputs which makes for me no sense.

It would be nice, whe I get some information about this topic.

Thanks in advance.
 
Marco_C_AM
Posts: 1
Joined: 01 Jul 2022, 11:05
Answers: 0

Re: DIO module simulation

05 Sep 2022, 15:00

Hello,

I am also very interested in the subject, in the meantime a guide has been developed to simulate a code before loading it on the PLC?

Thanks
Marco

Who is online

Users browsing this forum: No registered users and 2 guests