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  <20172018  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  <20172018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: read data from mp2000 LVDT Controller
From: Mark Rivers <[email protected]>
To: Basil Aljamal <[email protected]>, "[email protected]" <[email protected]>
Date: Wed, 27 Dec 2017 13:05:14 +0000
> 2017/12/27 09:40:17.041470 serial0 D08-DI-LVDT:getChannelA: Input "<02><01><00><00><00><1e><01><0a>" does not match format "%x"


Your device is not returning hex numbers (i.e. ASCII characters from 0 to F) but rather binary numbers.


I took a quick look at the manual for the MP2000.  It looks like the response you receive should be the following:


CommandID DataString VerifyByte 0x0d


This does not match what you actually received since there is no 0d in the received string.  What are the characters you are sending in your protocol supposed to do?


You probably need to use the Raw Long Converter (%r)   See the descriptions and examples here:


http://epics.web.psi.ch/software/streamdevice/doc/formats.html


Mark


________________________________
From: [email protected] <[email protected]> on behalf of Basil Aljamal <[email protected]>
Sent: Wednesday, December 27, 2017 1:50 AM
To: [email protected]
Subject: read data from mp2000 LVDT Controller

Dear all,

I have a  mp2000 LVDT Controller and I want to get channels reading via serial communication, channel data return as 8 bytes in hexadecimal but the problem I can't parse this data to PV record. I have tried %x format converter but it doesn't work.

This the message that i got in iocshell:

2017/12/27 09:40:17.041470 serial0 D08-DI-LVDT:getChannelA: Input "<02><01><00><00><00><1e><01><0a>" does not match format "%x"

This is a part of my protocol file that belongs to channel A reading:

getChanA
{
        out "S0 \x0d";
        out "\x11 \x0d";
        in  "%x";
        out "\x13 \x0d";
}

Best regards,
Basil aljamal

References:
read data from mp2000 LVDT Controller Basil Aljamal

Navigate by Date:
Prev: read data from mp2000 LVDT Controller Basil Aljamal
Next: New full-text RSS feeds now available Andrew Johnson
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  <20172018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: read data from mp2000 LVDT Controller Basil Aljamal
Next: New full-text RSS feeds now available Andrew Johnson
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  <20172018  2019  2020  2021  2022  2023  2024 
ANJ, 27 Dec 2017 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·