New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add possibility to use an handler #2
Comments
Hi, I think my problem is related with this topic. So the situation is: I have installed Pyscada over the doc. (https://pyscada.readthedocs.io/en/main/quick_install.html) Now when a device added I have the below error. Any ideas? Any solutions? Thank you in advance. |
This is not related to this issue. |
Thank you for the quick return. So now I am again stuck with OS related permission problems, which are: When I force-reinstall pymodbus over pyscada user, I get ".venv/bin/pyserial-miniterm" permission error as it is root's. Any way out? :) |
At this point, I found this result very strange: Even though I installed Pyscada from install.sh file over venv, I saw that the pip packages belonged to the root user. Do you think this is normal or did I make a mistake again? |
Please send me the list of the packages installed in the virtual environment. For plugin installation, I have to change the doc to have no permission problems. If you install from a directory, as proposed in the documentation, the Otherwise you can put the zip donwloaded in the
|
I think it is going to be a long one. Please excuse me for bothering you.
Here it is with a ss: As I told before, pyscada is installed with install_venv.sh from the doc > https://pyscada.readthedocs.io/en/main/quick_install.html.
I was in venv, I mean install_venv.sh already does everything automatically in the venv, isn't it? I've seen it @$PIP_TO_INSTALL.
I have realized that while downgrading pymodbus to 2.5, the already installed six and the other dependency(which I don't remember now) is already with the exact version so I was able to do a force-install with --no-debs. So actually it is solved for now but another problem is occured I think after this. Now I am able to get data from the device but something weird is happening: WARNING [pyscada.modbus.device:325] Modbus requested data for modbus-ModbusTestDevice(<pyscada.modbus.device.HoldingRegisterBlock object at 0xffff8db7f190>) has no bits nor registers, it's : Modbus Error: [Input/Output] Modbus Error: [Invalid Message] No response received, expected at least 8 bytes (0 received) This problem makes the polls one working one miss as: "variable with id: 1 is not accessible & variable with id: 1 is now accessible" loop. I couldn't manage to retrieve data from UINT64 at all. As INT32 is on the same loop without changing the value_class problem, I am not able to I cannot interpret all these errors. Can you help a little more? |
I now also had a clean install of Pyscada and than follow the steps you have provided above. Unfortunately I had:
this time. I am a little confused I think. I must be making a mistake at some other point. Am I the only one having these issues? Thank you. |
Yes everything in For the modbus read errors, can you send me a full copy of the logs after pyscada starts? Can you send me a screenshot of your variable configurations? It seems that pymodbus (used by pyscada-modbus) cannot read data from your device but I need to know what is the configuration and what are the logs exactly. |
Actually it reads @clavay. (except UINT64 - btw I didn't try all the value_classes, just 4-5 of them.) Here are the logs including some value_class changes, reboots and systemctl restarts:
*sorry it's been so long. And the variable configs: Nothing special at the config. |
I am now able to install pyscada-modbus with the above snippet after appliying "sudo chown -R pyscada:pyscada /home/pyscada" but the reading errors (No response received, expected at least 8 bytes (0 received)) Could this be a baud rate error or device configuration error caused by me? |
This error is a bug, I will fix it, look at the issue pyscada/PyScada#102 :
|
It is not important but I will change this behaviour : pyscada/PyScada#103 |
For me this is not due to pyscada, because pymodbus return empty data or no data for the variable. Is it tcp modbus ? |
maybe the baud rate. |
There is only one device connected to the system and yes it is Modbus TCP. |
Reducing the baud rate changes anything to de pymodbus errors ? What is the modbus instrument ? |
The instrument is an energy analizer connected to a modbus gateway via TCP. I was working on it and just saw your comment. So the situation goes deeper. I didn't reduce the baudrate as it was 9600, thinking it is already so low but I will try it now. I couldn't manage to retrieve true values from the device for float class. No matter of the byte-order or any config of addresses, I think there is a problem with mantissa&exponent thing for float as well. And as I just realized now, the uint64 bug is stopping all the background processes too. :( |
I have tried with a 2400 baud rate. |
Try to use directly pymodbus and to identify why you have these errors during the reading. For the uint64, I will correct this when I have time on the pyscada issue I gave you. |
Modbus plugin is not using the generic handler definition.
We need to change the
device.py
file in order to use an handler file if specified.It is done in others plugins (visa, smbus...)
The text was updated successfully, but these errors were encountered: