Page 2 of 3
Re: MODBUS RTU over RS485 FUNCTIONALITY with TWO CONNECTS
Posted: 03 Nov 2021, 16:12
by LEOMENA
I forgot to mention, I have backed up my files including my config.rsc for Pictory, but I dont think I know how to re-use it. When I try and replace the one on the newly flashed Revpi Connect, it doesnt look like the replacement takes effect. And normally, I would have problems getting pictory to load that file.
Do you have the right procedure to save config.rsc but more importantly how to restore it?
Thanks
Re: MODBUS RTU over RS485 FUNCTIONALITY with TWO CONNECTS
Posted: 04 Nov 2021, 09:36
by nicolaiB
Hi LEOMENA,
this is probably because of the path of pictory changed with our latest Buster release: The configuration on older systems was placed under /var/www/pictory/projects/_config.rsc and is now located (since Buster) under /var/www/revpi/pictory/projects/_config.rsc. So please copy the file to the new path and tetst again.
Nicolai
Re: MODBUS RTU over RS485 FUNCTIONALITY with TWO CONNECTS
Posted: 17 Nov 2021, 05:02
by LEOMENA
Nicolai,
Thanks for your last reply: I think it is very helpful although I did not have a chance to test it. I am pretty sure it will work.
I wanted to tell you that we have now finished our commissioning tests and the customer is happy with the system. It turns out that The Revpi performed fairly stable (RS485 wise) as long as I did not overuse the communications channel.
That said, we will go to the next with the customer that is actual field tests on their premises, but every thing is looking really good and customer is very pleased with the Revpi. This could mean they will be ordering more units, but of course the next stage will define that.
Meanwhile I prepare a better report with all the information that you need to troubleshoot the RS485 Modbus communications issues, I need a little help from you: How to make a python script into an executable file. I have tried several methods I have found on the web and the forum and none worked. To be clear I woud like to use pyinstaller to create it. I managed to install and it runs but the resulting executable does not run.
Is there a fix I need to do for Pyinstaller to work on the Revpi? It works perfectly in my other Rapsberry projetcs...
Thanks
Re: MODBUS RTU over RS485 FUNCTIONALITY with TWO CONNECTS
Posted: 17 Nov 2021, 05:10
by LEOMENA
Nicolai,
of course provide any procedure that you have if different to Pyinstaller at this point I can use any that will help me create the executable file.
Thanks again...
Re: MODBUS RTU over RS485 FUNCTIONALITY with TWO CONNECTS
Posted: 17 Nov 2021, 09:23
by nicolaiB
Hi LEOMENA,
great to hear that your customer is satisfied with your solution build with our RevPi!
Usually it should be enough to set the executable bit on a python script like this:
Code: Select all
# make it excecutable
chmod +x /path/to/your_python_script.py
# run in
/path/to/your_python_script.py
There is no special version of pyinstaller on our RevPi. The only thing you have to keep in mind that the RevPi architecture (armhf) might be different from your development machine, which is usually amd64. Maybe be we can move this discussion to another thread to other people with the same task can find it easier?
Nicolai
Re: MODBUS RTU over RS485 FUNCTIONALITY with TWO CONNECTS
Posted: 17 Nov 2021, 23:39
by LEOMENA
Agreed, let's create a new thread for this, although I dont know how.. I will let you do it, please..
I will try your suggestions:
# make it excecutable
chmod +x /path/to/your_python_script.py
# run in
/path/to/your_python_script.py
Although I am prettty sure I have tried it, I will try it again.. And let you know the results on my next post on the new thread that you will please create for this topic..
Again, Thanks!
Re: MODBUS RTU over RS485 FUNCTIONALITY with TWO CONNECTS
Posted: 18 Nov 2021, 09:01
by nicolaiB
If you try make sure that the shebang line is present (first line in file: #!/usr/bin/env python3). Otherwise the OS can't determine with which interpreter the program has to be executed.
Nicolai
Re: MODBUS RTU over RS485 FUNCTIONALITY with TWO CONNECTS
Posted: 18 Nov 2021, 18:01
by LEOMENA
Got it thanks for the reminder..
I will let you know the results, later today!
Re: MODBUS RTU over RS485 FUNCTIONALITY with TWO CONNECTS
Posted: 18 Nov 2021, 23:06
by LEOMENA
BTW, Nicolai,..
I hadn't told you that my python program is actually a GUI and uses Tkinter, So I need to also run it off the desktop (Startx), It wouldn't be a command line type run..
One good way to do it is use pyinstaller. I managed to install it on the Revpi and it runs and creates the executable, but It does not start.
Any thoughts?
Re: MODBUS RTU over RS485 FUNCTIONALITY with TWO CONNECTS
Posted: 19 Nov 2021, 12:20
by nicolaiB
Hi LEOMENA,
there is no difference in starting a program in the graphical environment or the command line, as long as the file is excecutable and the shebang line is present. You can start it eighter from the X terminal or create a application shortcut for this.
Nicolai