simonsobs / socs

Simons Observatory specific OCS agents.
BSD 2-Clause "Simplified" License
12 stars 12 forks source link

hwp-pcu: more robust get_status #608

Closed ykyohei closed 5 months ago

ykyohei commented 6 months ago

Make status check of hwp-pcu more robust

Description

We had issue in the robustness of get_status in precious PR https://github.com/simonsobs/socs/pull/600 Improved the robustness of the get_status by improving the read method and adding the clear_buffer.

How Has This Been Tested?

Tested by phase compensation unit in UTokyo. I would appreciate it if @17-sugiyama could double check.

Types of changes

Checklist:

ykyohei commented 6 months ago

I think PCU.relay_off(0) is supposed to add >relay off 0 \n\r in buffer, and PCU.relay_read(0) is supposed to add >relay read 0 \n\r off \n\r in buffer. so we read two times in PCU.relay_read

17-sugiyama commented 6 months ago

Sorry for the confusion. Sending commands and reading status are perfectly working with this current script.

ykyohei commented 5 months ago

Thank you, can you allow me to merge this? @jlashner