From eafefec8a7c7647ea83c46c03174df6066a0a8ae Mon Sep 17 00:00:00 2001 From: kpetersn <kmpeters@anl.gov> Date: Fri, 24 Feb 2023 21:51:47 +0000 Subject: [PATCH] Added 6.11, 6.12, and 6.13 --- 6-asyn-troubleshooting.md | 57 +++++++++++++++++++++++++++++++++++++-- 1 file changed, 55 insertions(+), 2 deletions(-) diff --git a/6-asyn-troubleshooting.md b/6-asyn-troubleshooting.md index b060ec3..983a9fc 100644 --- a/6-asyn-troubleshooting.md +++ b/6-asyn-troubleshooting.md @@ -209,8 +209,61 @@ How does the controller's response differ from [before the firmware upgrade](6-a </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: + + + +</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) -- GitLab