Hi Heinz,
> I have a VMEbus system with 4 Highland arbitrary waveform generators ( 1x V346, 3 x V344).
> Each of these cards holds 8 channels.
> Therefore I call asynPortDriver with 4 (nCards) * 8 (NUM_CHANNELS) (= 32) addresses:
> I'm just confused that with the asynReport I always get displayed "8" as nDevices:
When you pass nrCards * NUM_CHANNELS to the asynPortDriver constructor you are telling it how many parameter lists to create, 32 in this case. That value is not passed
to asynManager, which only knows that the driver is ASYN_MULTIDEVICE. asynManager dynamically creates the "devices" based on the value of the "addr" field in the link field. If there are only 8 then your database must have only used "addr"=0-7.
The question of how best to configure your driver depends on how it needs to function. Normally I would say that you would create 4 asynPortDriver instances, one for
each card, and each with 8 addresses. You definitely would want to do this if the cards are to act independently, or if you might sometimes use a different number of cards.
On the other hand, if your 4 cards are tightly coupled, and all parameters will be identical on channel N of each card, then what you have done, creating a single asynPortDriver
might make sense. Note that there are only 8 parameters lists being used in your driver currently. That means that each parameter, for example time per waveform point, will be the same on all 4 cards because there are not separate parameter lists for each
card. You could force different parameter lists for each card by changing the "addr" field in your database so it ranges from 0 to 31 rather than 0 to 8. So addr=card*8 + channel.
Mark
-----Original Message-----
From: Tech-talk <tech-talk-bounces at aps.anl.gov> On Behalf Of Heinz Junkes via Tech-talk
Sent: Friday, November 11, 2022 10:07 AM
To: EPICS Tech Talk <tech-talk at aps.anl.gov>
Subject: asynPortDriver nDevices?
I am a little confused about the use of asynPortDriver().
I have a VMEbus system with 4 Highland arbitrary waveform generators ( 1x V346, 3 x V344).
Each of these cards holds 8 channels.
Therefore I call asynPortDriver with 4 (nCards) * 8 (NUM_CHANNELS) (= 32) addresses:
AwgPort::AwgPort(const char *portName, epicsUInt16 a, epicsUInt16 nrCards)
:asynPortDriver(portName, nrCards * NUM_CHANNELS,// NUM_PARAMS,
asynInt32Mask | asynInt16ArrayMask | asynInt32ArrayMask | asynFloat64Mask | asynFloat64ArrayMask | asynOctetMask | asynDrvUserMask,
asynInt32Mask | asynInt16ArrayMask | asynInt32ArrayMask | asynFloat64Mask | asynFloat64ArrayMask,
ASYN_MULTIDEVICE,
1, // autoconnect
0, // prio
0)
"Somehow" everything looks good too.
I'm just confused that with the asynReport I always get displayed "8" as nDevices:
tIocSh> asynReport 1,awgport
awgport multiDevice:Yes canBlock:No autoConnect:Yes
enabled:Yes connected:Yes numberConnects 1
nDevices 8 nQueued 0 blocked:No
asynManagerLock:No synchronousLock:No
exceptionActive:No exceptionUsers 1 exceptionNotifys 0
traceMask:0x1 traceIOMask:0x0 traceInfoMask:0x1
addr 0 autoConnect Yes enabled Yes connected Yes exceptionActive No
exceptionActive No exceptionUsers 0 exceptionNotifys 0
blocked No
traceMask:0x1 traceIOMask:0x0 traceInfoMask:0x1
addr 1 autoConnect Yes enabled Yes connected No exceptionActive No
exceptionActive No exceptionUsers 0 exceptionNotifys 0
blocked No
traceMask:0x1 traceIOMask:0x0 traceInfoMask:0x1
addr 2 autoConnect Yes enabled Yes connected No exceptionActive No
exceptionActive No exceptionUsers 0 exceptionNotifys 0
blocked No
traceMask:0x1 traceIOMask:0x0 traceInfoMask:0x1
addr 3 autoConnect Yes enabled Yes connected No exceptionActive No
exceptionActive No exceptionUsers 0 exceptionNotifys 0
blocked No
traceMask:0x1 traceIOMask:0x0 traceInfoMask:0x1
addr 4 autoConnect Yes enabled Yes connected No exceptionActive No
exceptionActive No exceptionUsers 0 exceptionNotifys 0
blocked No
traceMask:0x1 traceIOMask:0x0 traceInfoMask:0x1
addr 5 autoConnect Yes enabled Yes connected No exceptionActive No
exceptionActive No exceptionUsers 0 exceptionNotifys 0
blocked No
traceMask:0x1 traceIOMask:0x0 traceInfoMask:0x1
addr 6 autoConnect Yes enabled Yes connected No exceptionActive No
exceptionActive No exceptionUsers 0 exceptionNotifys 0
blocked No
traceMask:0x1 traceIOMask:0x0 traceInfoMask:0x1
addr 7 autoConnect Yes enabled Yes connected No exceptionActive No
exceptionActive No exceptionUsers 0 exceptionNotifys 0
blocked No
traceMask:0x1 traceIOMask:0x0 traceInfoMask:0x1
Port: awgport
Danke Heinz