DIO module simulation
Moderator: RevPiModIO
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.
i need to test my code on my computer before setting it on RevPi.
- RevPiModIO
- KUNBUS
- Posts: 333
- Joined: 20 Jan 2017, 08:44
- Contact:
At the moment not as fine as is should be
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
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
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
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
python3-RevPiModIO - https://revpimodio.org/ || Der RevPi ist das Beste, was passieren konnte!
thanks for the quick responseRevPiModIO wrote: ↑25 Jun 2020, 19:28 At the moment not as fine as is should be
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
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
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 :
Code: Select all
self.revpi = revpimodio2.RevPiModIO(autorefresh=True, direct_output=True, configrsc=root + "\opt\KUNBUS\_config.rsc", procimg=root + "\dev\piControl0")
is that possible ?
- RevPiModIO
- KUNBUS
- Posts: 333
- Joined: 20 Jan 2017, 08:44
- Contact:
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
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!
- RevPiModIO
- KUNBUS
- Posts: 333
- Joined: 20 Jan 2017, 08:44
- Contact:
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...
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!
-
- Posts: 3
- Joined: 23 Sep 2021, 17:56
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.
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.
-
- Posts: 1
- Joined: 01 Jul 2022, 11:05
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
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
Hi
is there any news about this simulator feature and how to use it ?
(requirement on the host PC simulating the RevPi, ...)
thanks
is there any news about this simulator feature and how to use it ?
(requirement on the host PC simulating the RevPi, ...)
thanks
Didier Vojtisek - Research Engineer - Inria / IRISA / Université de Rennes
- RevPiModIO
- KUNBUS
- Posts: 333
- Joined: 20 Jan 2017, 08:44
- Contact:
With the "RevPi Commander" an existing config.rsc file can be used to start a simulator. You install the program on your developer PC and call File -> RevPi Simulator. There you select a created config.rsc file and start the simulation. The window also shows the required additional parameters for the RevPiModIO(configrsc=..., procimg=...) call so that it uses the simulation files. Via the PLC monitor, outputs can then be set as a simulation in the RevPi Commander.
https://revpimodio.org/quellen/revpicommander/
Of course, the same technique can also be used to write a complex simulation with RevPiModIO. For this purpose, a config.rsc, a procimg and the parameter simulation=True are also passed to the RevPiModIO call. Both config.rsc and the process image can be downloaded via the RevPi Commander.
Sven
https://revpimodio.org/quellen/revpicommander/
Of course, the same technique can also be used to write a complex simulation with RevPiModIO. For this purpose, a config.rsc, a procimg and the parameter simulation=True are also passed to the RevPiModIO call. Both config.rsc and the process image can be downloaded via the RevPi Commander.
Sven
python3-RevPiModIO - https://revpimodio.org/ || Der RevPi ist das Beste, was passieren konnte!
Hi Sven, I'm facing a similar situation. I haven't acquired RevPi modules yet, and I'm lacking the "config.rsc" file, but I'm eager to begin developing my software. Can I utilize Pictory on my PC to generate the "config.rsc"? Alternatively, do you have any documentation available that outlines how to craft my own config file?