-
-
Notifications
You must be signed in to change notification settings - Fork 263
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
Modbus com error reopen please #1145
Comments
Not enough information. We need to be able to reproduce this to allow us to investigate. |
I connected a windows 10 laptop to an Arduino which then controls a Relay to heat a popcorn machine… what do you need specifically? |
At least your artisan settings. We do not have the resources to rebuild your Arduino custom client, but maybe you can attach us log files. If you hold the ALT key while clicking on the plus icon in the upper left corner an email with the Artisan log files attached should open. Best to record the communication issues while in debug logging mode. Toggle the logging mode by holding the ALT+CONTROL keys while clicking on the plus icon. The serial log (menu Help/Serial) might be of help as well. Thanks! |
Will try to get that for you. |
Same here, reverting to 2.4 solved the issue. Is there a way to get the verbose log or stack tracing? |
Without information that makes this reproducible for us we will never be able to fix this. |
So this is what I've got when using v2.8.2, does this help? Modbus Communication Error
|
This is not very productive. We need to know what you are sending and how you configured Artisan. Please attach your artisan-settings.aset file here (by rename to artisan-settings.txt and drag-and-drop here on a comment window). You can save this via menu Help >> Save Settings. What MODBUS server are you running? Is that server available in source code? Please attach also the Artisan artisan.log log file here (again renamed to *.txt and added via drag-and-drop to a Window here on Github). Record first a bit of that communication with debug logging turned on (click plus icon while holding the ALT and CONTROL keys to toggle logging mode). You get the log file attached to an email message by clicking the plus icon while holding just the ALT key. Thanks! |
Kapok 501, MODBUS 34. If you need other info just name it, I will keep tracking this issue, thank you. |
Where do I find these files? Turned on logging but don’t see an artisan.log… |
And here is the debug log
|
Where did I find the log? |
Hold ctrl+alt and click the PLUS icon on the top left. |
I have no email client setup… and honestly don’t want to… |
Actually it's not my pc nor my roaster, I was asking a question for my non-developer friend, I don't drink coffee either. lol |
Ah ok… bad habit not to drink coffee!;) |
On Windows you find the
Please also attach your |
Thx I will have a look! |
The Kapok roasting machines talk the rare ASCII dialect of MODBUS. The configuration API for this MODBUS dialog changed on updating the MODBUS lib underlying Artisan to v3.x in the Artisan v2.8.2 release, but the MODBUS client in Artisan was not updated accordingly. I just fixed this. Artisan v2.4.6 and v2.8.0 were still based on the MODBUS lib v2.x and communicate without any issues via MODBUS ASCII. The fix is part of the current continuous builds. Please test if this fixes your issue and report back such that I can close this one. |
I'm also having connectivity issues |
I can confirm this is no longer a problem, thank you. |
Thanks for testing! |
Hey MAKOMO, I attached the needed files. |
and the settings |
The fix does not help you as the fix was for MODBUS ASCII/BINARY transmission. Your setup indicates that you are using MODBUS RTU. The Artisan log only tells me that the device never returns anything or rather that Artisan never receives anything. What is happening on the Arduino side? Does it receives requests from Artisan at all? Does it return anything? How does the behavior on the Arduino side differs from connecting to Artisan 2.4.6 which you report does succeed. Why to set a MODBUS RTU timeout of 2sec at a 1sec sampling rate!? The timeout should be rather around 0.3sec. Maybe turn off the optimizer (which tries to fetch both readings in one request as they are served via the same unit ID). |
It doesn’t differ at all… I could do an other log with my other laptop connected running the older Artisan Version. |
Logging with the older Artisan is not productive as it does not produce a very informative log output, especially if there is no error. A log from the Arduino side would be productive. Which open source project is that code from? I just implemented quickly a server that is serving ET/BT to Artisan running under your configuration. That server receives exactly the same requests from Artisan v2.4.6 as it does from v2.8.2. The timing might be slightly different. You are sure that Artisan v2.4.6 is correctly communicating with your Arduino under those settings? The MODBUS serial comm port is correctly configured in both cases? Device logging that you activated did not output debug logging of the MODBUS lib underlying Artisan. I did activated this now for the latest Continuous Build. If you find the time, please download and install again the current continuous build. Ensure that under menu Config >> Device the "Logging" flag is ticked (as you had it in the settings you attached) and that the Artisan logging is set to DEBUG (as you had it on producing the log you attached). A short 30sec recording would be enough (ensure you have chosen the correct comm port in the MODBUS tab). Please attach again the resulting artisan.log file which should then contain raw MODBUS log messages. Thanks for your support! |
What shall I say… It does… I took picture before upgrading to 2.8.2 and checked the config afterwards… it’s the same… the arduino code is from here: Post #608 I will try and upgrade to your new version and try to post a log file. |
Found an old Arduino UNO and install a small MODBUS RTU server for testing. Indeed the communication on Artisan v2.8.2 is never successfully established. The reason is that the first two requests from Artisan are not correctly answered by that server. The first response is empty and the second invalid. Only from the third request on the responses are correct. Those newer Artisan versions disconnect on the second transaction error which leads to the situation that the communication with the Arduino server never succeeds. I increased the number of transaction errors before disconnecting and enabled also the pymodbus lib "retry on empty response" feature. Those changes are part of the latest continuous builds. https://github.com/artisan-roaster-scope/artisan/releases/continuous Could you please test and confirm that this fix works for you too? |
Will do so! And report. You do an amazing job by the way. |
Hey tested it with a temp probe, It shows one error connecting and then Reconnects with success. Showing both temps... So i asume it works. Thanks a lot. Great work. Will test it with the complete setup, but dont have any doubt to see it working. |
Excellent! Thanks for testing and reporting. As said the first two responses are empty/invalid. There is nothing Artisan can do on this. This has to be fixed on the Arduino/MODBUS side. But after this initial hickup the communication seems to be stable. Thus I regard this as resolved and close the issue. |
@Durchstanzen, @joeky888, @ID-JerryChen: we've just uploaded a (signed) beta of the next Artisan release for review by Artisan experts like you. https://github.com/artisan-roaster-scope/artisan/releases/tag/v2.8.3-beta This version includes only a few minor new features, but lots of bug fixes. Release History: Maybe you find time to test this version on your setup and report back issues. Thanks, |
I can confirm there is no issue with the version v2.8.3-beta. |
@joeky888 : thanks for testing and reporting! |
Hi.
I updated my Artisan software from 2.4 to 2.8.2 on a windows 10 machine. Prior to that it did work with a custom Modbus roast project pretty well, but since then If connected to correct usb port it only jumps between Modbus connected and Modbus failure.
I used an other laptop with 2.4 on it and it works like a charm.
there must be a bug in 2.8.2 regarding Modbus connections…
To Reproduce
Steps to reproduce the behavior:
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Setup (please complete the following information):
Additional context
Add any other context about the problem here.
Please attach your current Artisan settings file (as exported via menu Help >> Save Settings as *.aset) file.
Please attach any relevant Artisan *.alog profiles.
Note that you need either add a
.txt
extension or zip the files before uploading. Otherwise you will receive a "Not a supported file type" error on uploading.The text was updated successfully, but these errors were encountered: