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

Subject: Re:RE: RE: a question about mbbiDirect and fanout
From: marco_hair <[email protected]>
To: tech-talk <[email protected]>
Date: Wed, 15 Oct 2008 23:51:37 +0800 (CST)
Roger~thank you and Ralph very much!
 
 
 

在2008-10-15,"Owens, PH (Peter)" <[email protected]> 写道:
>Not in that case.
>
>Some devices output binary numbers as strings of symbols
>eg "!!!!.!.!" for 0xF5
>that can be parsed with the %B converter.
>
>dfanout would send the same data to all the records,
>which is not what you want, but in any case
>I would recommend Ralph Langes suggestions.
>
>Pete
>
>> -----Original Message-----
>> From: [email protected] 
>> [mailto:[email protected]]On Behalf Of Silver
>> Sent: 15 October 2008 15:54
>> To: tech-talk
>> Subject: Re: RE: a question about mbbiDirect and fanout
>> 
>> 
>> hi, Owens:
>> 
>>   Thank you very much~~~ your answer solved my much 
>> confusion. But about "Depending on the serial protocol you 
>> might be able to change the stream protocol file", can you 
>> give me more explaination? I use "%1r" toe match the 8bit 
>> value such as 0xfe, you means can do some calculation by some 
>> string operator like C++? 
>>   ps, I checked the record manual, seems I can use both 
>> dfanout and seq record to implement your answer 3, am I right?
>> 
>> ======= At 2008-10-15, 21:48:10 you wrote: =======
>> 
>> >Three possibilities:
>> >
>> >1. use a chain of FLNKs
>> >2. use two fanout records.
>> >3. use a seq record
>> >
>> >Why do you need the NOT value?
>> >You could just assign ZNAM to ON rather than OFF in your bi record.
>> >Depending on the serial protocol you might be able to change 
>> the stream protocol file.
>> >In an case, I don't think a calc record has B0,B1,... 
>> fields, so you would need
>> >a second mbbiDirect record.
>> >
>> >eg.:
>> >record(mbbiDirect,"$(PREFIX):DISTATE")
>> >{
>> >        field(DTYP, "stream")
>> >        field(INP, "@power.proto mbbiDirect_distate_raw terminal")
>> >        field(SCAN, "1 second")
>> >        field(PINI, "YES")
>> >        field(FLNK, "$(PREFIX):DIOSTATE")
>> >        field(NOBT,8)
>> >}
>> >
>> >record(bi,"$(PREFIX):DI0STATE")
>> >{
>> >        field(DESC, "MAIN RELAY")
>> >        field(INP, "$(PREFIX):DISTATE.B0")
>> >        field(ZSV, "NO_ALARM")
>> >        field(OSV, "MINOR")
>> >        field(ZNAM, "On")
>> >        field(ONAM, "Off")
>> >        field(FLNK, "$(PREFIX):DI1STATE")
>> >} 
>> >
>> >
>> >>   I want to get a raw value(8 bit) from hardware, after 
>> >> caculating the NOT value of it, 8 bi records will get the 
>> >> each bit value. For example, if I get the raw value "0xFE", 
>> >> caculate it with NOT operator to "0x01", then bi record 1th 
>> >> get the B0 bit, bi record 2th get the B1 bit...etc.
>> >>   If I set SCAN field to period of each bi record, maybe I 
>> >> can refresh the value. While is it possible only setting SCAN 
>> >> field of mbbiDirect record, then arosing all bi records being 
>> >> processed?
>> >> I know if I use a fanout record(maybe dfanout record since 
>> >> fanout only support 6 values), I can do this. Is there any 
>> >> other possible way?
>> >>   ps, is there any other way to caculate the NOT value 
>> >> without using calc record?
>> >> 
>> >> record(mbbiDirect,"$(PREFIX):DISTATE_RAW")
>> >> {
>> >>         field(DTYP, "stream")
>> >>         field(INP, "@power.proto mbbiDirect_distate_raw terminal")
>> >>         field(SCAN, "Passive")
>> >>         field(PINI, "YES")
>> >>         field(FLNK, "$(PREFIX):DISTATE")
>> >>         field(NOBT,8)
>> >> }
>> >> 
>> >> record(calc,"$(PREFIX):DISTATE")
>> >> {
>> >>         field(CALC, "~A")
>> >>         field(INPA, "$(PREFIX):DISTATE_RAW.VAL NPP")
>> >> }
>> >> 
>> >> record(bi,"$(PREFIX):DI0STATE")
>> >> {
>> >>         field(DESC, "MAIN RELAY")
>> >>         field(SCAN, "1 second")
>> >>         field(INP, "$(PREFIX):DISTATE.B0 PP")
>> >>         field(ZSV, "MINOR")
>> >>         field(OSV, "NO_ALARM")
>> >>         field(ZNAM, "OFF")
>> >>         field(ONAM, "ON")
>> >> }
>> >> 
>> >> record(bi,"$(PREFIX):DI1STATE")
>> >> {
>> >>         field(DESC, "CURRENT TRANSDUCER")
>> >>         field(SCAN, "1 second")
>> >>         field(INP, "$(PREFIX):DISTATE.B1 PP")
>> >>         field(OSV, "MAJOR")
>> >>         field(ZSV, "NO_ALARM")
>> >>         field(ONAM,"FAULT")
>> >>         field(ZNAM, "OK")
>> >> }
>> >> .......  
>> >> 
>> >> Thank you very much for your help. 
>> >> 
>> >> 
>> >> Best regards
>> >> Geyang  2008-10-15
>> >> 
>> >> 
>> >> 
>> >
>> 
>> = = = = = = = = = = = = = = = = = = = =
>> 			
>> 
>> Best regards				 
>> Geyang 2008-10-15
>> 
>> 
>> 
>> 
>



[广告] 金秋最关注楼盘-房不胜房
Navigate by Date:
Prev: Re: a question about mbbiDirect and fanout Ralph Lange
Next: Re: CA client application Benjamin Franksen
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  <20082009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: a question about mbbiDirect and fanout Ralph Lange
Next: CA client application M.Babai
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  <20082009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 02 Sep 2010 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·