Hi Mark, I just did "asynReport" on the runnogn IOC and got this:
epics> asynReport
IP1 multiDevice:No canBlock:Yes autoConnect:Yes
Serial line /dev/ttyUSB0: Connected
IP2 multiDevice:No canBlock:Yes autoConnect:Yes
Serial line /dev/ttyUSB1: Connected
ALM1 multiDevice:Yes canBlock:Yes autoConnect:Yes
Port: ALM1
ALM2 multiDevice:Yes canBlock:Yes autoConnect:Yes
Port: ALM2
So it seem ALM2 exists. So I don't understand the message.
Pete.
From: Mark Rivers <rivers at cars.uchicago.edu>
Sent: Tuesday, December 8, 2020 3:52 PM
To: Siddons, David <siddons at bnl.gov>
Cc: tech-talk at aps.anl.gov <tech-talk at aps.anl.gov>
Subject: RE: multiple USB devices in Asyn
Can you send the complete output when you start the IOC?
From: Siddons, David <siddons at bnl.gov>
Sent: Tuesday, December 8, 2020 2:49 PM
To: Mark Rivers <rivers at cars.uchicago.edu>
Cc: tech-talk at aps.anl.gov
Subject: Re: multiple USB devices in Asyn
Here is the code. I tried to send the whole IOC, but your mailer rejected it.
Hi Pete,
Where is the source code containing this driver?
almCreateEZ4Controller("ALM1", "IP1", "$(ALM_ADDR1)", 4, 200, 500)
Mark
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?
|