Skip to content

Commit 78d6dbc

Browse files
committed
Update control.md
1 parent 671983f commit 78d6dbc

File tree

1 file changed

+13
-28
lines changed

1 file changed

+13
-28
lines changed

docs/control.md

Lines changed: 13 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -41,25 +41,24 @@ The Control table contains the following important fields:
4141

4242
8. `task_idx`
4343
- Index of the task to be executed
44-
- Used to determine which experiment configuration to load
4544

46-
## How to Use the Control Table
45+
9. `start_time`
46+
- Scheduled start time for the experiment session
47+
- Format: "HH:MM:SS" (e.g., "09:00:00")
48+
- Default: "00:00:00" (midnight)
49+
- Used to control when experiments can begin running
4750

48-
### 1. Service Mode Operation
51+
10. `stop_time`
52+
- Scheduled stop time for the experiment session
53+
- Format: "HH:MM:SS" (e.g., "17:00:00")
54+
- Default: "23:59:00" (11:59 PM)
55+
- Used to control when experiments should go to stop/sleep
56+
- Must be defined if `start_time` is specified
4957

58+
## How to Use the Control Table
5059
The Control table is automatically updated by the Logger class. You don't need to modify it directly in most cases.
5160

52-
### 2. Monitoring Experiment Status
53-
54-
```python
55-
# Example of checking setup status
56-
control_entry = (experiment.Control & {'setup': setup_name}).fetch1()
57-
current_status = control_entry['status']
58-
current_state = control_entry['state']
59-
```
60-
61-
### 3. Controlling Experiments
62-
The user only change the status of the experiment from running to stop and from ready to running. Also can change the animal_id and the task_id.
61+
The user only change the status of the experiment from running to stop and from ready to running. The user can aslo change the animal_id, the task_id, start_time and stop_time.
6362

6463
```python
6564
# To start an experiment on a setup
@@ -97,20 +96,6 @@ experiment.Control.update1({
9796
- All Control table operations are thread-safe
9897
- Updates are protected by a thread lock to prevent race conditions
9998

100-
## Example Usage in Service Mode
101-
102-
```python
103-
from ethopy.core.logger import Logger
104-
105-
# Initialize logger
106-
logger = Logger()
107-
108-
# Logger will automatically:
109-
# 1. Create an entry in Control table for this setup
110-
# 2. Monitor Control table for status changes
111-
# 3. Update setup status every 5 seconds
112-
# 4. Execute tasks based on task_idx when status is 'running'
113-
```
11499

115100
## Implementation Details
116101

0 commit comments

Comments
 (0)