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: | Re: modbus ioc start |
From: | Mark Rivers via Tech-talk <tech-talk at aps.anl.gov> |
To: | Dale Cox <dale.cox at acu.edu> |
Cc: | "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov> |
Date: | Sat, 15 Apr 2023 13:24:44 +0000 |
Hi
Dale,
>
Is it supposed to say "asynSuccess" at the end of the highlighted section? I get a "return 0".
Yes,
asynSuccess is an enum with the value 0.
Mark
From: Dale Cox <dale.cox at acu.edu>
Sent: Friday, April 14, 2023 8:43 AM To: Mark Rivers <rivers at cars.uchicago.edu> Cc: tech-talk at aps.anl.gov <tech-talk at aps.anl.gov> Subject: Re: modbus ioc start Thanks for the reply Mark.
(1) Yes I thought this was the case. Whenever I enable some asyn trace lines in the IOC, I can see the initial modbus request. It looks like this:
...
drvModbusAsynConfigure("Z8TC1_Config", "SenecaBus", 5, 6, 53, 4, "UINT16", 400, "SenecaZ")
2023/04/14 08:32:01.482 SenecaBus asynManager::queueLockPort locking port 2023/04/14 08:32:01.482 SenecaBus asynManager::queueLockPort created queueLockPortPvt=0x55ec3aba5df0 2023/04/14 08:32:01.482 SenecaBus asynManager::queueLockPort created queueLockPortPvt=0x55ec3aba5df0, event=0x55ec3aba5e10, mutex=0x55ec3aba5eb0 2023/04/14 08:32:01.482 SenecaBus asynManager::queueLockPort taking mutex 0x55ec3aba5eb0 2023/04/14 08:32:01.482 SenecaBus asynManager::queueLockPort queueing request 2023/04/14 08:32:01.482 SenecaBus addr -1 queueRequest priority 0 not lockHolder 2023/04/14 08:32:01.482 SenecaBus schedule queueRequest timeout in 2.000000 seconds 2023/04/14 08:32:01.482 SenecaBus asynManager::queueLockPort waiting for event 2023/04/14 08:32:01.482 asynManager::portThread port=SenecaBus callback 2023/04/14 08:32:01.482 SenecaBus asynManager::queueLockPortCallback signaling begin event 2023/04/14 08:32:01.482 SenecaBus asynManager::queueLockPortCallback waiting for mutex from queueUnlockPort 2023/04/14 08:32:01.482 SenecaBus asynManager::queueLockPort got event from callback 2023/04/14 08:32:01.482 SenecaBus flush 2023/04/14 08:32:01.482 /dev/ttyUSB0 flush 2023/04/14 08:32:01.487 /dev/ttyUSB0 write. 2023/04/14 08:32:01.487 /dev/ttyUSB0 write 8 05 03 00 35 00 04 55 83 2023/04/14 08:32:01.487 wrote 8 to /dev/ttyUSB0, return asynSuccess 2023/04/14 08:32:01.487 asynOctetSyncIO wrote: 05 03 00 35 00 04 2023/04/14 08:32:01.487 /dev/ttyUSB0 read. 2023/04/14 08:32:01.495 /dev/ttyUSB0 read 13 05 03 08 d0 11 d2 00 d2 00 d2 11 3b 1c 2023/04/14 08:32:01.495 /dev/ttyUSB0 read 13, return 0 2023/04/14 08:32:01.495 SenecaBus read 13 bytes eom=0 05 03 08 d0 11 d2 00 d2 00 d2 11 3b 1c 2023/04/14 08:32:01.495 asynOctetSyncIO read: 03 08 d0 11 d2 00 d2 00 d2 11 2023/04/14 08:32:01.495 SenecaBus queueUnlockPort 2023/04/14 08:32:01.495 SenecaBus asynManager::queueUnlockPort waiting for event 2023/04/14 08:32:01.495 SenecaBus queueUnlockPort unlock mutex 0x55ec3aba5eb0 complete. ...
So I'm getting the requested registers back on that port, and you can see their values there. d0 11 is 1101000000010001 in binary, so when I look at the 15th bit, it should return back a 1. when I do a caget on that PV, I get a 0 (I get 0's for all of
the records associated with these registers).
Is it supposed to say "asynSuccess" at the end of the highlighted section? I get a "return 0".
Thanks for helping me troubleshoot.
Dale
On Thu, Apr 13, 2023 at 4:38 PM Mark Rivers <rivers at cars.uchicago.edu> wrote:
|