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 <2025> | 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 <2025> |
<== Date ==> | <== Thread ==> |
---|
Subject: | Re: Modbus problem bit swap Wago PLC |
From: | "Brown, Garth via Tech-talk" <tech-talk at aps.anl.gov> |
To: | Jeffrey Gamsby <jfgamsby at lbl.gov>, "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov>, Mark Rivers <rivers at cars.uchicago.edu> |
Date: | Thu, 15 May 2025 20:05:06 +0000 |
Hi Jeffery,
Do you use the same modbusFunction with both types in your
drvModbusAsynConfigure command? A few years ago I was working with a Pilz PLC, and it surprised me to find that the bit order, but not the byte order, changed depending on which modbusFunction I specified.
-Garth Brown
SLAC National Accelerator Laboratory
From: Tech-talk <tech-talk-bounces at aps.anl.gov> on behalf of Mark Rivers via Tech-talk <tech-talk at aps.anl.gov>
Sent: Friday, May 2, 2025 12:28 PM To: Jeffrey Gamsby <jfgamsby at lbl.gov>; tech-talk at aps.anl.gov <tech-talk at aps.anl.gov> Subject: RE: Modbus problem bit swap Wago PLC Hi Jeffrey,
What do you mean by “bit-swap”? Do you mean the values 0 and 1 are swapped, or that the order of the bits is swapped?
Mark
From: Tech-talk <tech-talk-bounces at aps.anl.gov>
On Behalf Of Jeffrey Gamsby via Tech-talk
Hi All,
I am using a Wago PLC and Epics asyn-R4-43/Modbus R3-2, and I am seeing some differences in the FC2 reads depending on the Wago module that is used.
If the 750-400/500 series module DO/DI are used, the reads come back as expected, but if the 750-1400/1500 series are used there is a bit swap when reading.
Here is my current Asyn port configuration, I have tried the different data types as enums and strings but that doesn't change anything.
I can make it work, just trying to understand why I get the bit swap when using different modules on the PLC.
Here is my config:
cmd file: # Bit read access, Function code 2
and the db record # bi record template for register inputs
and my substitutions file:
# READ COILS - FUNCTION CODE 2 |