Skip to content
This repository has been archived by the owner on Apr 19, 2024. It is now read-only.

external heater_profile program does not stop when requested #490

Closed
prjemian opened this issue Feb 4, 2021 · 10 comments
Closed

external heater_profile program does not stop when requested #490

prjemian opened this issue Feb 4, 2021 · 10 comments
Assignees
Labels
bug Something isn't working

Comments

@prjemian
Copy link
Contributor

prjemian commented Feb 4, 2021

The background program does not seem to stop when bit is raised. I tried manually in GUI display and from bps.mv(terms.HeaterProcess.linkam_trigger, 1) and the pulse is still going. I assume the process must stop so next time we start it, with potentially different parameters to run, it will reread its configuration and follow proper temperature trajectory.

Originally posted by @jilavsky in #482 (comment)

@prjemian
Copy link
Contributor Author

prjemian commented Feb 4, 2021

Since we use bps.mv to set the temperature and bps.sleep(hours) to hold, neither of these will watch for the exit signal during their operation. Switch to use a set and then a wait loop that polls.

@prjemian prjemian added the bug Something isn't working label Feb 4, 2021
@prjemian prjemian self-assigned this Feb 4, 2021
@prjemian
Copy link
Contributor Author

prjemian commented Feb 4, 2021

If user requests exit, then heater should be stopped.

@prjemian
Copy link
Contributor Author

prjemian commented Feb 4, 2021

T96 needs to get a signal for .stop.

@jilavsky
Copy link
Contributor

Incoming Linkam code from apstools has temperature that includes a configurable stop method.

It would be a good idea to add unit tests of that stop method to apstools test suite. See BCDA-APS/apstools#618

@prjemian
Copy link
Contributor Author

Clipboard01

@jilavsky
Copy link
Contributor

Linkam 1500 is connected., can be run and controlled. Try not to run too long at higher temperatures, at most 300C for 10-30 minutes is fine.

@prjemian
Copy link
Contributor Author

prjemian commented Jan 12, 2022

Test T96 (9idcLINKAM:tc1:) between 70 & 90, maybe a little higher if cooling is too slow. Then back to RT when done.

@prjemian
Copy link
Contributor Author

WHen user sets a new setpoint, they expect the heating power to be set to ON as a consequence.

@prjemian
Copy link
Contributor Author

This is the actuate feature.

@prjemian
Copy link
Contributor Author

In commit a727500 , the program https://github.com/APS-USAXS/ipython-usaxs/blob/a727500496e28db95c782e80c36579af9c7fb591/user/heater_profile.py#L224-L244

Complete heater plan, uninterrupted

Full execution of the heater plan as shown in the log file:

2022-01-22 13:35:18.743: Starting planHeaterProcess() for linkam_tc1
2022-01-22 13:35:18.744: linkam_tc1 T=29.2C setpoint=40.0C ramp:20.0 settled: False done: False
2022-01-22 13:35:18.749: Set linkam_tc1 rate to 20 C/min
2022-01-22 13:35:18.913: Set linkam_tc1 setpoint to 80.00 C
2022-01-22 13:36:19.048: linkam_tc1 T=47.4C setpoint=80.0C ramp:20.0 settled: False done: False
2022-01-22 13:37:19.182: linkam_tc1 T=68.2C setpoint=80.0C ramp:20.0 settled: False done: False
2022-01-22 13:37:52.252: Done, that took 153.50s
2022-01-22 13:37:52.253: linkam_tc1 T=79.4C setpoint=80.0C ramp:20.0 settled: True done: True
2022-01-22 13:37:52.253: linkam_tc1 holding for 31.17s
2022-01-22 13:38:24.337: linkam_tc1 holding period ended
2022-01-22 13:38:24.338: linkam_tc1 T=80.1C setpoint=80.0C ramp:20.0 settled: True done: True
2022-01-22 13:38:24.343: Set linkam_tc1 rate to 20 C/min
2022-01-22 13:38:24.353: Set linkam_tc1 setpoint to 40.00 C
2022-01-22 13:39:24.486: linkam_tc1 T=61.1C setpoint=40.0C ramp:20.0 settled: False done: False
2022-01-22 13:40:24.615: linkam_tc1 T=41.9C setpoint=40.0C ramp:20.0 settled: False done: False
2022-01-22 13:40:28.624: Done, that took 124.28s
2022-01-22 13:40:28.627: linkam_tc1 T=40.9C setpoint=40.0C ramp:20.0 settled: True done: True
2022-01-22 13:40:28.628: Ending planHeaterProcess() for linkam_tc1

Interrupted run

When the stop bit is set early, the profile holds at temperature and exits with heater power on. Here's the first part of the log file:

2022-01-22 13:41:18.470: Starting planHeaterProcess() for linkam_tc1
2022-01-22 13:41:18.472: linkam_tc1 T=32.3C setpoint=40.0C ramp:20.0 settled: False done: False
2022-01-22 13:41:18.476: Set linkam_tc1 rate to 20 C/min
2022-01-22 13:41:18.802: Set linkam_tc1 setpoint to 80.00 C

Externally, user requests stop by setting the bit (in a separate console):

bash-4.2$ caput 9idcLAX:bit14 0
Old : 9idcLAX:bit14                  ON
New : 9idcLAX:bit14                  OFF

The log file continues ...

2022-01-22 13:42:07.919: User requested exit during set after 0.82m. Stopping the heater and holding at current temperature.
2022-01-22 13:42:07.922: linkam_tc1 T=46.7C setpoint=46.7C ramp:20.0 settled: True done: True

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants