1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 <2020> 2021 2022 2023 2024 | Index | 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 <2020> 2021 2022 2023 2024 |
<== Date ==> | <== Thread ==> |
---|
Subject: | multiple USB devices in Asyn |
From: | "Siddons, David via Tech-talk" <tech-talk at aps.anl.gov> |
To: | "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov> |
Date: | Tue, 8 Dec 2020 19:13:08 +0000 |
I have a setup with two identical USB devices. They connect as ttyUSB0 and ttyUSB1. I tried to set up an asyn interface using the following commands:
drvAsynSerialPortConfigure("IP1", "/dev/ttyUSB0", 0, 0, 0)
asynSetOption("IP1", -1, "baud", "115200")
asynSetOption("IP1", -1, "bits", "8")
asynSetOption("IP1", -1, "parity", "none")
asynSetOption("IP1", -1, "stop", "1")
asynSetOption("IP1", -1, "clocal", "Y")
asynSetOption("IP1", -1, "crtscts", "N")
drvAsynSerialPortConfigure("IP2", "/dev/ttyUSB1", 0, 0, 0)
asynSetOption("IP2", -1, "baud", "115200")
asynSetOption("IP2", -1, "bits", "8")
asynSetOption("IP2", -1, "parity", "none")
asynSetOption("IP2", -1, "stop", "1")
asynSetOption("IP2", -1, "clocal", "Y")
asynSetOption("IP2", -1, "crtscts", "N")
# almCreateController(AllMotion port name, asyn port name, board address,
# Number of axes, Moving poll period (ms), Idle poll period (ms))
almCreateEZ4Controller("ALM1", "IP1", "$(ALM_ADDR1)", 4, 200, 500)
almCreateEZ4Controller("ALM2", "IP2", "$(ALM_ADDR2)", 4, 200, 500)
This fails, saying port ALM2 cannot be found. If I try to connect the second one also to ALM1, it complains that ALM1 is already registered.
If I comment out the first device, the second one (with port ALM2) comes up fine. How should I be doing this?
Pete.
|