On Apr 6, 2006, at 12:17 , Carl Cork wrote:
According to CIP Protocol Ed. 2.2 (Dec 2005), C-5.2.6 String
Encodings:
a SHORT_STRING consists of a 1-Byte character count followed by count
characters (1 byte per character). Therefore, the Product Name
attribute
field should have a maximum length of 33 bytes.
John Dobbins wrote:
Kay,
Actually, it looks like there may be another interpretation. The
product name is defined as (DeviceNet?) type SHORT_STRING. I don't
know where this is defined but it looks like it may be: "a single
byte length field and 'n' data bytes".
In which case the Product Name is being returned inside a longer
field. The Product Name is less than 32 characters but the data
field it is returned in is longer than 32 bytes.
EIP_check_interface() rejects the product name because is finds
the length of the data returned >32, even though the string length
is less than 32.
You're right in that the length check used the data package size,
and the package contains
BYTE length
BYTE name[length]
So the actual name length is one less than the package byte count.
Then it's copied into a C char name[] with an added final '\0',
which adds another byte.
Strictly speaking, I need to check the length byte,
instead of silently expecting it to contain (package length-1).
OK, I'll do that.
Now where are we with CompactLogix?
What product name does it return?
How long is it? BTYE 51 + 51 characters?
Or does it return
BYTE length=32
char name[32]
... plus more junk to get a package of 52 bytes
-Kay
- Replies:
- Re: Ethernet/IP Device Support and CompactLogix John Dobbins
- References:
- Ethernet/IP Device Support and CompactLogix John Dobbins
- Re: Ethernet/IP Device Support and CompactLogix Kay-Uwe Kasemir
- Re: Ethernet/IP Device Support and CompactLogix John Dobbins
- Re: Ethernet/IP Device Support and CompactLogix Kay-Uwe Kasemir
- Re: Ethernet/IP Device Support and CompactLogix John Dobbins
- Re: Ethernet/IP Device Support and CompactLogix Kay-Uwe Kasemir
- Re: Ethernet/IP Device Support and CompactLogix John Dobbins
- Re: Ethernet/IP Device Support and CompactLogix Carl Cork
- Navigate by Date:
- Prev:
Re: Ethernet/IP Device Support and CompactLogix Carl Cork
- Next:
Re: Ethernet/IP Device Support and CompactLogix John Dobbins
- 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
- Navigate by Thread:
- Prev:
Re: Ethernet/IP Device Support and CompactLogix Carl Cork
- Next:
Re: Ethernet/IP Device Support and CompactLogix John Dobbins
- 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
|