Skip to content
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

Bugfix/E5CN-COM-PermissionError #33

Merged
merged 3 commits into from
Dec 3, 2024
Merged

Conversation

mslaffin
Copy link
Collaborator

@mslaffin mslaffin commented Dec 2, 2024

On 11/25, noticed the following message appearing several times at the terminal (not in Messages & Errors log):
could not open port 'COM4': PermissionError(13, 'Access is denied.', None, 5)

@mslaffin mslaffin requested a review from bwalkerMIR December 2, 2024 23:55
@mslaffin mslaffin self-assigned this Dec 2, 2024
@mslaffin
Copy link
Collaborator Author

mslaffin commented Dec 3, 2024

Resolved the PermissionErrors that were stemming directly from PyModbus/pyserial's internal error handling, bypassing our logging system.

Still need to address timing issue that's leading to "Incomplete Message" errors. Note that these are still not fatal-- and I'm getting successful reads immediately after these appear.

@mslaffin
Copy link
Collaborator Author

mslaffin commented Dec 3, 2024

This turned out to be a pretty stupid bug. I tried clearing any stale data upon connection in read_temperature using pyserial's reset_input_buffer() and immediately all the remaining errors went away.

Here's a log file showing clean communication with the E5CN (other equipment disconnected):
log_2024-12-02_18-06-22.txt

In this test I grabbed each of the thermocouples briefly to confirm it was responsive to changing temp. Here's what the log's output plot looks like after running the post-processor:
log_2024-12-02_18-06-22_temperature

@mslaffin mslaffin marked this pull request as ready for review December 3, 2024 00:26
@mslaffin mslaffin merged commit e2e975c into develop Dec 3, 2024
@mslaffin mslaffin deleted the bugfix/E5CN-COM-PermissionError branch December 3, 2024 00:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant