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

Added 6.11, 6.12, and 6.13

parent f7dffe56
No related branches found
No related tags found
No related merge requests found
...@@ -209,8 +209,61 @@ How does the controller's response differ from [before the firmware upgrade](6-a ...@@ -209,8 +209,61 @@ How does the controller's response differ from [before the firmware upgrade](6-a
</details> </details>
### 6.11 Confirm the communication problem ### 6.11 Diagnose the communication problem
### 6.12 Solve the communication problem Why doesn't the controller communicate properly with EPICS after the firmware upgrade?
<details>
<summary>answer</summary>
The firmware upgrade changed the message terminator of the controller's replies. The asyn port's input terminator, `IEOS`, is set to **\r\n** but the controller now responds with only **\r**.
</details>
### 6.12 Confirm the communication problem
Correct the `IEOS` in on asynOctet.ui
<details>
<summary>solution</summary>
Changing the input terminator from **\r\n** to **\r** has an immmediate effect on the messages displayed on the IOC's console: the communication is no longer delayed and the driver resumes polling at the idle polling rate.
When the position is queried manually, the I/O status and severity return to `NO_ALARM` on asynOctet.ui:
![screenshot of asynOctet.ui showing 1 POS? sent to the controller and a response of 400 with \r as the input terminator](images/asynOctet-positionQuery-new-fw-fixed.png)
</details>
### 6.13 Solve the communication problem
IOC's configuration needs to be modified so the change to the input terminator persists across IOC restarts.
```
$ gedit iocsh/vmc.cmd &
```
<details>
<summary>solution</summary>
Note: this is a situation where it is **very important to include a comment explaining the change** so that the next person who maintains this IOC doesn't need to wonder why the input terminator doesn't match the virtual motor controller documentation.
```diff
diff --git a/iocBoot/iocxxx/iocsh/vmc.cmd b/iocBoot/iocxxx/iocsh/vmc.cmd
index 3754207..b39d863 100644
--- a/iocBoot/iocxxx/iocsh/vmc.cmd
+++ b/iocBoot/iocxxx/iocsh/vmc.cmd
@@ -12,7 +12,10 @@ asynSetTraceMask("VMC_ETH", 0, 1)
asynSetTraceIOMask("VMC_ETH", 0, 1)
# Set end-of-string terminators
-asynOctetSetInputEos("VMC_ETH",0,"\r\n")
+# Original Firmware EOS
+#!asynOctetSetInputEos("VMC_ETH",0,"\r\n")
+# New Firmware EOS
+asynOctetSetInputEos("VMC_ETH",0,"\r")
asynOctetSetOutputEos("VMC_ETH",0,"\r")
# These motor records can get their prefix from the environment variable
```
</details>
## [The End](README.md) ## [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