EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  <20182019  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  <20182019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: RE: Stream Device: Parse response that includes checksum of command string
From: "[email protected]" <[email protected]>
To: 'Eric Norum' <[email protected]>, David Vine <[email protected]>
Cc: "[email protected]" <[email protected]>
Date: Fri, 3 Aug 2018 08:56:14 +0000

If you need to preserve and compare the actual TX checksum with the value returned with the received data, how about:

 

a)       Create a calc record to pre-calculate the transmitted command checksum

b)      In the protocol file, read the checksum return value into another record, with a format specifier: %4X  e.g.: IN “#01 15AA %4X\r”

c)       Create a further calc record to compare the calculated with received checksum.

 

But I suppose it comes down to how you ultimately want to handle the comparison.

 

Regards,

Ian

 

From: [email protected] <[email protected]> On Behalf Of Eric Norum
Sent: 03 August 2018 02:20
To: David Vine <[email protected]>
Cc: [email protected]
Subject: Re: Stream Device: Parse response that includes checksum of command string

 

I have no idea how to handle this in StreamDevice, but perhaps you could push an interposed interface on top of the standard ASYN serial or IPPort driver to handle the sequence numbers and checksumming?



On Aug 2, 2018, at 5:44 PM, David Vine <[email protected]> wrote:

 

Hi all,

 

i'm writing device support for the MeCom protocol for a TEC driver from Meerstetter Engineering.

 

In order to parse the response correctly I need to calculate a checksum thats not included in the response. This is because the response includes the checksum of the command and not the response.

 

For example:

 

Command format:

# address sequence_number command CRC16 terminator

# 01 15AA ?IF 257D \r

 

Response is:

# address sequence_number CRC16 terminator

# 01 15AA 257D \r

 

So to parse the response I need to calculate a CRC that's not included in the response. For example:

 

OUT "#0115AA?IF%<xmodem>\r"

IN "#0115AA%<xmodem>\r" but the CRC is for the OUT not the IN.

 

Any ideas would be much appreciated.

 

Thanks,
David

 

— 

Eric Norum

 

 

 

 

Attachment: smime.p7s
Description: S/MIME cryptographic signature


References:
Stream Device: Parse response that includes checksum of command string David Vine
Re: Stream Device: Parse response that includes checksum of command string Eric Norum

Navigate by Date:
Prev: Re: Stream Device: Parse response that includes checksum of command string Dirk Zimoch
Next: Re: Delta Tau motor control problem [email protected]
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  <20182019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: Stream Device: Parse response that includes checksum of command string Eric Norum
Next: Re: Stream Device: Parse response that includes checksum of command string Dirk Zimoch
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  <20182019  2020  2021  2022  2023  2024 
ANJ, 03 Aug 2018 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·