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

Subject: Re: Problems about Streamdevice when sending hex command to motor device
From: Dirk Zimoch <[email protected]>
To: <[email protected]>
Date: Wed, 1 Jun 2016 17:32:21 +0200
Hi 李姣赛,

When using streamDevice you normally do not want to use aao records and arrange the bytes to send in the client (caput). Because this is exactly what StreamDevice can do for you.


For example, if in this message
05 30 30 46 46 57 57 30 44 30 30 30 30 30 31 30 37 44 30
the last 4 values 30 37 44 30 stand for 0x07D0, this is simply hex formatting and you can use an ao record with the protocol

angle { out 0x05 0x30 0x30 0x46 0x46 0x57 0x57 0x30 0x44 0x30 0x30 0x30 0x30 0x30 0x31 "%04x"; }

and write 0x07D0 to the ao record. You can also use the scaling facilities of the ao record to write the angle in degrees for example.

You can also write the prototol as text instead of hex numbers:

angle { out ENQ "00FFWW0D000001%04x"; }

Maybe the other numbers (for example 00FF), are not fixed and come from other records? In that case look up "redirection" in the StreamDevice manual.With %(otherRecord)04x you can use values from multiple records in one command.

Dirk


On 24.05.2016 15:52, 李姣赛 wrote:
Hi,

Recently I try to use Streamdevice to control a motor device. The form
of the command is hex as follow:

*command
  Hex-ASC**II                                    & nbsp; *
vertical init             05 30 30 46 46 57 57 30 44 30 30 30 32 30 31
30 37 44 30
angle                     05 30 30 46 46 57 57 30 44 30 30 30 30 30 31
30 37 44 30                      &nbs p;
                                                                                                   (last four numbers stand for rotation angle: 07D0)
start                      05 30 30 46 46 57 57 30 4D 30 30 30 32 30 31
30 30 30 31
stop ;        05 30 30 46 46 57 57 30 4D 30 30 30 32 30 31 30 30 30 30
read                      05 30 30 46 46 57 52 30 44 38 33 34 30 30 31



         When record type is "aao" or "aai", I send an array angle
command(e.g.  05 30 30 46 46 57 57 30 44 30 30 30 30 30 31 30 37 44 30)
and I received the reply value correctly on NewNetAssistant. The reply
value is "-00FF" as follow:

But, when I test it on streamdevice, there are some errors:

1. Format convert is not ok:

2. The reply values are none:

3. When assigning values on PV values, it get only the former 13 values
rather than all(in fact, I need assign 19 values to the PV values and it
loss the last 6 values), as shown on the up picture.





When record type is "ao" or "ai", no format convert errors occured, but
the PV value only accept the first 1 value and return 0:




My fx3uplc.db    fx3uplc.proto    fx3uplc.cmd are as follow:









I'm figuring out which type should I choose such that the reply values
are correct. I'm so anxious.

Thanks very much and best wishes!

                        Jiaosai Li, IMPCAS










References:
Problems about Streamdevice when sending hex command to motor device 李姣赛

Navigate by Date:
Prev: Re: Problems about Streamdevice when sending hex command to motor device Dirk Zimoch
Next: APS-AES Controls Group Leader Opening 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  <20162017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: Problems about Streamdevice when sending hex command to motor device Dirk Zimoch
Next: pyepics 3.2.5 Matt Newville
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  <20162017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 15 Jul 2016 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·