Hi Pete,
Where is the source code containing this driver?
almCreateEZ4Controller("ALM1", "IP1", "$(ALM_ADDR1)", 4, 200, 500)
Mark
From: Tech-talk <tech-talk-bounces at aps.anl.gov>
On Behalf Of Siddons, David via Tech-talk
Sent: Tuesday, December 8, 2020 1:13 PM
To: tech-talk at aps.anl.gov
Subject: multiple USB devices in Asyn
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?
|