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: EPICS <[email protected]>
Date: Wed, 1 Jun 2016 17:11:04 +0200
Hello 李姣赛,

The default FTVL value for aai, aao and waveform records is STRING. But an array of 40 character Strings is almost never what you need. And STRING cannot be formatted with %x.

Use: field (FTVL, "CHAR")

Also your aai and aao records have no NELM. The default value is 1. Thus you can only write one array element to it. Set NELM to the maximum bumber of bytes you need, for example:

field (NEML, "20")

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: CSS vs. SSL Zumbruch, Peter Dr.
Next: Re: Problems about Streamdevice when sending hex command to motor device 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  <20162017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: RE: Problems about Streamdevice when sending hex command to motor device Mark Rivers
Next: Re: Problems about Streamdevice when sending hex command to motor device 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  <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 ·