Skip to content
Snippets Groups Projects
Commit 6af83a32 authored by kpetersn's avatar kpetersn
Browse files

Modified 6-asyn-troubleshooting:

* Added a "Start the IOC" heading (for people who jump to this point)
* Changed the "Enable asyn traces" section to "How to enable asyn traces"
* Added links to screenshots (that don't exist yet)
parent dbce22bd
No related branches found
No related tags found
No related merge requests found
......@@ -4,28 +4,63 @@
The EPICS asyn module provides a [trace facility](https://htmlpreview.github.io/?https://github.com/epics-modules/asyn/blob/master/documentation/asynDriver.html#asynTrace) that allows communication between an IOC and a controller to be displayed or logged.
### 6.1 Enable asyn traces
### 6.1 Start the IOC
The traces can be enabled from the IOC's shell:
```
$ cd ${IOC_DIR}/xxx/iocBoot/iocxxx
$ ./softioc/xxx.sh start
```
<details>
<summary>output</summary>
The script will prevent you from starting a second copy of an IOC.
```
kmp> help asynSetTraceMask
asynSetTraceMask portName addr mask
kmp> help asynSetTraceIOMask
asynSetTraceIOMask portName addr mask
kmp> help asynSetTraceFile
asynSetTraceFile portName addr filename
xxx is already running (pid=1963381) in a screen session (pid=1963380)
```
</details>
### 6.2 How to enable asyn traces
Or from MEDM/caQtDM if the IOC loaded at least one asyn record.
The traces can be enabled from the IOC's shell. An example of how to do this can be found in the [example virtual motor controller configuration](https://git.aps.anl.gov/practical_beamline_controls_training/session_2/motorVMC/-/blob/master/iocs/vmcIOC/iocBoot/iocvmc/vmc.cmd#L9-12) that was copied in a previous step:
```
# Only show errors
asynSetTraceMask("VMC_ETH", 0, 1)
# Leave ascii selected so traces can be turned on with a single click
asynSetTraceIOMask("VMC_ETH", 0, 1)
```
TODO: include asynRecord screenshot
It is much easier, however, to enable traces from MEDM/caQtDM if the IOC loaded at least one asyn record.
Do the following:
* TODO
1. Launch caQtDM if it isn't already running
```
$ ./softioc/xxx.sh caqtdm
```
This launches my-xxx.ui:
![screenshot of my-xxx.ui showing the default "Motors" section](images/my-xxx-motors.png)
2. Switch to the "Direct I/O" section of my-xxx.ui
![screenshot of my-xxx.ui showing the "Direct I/O" section](images/my-xxx-direct-io.png)
3. From the "Serial 1-8" menu of my-xxx.ui, choose "asyn record serial1"
This launches asynOctet.ui:
![screenshot of asynOctet.ui](images/asynOctet.png)
4. From the "More..." menu of asynOctet.ui, choose "Record Parameters"
This launches asynRecord.ui:
![screenshot of asynRecord.ui](images/asynRecord.png)
### 6.2 Observe controller communication
### 6.3 Observe controller communication
The commands used by the virtual motor controller are documented [here](https://git.aps.anl.gov/practical_beamline_controls_training/session_2/motorVMC#command-reference).
......@@ -35,14 +70,14 @@ Do the following:
* Move a motor and look for the MV command
* Stop a motor and look for the AB command
### 6.3 "Upgrade" the Virtual Motor Controller to a newer firmware.
### 6.4 "Upgrade" the Virtual Motor Controller to a newer firmware.
#### 6.3.1 Stop the IOC
#### 6.4.1 Stop the IOC
#### 6.3.2 Kill server.py
#### 6.4.2 Kill server.py
#### 6.3.3 Run server-new-fw.py
#### 6.4.3 Run server-new-fw.py
#### 6.3.4 Start the IOC
#### 6.4.4 Start the IOC
## [The End](README.md)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment