From 8e92be073dacd1261ccb2fac6cc50b577b23e5f0 Mon Sep 17 00:00:00 2001 From: Dirk Zimoch Date: Wed, 25 Jul 2018 16:15:44 +0200 Subject: [PATCH] Improve docu about serial device setup --- documentation/setup.html | 34 +++++++++++++++++++++++++++------- 1 file changed, 27 insertions(+), 7 deletions(-) diff --git a/documentation/setup.html b/documentation/setup.html index 5b91f90..9e67960 100644 --- a/documentation/setup.html +++ b/documentation/setup.html @@ -231,14 +231,14 @@ connected device.

Example:

-A power supply with serial communication (9600 baud, 8N1) is connected to -/dev/ttyS1. -The name of the power supply is PS1. +A device with serial communication (9600 baud, 8N1, no flow control) is +connected to /dev/ttyS1. +The name of the device shall be PS1. Protocol files are either in the current working directory or in the ../protocols directory.

-Then the startup script must contain lines like this: +Then the startup script may look like this:

 epicsEnvSet ("STREAM_PROTOCOL_PATH", ".:../protocols")
@@ -252,9 +252,28 @@ asynSetOption ("PS1", 0, "clocal", "Y")
 asynSetOption ("PS1", 0, "crtscts", "N")
 
-

If the power supply was connected via telnet-style TCP/IP +

All above options are the defaults. +Thus their usage in optional in this case. +

+

+If the device uses hardware flow control, change the last two lines to: +

+
+asynSetOption ("PS1", 0, "clocal", "N")
+asynSetOption ("PS1", 0, "crtscts", "Y")
+
+

+Newer versions of asyn also support software flow control +(CTRL-S,CTRL-Q). If the device uses this, you may want to set: +

+
+asynSetOption ("PS1", 0, "ixon", "Y")
+asynSetOption ("PS1", 0, "ixany", "Y")
+
+ +

If the device was instead connected via telnet-style TCP/IP at address 192.168.164.10 on port 23, -the startupscript would contain: +the startup script would contain:

 epicsEnvSet ("STREAM_PROTOCOL_PATH", ".:../protocols")
@@ -369,8 +388,9 @@ specify them enclosed in parentheses:
 

The communication channel is specified with bus (aka asynDriver "port") and addr. -If the bus does not have addresses, addr is dispensable. +If the bus does not have addresses, addr may be skipped. Optional parameters are passed to the bus driver. +(At the moment, no bus driver supports parameters.)

Example: